English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Die networkState-Eigenschaft gibt den aktuellen Status des Mediums auf dem Netzwerk an.
HTML Audio/Video DOM Reference Manual
Erfahren Sie den aktuellen Netzwerkstatus des Videos:
!DOCTYPE html <html> <head> <meta charset="utf-8"> <title>HTML Audio/Verwendung der video networkState-Eigenschaft-Grundlegende Anleitung(oldtoolbag.com)</title> </head> <body> <button onclick="getNWState()" type="button">Erfahren Sie den aktuellen Netzwerkstatus des Videos</button> <br> <video id="video1" controls="controls" autoplay="autoplay"> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Ihr Browser unterstützt keine HTML5 video Tag. </video> <script> myVid = document.getElementById("video"1; function getNWState() {" alert(myVid.networkState); } </script> </body> </html>Test and see ‹/›
The networkState property returns audio/Current network state of the video (active).
IEFirefoxOperaChromeSafari
All mainstream browsers support the networkState property.
Note:Internet Explorer 8 and earlier versions do not support this property.
audio|video.networkState
Type | Description |
---|---|
Number | Represents audio/Current network state of the video element:
|