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

Sign up

Sign up
By signing up, you agree to Terms of Service
Login if you have an account

Restore password

Restore
Forgot email? Contact us