HTML DOM Video networkState Property
THE WORLD'S LARGEST WEB DEVELOPER SITE

Video networkState Property

❮ Video Object

Example

Get the current network state of the video:

var x = document.getElementById("myVideo").networkState;
Try it Yourself »

Definition and Usage

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


Browser Support

Property
networkState Yes 9.0 Yes Yes Yes

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