THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Video networkState Property

Video Object Reference Video Object

Example

Get the current network state of the video:

var x = document.getElementById("myVideo").networkState;

The result of x could be:

1  // The video is active and has selected a resource, but is not using the network
Try it Yourself »

Definition and Usage

The networkState property returns the current network state (activity) of the video.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The networkState property is supported in all major browsers.

Note: This property is not supported in Internet Explorer 8 and earlier.


Syntax

videoObject.networkState

Return Value

Type Description
Number Represents the current network state of the video element:
  • 0 = NETWORK_EMPTY - video has not yet been initialized
  • 1 = NETWORK_IDLE - video is active and has selected a resource, but is not using the network
  • 2 = NETWORK_LOADING - browser is downloading data
  • 3 = NETWORK_NO_SOURCE - no video source found

Video Object Reference Video Object