HTML DOM Video networkState Property
Example
Get the current network state of the video:
var x = document.getElementById("myVideo").networkState;
x output will be:
1 // The video is active and has selected a resource, but is not using the network
Definition and Usage
The networkState property returns the current network state of the audio/video.
Browser Support
The networkState property is supported in all major browsers.
Note: Internet Explorer 8 and earlier IE versions do not support this property.
Syntax
videoObject.networkState
Return Value
| Type | Description |
|---|---|
| Number | Represents the current network state of the audio/video element:
|
YouTip