HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML Audio/Video DOM networkState Property

HTML audio Tag Reference HTML Audio/Video DOM Reference

Example

Get the current network state of the video:

myVid=document.getElementById("video1");
alert(myVid.networkState);

Try it Yourself »

Definition and Usage

The networkState property returns the current network state (activity) of the audio/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

audio|video.networkState

Return Value

Type Description
Number Represents the current network state of the audio/video element:
  • 0 = NETWORK_EMPTY - audio/video has not yet been initialized
  • 1 = NETWORK_IDLE - audio/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 audio/video source found


HTML audio Tag Reference HTML Audio/Video DOM Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE