Easy Tutorial
❮ Met Win Settimeout Met Win Blur ❯

Video networkState Property

Video Object

Example

Get the current network state of the video:

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

x output result:

1  // The video is valid and has selected a resource, but is not using the network

Definition and Usage

The networkState property returns the current network status of the audio/video.


Browser Support

All major browsers support the networkState property.

Note: Internet Explorer 8 and earlier versions do not support this property.


Syntax

Return Value

Type Description
Number Represents the current network state of the audio/video element: 0 = NETWORK_EMPTY - The audio/video has not been initialized<br> 1 = NETWORK_IDLE - The audio/video is active and has selected a resource, but is not using the network<br> 2 = NETWORK_LOADING - The browser is downloading data<br> 3 = NETWORK_NO_SOURCE - No audio/video source found
❮ Met Win Settimeout Met Win Blur ❯