Correction of the displayed time

  Lo sentimos, este artículo está disponible en inglés

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

Inicio de sesión

Conectarse

Regístrate gratis

Inscríbete
Al registrarte, aceptas Condiciones del servicio
Iniciar sesión si tienes una cuenta.

Restaurar contraseña

Restaurar
¿Ha olvidado su correo electrónico? Contacte con nosotros