Countdown To The End Of The HTML5 Video September 16, 2022 Post a Comment Can I make a countdown to the end of the HTML5 video? Solution 1: Listen to the timeupdate event fired by the video object and update the time remaining. Something like this should work: var video = document.getElementById('video'); video.addEventListener('timeupdate', updateCountdown); function updateCountdown() { var timeSpan = document.querySelector('#countdown span'); timeSpan.innerText = video.duration - video.currentTime; } Copy Solution 2: This should do the trick for youBaca JugaHow Can I Do A Countdown Timer With Html?Apply A Oil Paint/sketch Effect To A Photo Using JavascriptDiv Extends Beyond Wrapper Div countdown = video.duration - video.currentTime Copy See here for more details Share You may like these postsHow To Use Umd In Browser Without Any Additional DependenciesGoogle Org Chart Data Overflow Outside Of DivFixed Sidebar With Relative Height And Fluid Absolute TransitioningSelect Element Onmouseleave Event In Safari Post a Comment for "Countdown To The End Of The HTML5 Video"
Post a Comment for "Countdown To The End Of The HTML5 Video"