Audio networkStateProperty
Examples
Get the current network state of the audio:
var x = document.getElementById("myAudio").networkState;
xThe output value is:
1 // The audio is available and the specified resource has been selected, but the network is not being used
Try it Yourself »
Definition and Usage
The networkState property returns the current network state (activity) of the audio.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the networkState property.
Note:Internet Explorer 8 or earlier browsers do not support this property.
Syntax
audioObject.networkState
Return Value
| Type | Description |
|---|---|
| Numeric value |
Represents the current network state of the audio element:
|
Audio Object Other Extensions