HTML Audio/Video DOM loadstart Event
Example
//Accessing the element
var vid = document.getElementById("myVideo");
//Creating a function
vid.onloadstart = function() {
alert("Video loading started");
};
Meaning
The loadstart event run when the browser starts looking for the audio/video.
Standard Syntax
HTML:
<element onloadstart="myScript">
JavaScript:
object.onloadstart=function(){myScript};
JavaScript, using the addEventListener() method::
object.addEventListener("loadstart", myScript);
Advertisement