HTML Audio/Video DOM loadstart Event

❮ HTML Audio/Video DOM Reference

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);



Browser Support




Status







Technical Details

Type Description
Supported HTML tags: <audio> and <video>
Supported JavaScript objects: Audio, Video
❮ HTML Audio/Video DOM Reference