आप ऑनकैनप्ले . का उपयोग कर सकते हैं निम्नलिखित विशेषताओं के लिए विशेषता - <ऑडियो> , <एम्बेड>, <ऑब्जेक्ट> और <वीडियो>।
उदाहरण
<!DOCTYPE HTML>
<html>
<body>
<video width = "300" height = "200" controls oncanplay = "display()">
<source src = "/html5/foo.ogg" type = "video/ogg" />
<source src = "/html5/foo.mp4" type = "video/mp4" />
Your browser does not support the video element.
</video>
<script>
alert("I am ready to begin.");
</script>
</body>
</html>