Audio networkState attribute
Example
Get the current network state of the audio:
var x = document.getElementById("myAudio").networkState;
x The output value is:
1 // the audio is available and the specified resource has been selected, but the network is not used
Try it »
Definition and Usage
The networkState attribute returns the current network state (activity) of the audio.
Browser support





All major browsers support the networkState attribute.
Note: Internet Explorer 8 or earlier browsers do not support this attribute.
Syntax
audioObject
.networkState
Return Value
| Type | Description |
|---|---|
| Numeric value |
Represents the current network state of the audio element: |
Audio object