Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140788

Js how to add time counter onclick event

$
0
0

I'm using a custom video player with html5. I already got the video lenght contained in custom fields, so it's easy for me to stamp the duration on the player screen.

I just need now to stamp a 00:00:00 (which stands for seconds, minutes and hours) which will start a progressive count as soon as I press play in the video player.

I suppose I should put the command within this line of code:

playButton.addEventListener("click",function(){if(video.paused==true){video.play();

...and then create another script which makes the 00:00:00 be influenced by the addEventListener, but I don't have enough knowledge to create it properly. Can you kindly help me doing it?


Viewing all articles
Browse latest Browse all 140788

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>