Horje

How to Run "myFunction" when the video is ready to start playing - Video Example

Video Example.
index.html
Example: HTML
<video id="myVideo" width="320" height="176" controls oncanplaythrough="myFunction()">
  <source src="https://www.sample-videos.com/video321/flv/240/big_buck_bunny_240p_10mb.flv" type="video/mp4">
  <source src="https://www.sample-videos.com/video321/flv/240/big_buck_bunny_240p_10mb.flv" type="video/ogg">
  Your browser does not support HTML5 video.
</video>

<script>
function myFunction() {
  alert("Can play the video without buffering");
}
</script>

Output should be:

How to Run "myFunction" when the video is ready to start playing - Video Example




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