player.html icon indicating copy to clipboard operation
player.html copied to clipboard

Feature request - Show remaining time in player

Open blautob opened this issue 2 years ago • 1 comments

Hi,

i would like to fully switch from video-js to player.html but i have one problem. I would use a script that sort of works like a caption tool which (based on timing) shows certain things. All my data with the timecodes are structured that i have to rely on the elapsed time of the video.

In videojs i can get this info via my script via class="vjs-remaining-time-display" in player.html unfortunately only the elapsed time is shown. Anyway you can help me to get these numbers or add a setting that the user can choose what he wants to see?

Best regards!

blautob avatar Sep 29 '22 14:09 blautob

If you want to see the time remaining via a script you can access the video player directly:

const $player = document.querySelector('.player');
const remaining = $player.duration - $player.currentTime;
console.log(remaining);

player.html does support loading captions/subtitles for videos if you have your captions in .srt or .vtt files.

pseudosavant avatar Jan 03 '24 23:01 pseudosavant