Tryit<!DOCTYPE html><html><head><title>Wikitechy oncanplay attribute</title></head><body><videowidth="320"height="240"controlsoncanplay="onCanPlay()"><sourcesrc="hibiscus.mp4"type="video/mp4"></video><script>functiononCanPlay()
{
alert("Wikitechy Video Can Play Now!");
}
</script></body></html>
Code Explanation for oncanplay Attribute in HTML:
<video> tag is used to embed a video file in the HTML Document.
The oncanplay attribute is used to trigger an event when the video can be ready to play.
The JavaScript function oncanplay is used to display an alert message.
Output for oncanplay Attribute in HTML:
The output shows the video file can be played, so the alert message displayed as “Wikitechy Video Can Play Now!”.
html5 video canplaycan play vs canplaythroughjquery canplayhtml5 readystateoncanplaythroughhtml5 video canplaytypejquery video eventscan play bidefordhtml tutorialshtml editorhtml codehtml formhtmltutorialhtml colorhtml color codeshtml tablehtml imghtml5html code for websitehtml and csshtml programshtml websitefree html editorhtml5 tutorialwysiwyg html editorhtml tutorial pdfhtml converterphp tutorialhtml examplehtml tutorialcss tutorialhtml csshtml tagshtml basicscode htmlhtml onlinehtml mailtohtml langhtml tags list