Advertisement
Home Open Editor ❯

HTML Audio/Video DOM progress Event

Example

//Accessing the element
var vid = document.getElementById("myVideo");

//Creating a function
vid.onprogress = function() {
    alert("The video is Downloading");
};

Try this code ❯

Meaning

The progress event run when the browser is downloading the audio/video.


Standard Syntax

HTML:

<element onprogress="myScript">

JavaScript:

object.onprogress=function(){myScript};

JavaScript, using the addEventListener() method::

object.addEventListener("progress", myScript);


Advertisement

Technical Details

Type Description
Supported HTML tags: <audio> and <video>
Supported JavaScript objects: Audio, Video
Home Open Editor ❯
Advertisement