Video networkState attribute

Definition and usage

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

Instance

Get the current network state of the video:

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

Try it yourself

Syntax

videoObject.networkState

Return value

Type Description
Number

Represents the current network state of the video element:

  • 0 = NETWORK_EMPTY - Video has not been initialized
  • 1 = NETWORK_IDLE - Video is active and resources have been selected but no network is used
  • 2 = NETWORK_LOADING - Browser is downloading data
  • 3 = NETWORK_NO_SOURCE - Video source not found

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support 9.0 Support Support Support