JavaScript Media Events

You are Here:

JavaScript Media Events

The following are the list of Media events available in JavaScript programming.

onabortOccurs when the user aborts the loading of video/audio.
oncanplayOccurs when a video/audio is ready to start playing.
oncanplaythroughOccurs when the browser can play the audio/video, and estimates that enough data has been loaded to play the audio/video up to its end without having to stop for further buffering of content.
ondurationchangeOccurs when the duration attribute of the audio/video has been updated.
onemptiedOccurs when the media has become empty.
onendedOccurs when playback or streaming has stopped because the end of the media was reached or because no further data is available.
onerrorOccurs when the media could not be loaded.
onloadeddataOccurs when the frame at the current playback position of the media has finished loading; often the first frame.
onloadedmetadataOccurs when the metadata of the media has been loaded.
onloadstartOccurs when the browser has started to load a media (resource).
onpauseOccurs when the audio/video is paused.
onplayOccurs when the audio/video has been started or is no longer paused.
onplayingOccurs when the audio/video is ready to start after having been paused or delayed due to lack of data.
onprogressOccurs periodically as the browser loads a image/video (resource).
onratechangeOccurs when the playing speed of the audio/video is changed.
onseekedOccurs when the current playback position has changed.
onseekingOccurs when the audio/video is seeking a new position.
onstalledOccurs when the browser is trying to fetch media data, but data is unexpectedly not forthcoming.
onsuspendOccurs when fetching the media data is stopped before it is completely loaded.
ontimeupdateOccurs when the time indicated by the currentTime attribute has been updated.
onvolumechangeOccurs each time the volume of a video/audio has been changed.
onwaitingOccurs when the video stops because of a temporary lack of data.


Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in JavaScript.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author