Correction of the displayed time

  抱歉,这篇文章有英文版

Hi! I have a task to build a custom video player. Here’s the idea: There’s a 40-minute video, but the player should show it as 30 minutes long. The video itself plays at normal speed, but the time counter (minutes/seconds) should run slower — meaning one “second” on the timer lasts a bit longer than a real second. Essentially, the video runs as usual, but the displayed time moves at a different pace.

We added a factor variable to adjust the display time in the player.

let player = new Playerjs({id:"player",file:"video.mp4",factor:0.75});

A value of 0.5 will display an hour's worth of content as half an hour. To turn 40 minutes into 30, the ratio would be 0.75 (30/40). This also works the other way around.


21.0.0
2025 © PlayerJS

登录

登录

免费注册

注册
注册即表示您同意服务条款
登录(如果您有帐户)

恢复密码

恢复
忘记电子邮件?联系我们