Horje

Example of HTML oncanplay Event Attribute

It will execute a JavaScript when a video is ready to start playing.
index.html
Example: HTML
 <script>
function myFunction() { alert("Can start playing video");
}
</script>
<video oncanplay="myFunction()"> 

Output should be:

Example of HTML oncanplay Event Attribute




Type :
html
Category :
Web Tutorial
Sub Category :
HTML Media Events Attribute
Uploaded by :
Admin