HTML Audio/Video DOM canplay Event
HTML Audio/Video DOM Reference
Example
Display a message when the video is ready to start playing:
myVid=document.getElementById("video1");
myVid.oncanplay=alert("Can start playing video");
Try it »
Definition and Usage
The canplay event occurs when the browser can start playing the specified audio/video.
While the audio/video is loading, the following events occur in order:
Browser support





All major browsers support the canplay event.
**Note:** Internet Explorer 8 and earlier versions do not support this event.
Syntax
In HTML: