Creating a video playerusing javascript but not working properly?

sorry i don’t know how to load my video in code pen so kindly use your video to test it and my problem is with volume and forward and backward buttons and if anybody know tell me how to create the proceess bar for my video player :slight_smile:codepen

video fires a progress event that you can call to update progress. According to the docs something like this will do the trick. The bar itself can just be a div with a fixed height and dynamic width.

myVideo.addEventListener('progress', function(event) {
  var percent = (event.loaded / event.total) * 100;
  myProgressDiv.style.width = percent + '%';
}, false);

thank you for this code i will analysis it and rebuild as per my convince :slight_smile: i wants learn a lot about this topic

can you please explain me some terms in this code
what is event.load and event.total
i they are video current time and total video length.

The link I provided gives the details of the event.

opps! sorry i got it :slight_smile: thank you.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.