revision:
The onstalled attribute defines a script to run when the browser is trying to get media data, but data is not available.
The onstalled attribute is part of the event attributes and can be used on the following elements: <audio> and <video>.
<element onstalled="script"></element>
script: the script to be run on onstalled.
<video style="margin-left:3vw;" controls id="videoID"> <source src="../../pics/Wuzhen-20-10_03.mp4" type="video/mp4"> </video> <p class="spec" id="pep-1"></p> <script> document.getElementById("videoID").addEventListener("stalled", someFunc); function someFunc() { document.getElementById("pep-1").innerHTML = "Data of this media not available"; } someFunc(); </script>