HTML Audio/Video DOM networkState Property

❮ Riferimento DOM audio/video HTML

Esempio

Ottieni lo stato di rete corrente del video:

var vid = document.getElementById("myVideo");
alert(vid.networkState);

Definizione e utilizzo

La proprietà networkState restituisce lo stato corrente della rete (attività) dell'audio/video.


Supporto browser

I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.

Property
networkState Yes 9.0 3.5 Yes Yes

Sintassi

audio|video.networkState

Valore di ritorno

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

❮ Riferimento DOM audio/video HTML