Latest web development tutorials

HTML DOM Video networkState property

Video Object Reference Video Object

Examples

To obtain a video of the current network status:

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

x The output is:

1 // video is valid and has been selected resources, do not use the network

try it"

Definition and Usage

networkState property return to the audio / video of the current network status.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support networkState property

Note: Internet Explorer 8 and earlier versions of IE does not support this property.


grammar

videoObject .networkState

return value

Types of description
Numeric values

It represents the current network status audio / video elements:

  • 0 = NETWORK_EMPTY - Audio / video is not initialized
  • 1 = NETWORK_IDLE - Audio / video is active and selected resources, but did not use the network
  • 2 = NETWORK_LOADING - the browser is downloading data
  • 3 = NETWORK_NO_SOURCE - No audio / video sources to find


Video Object Reference Video Object