Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

148
Vistas
use handleSeeked() function in videojs

I'm using videojs to play videos on the site and I'm trying to create log on video streams but I have difficulty logging users seeking in videos. I need seek start and end time and it seems that the built in handleSeeked() function in videojs does the job but I can't get it to work. Does anybody know how to use this function?

Update

It seems that this question is about the same problem but the solutions aren't fully working and each one has a little problem.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I was able to get what I wanted with the following code but I had to handle everything on my own so if there's still a better way to do this I'd be happy if you could help me.

    var previousTime = 0,
    currentTime = 0,
    completeTime = 0,
    position = 0;

player.on('timeupdate', function () {
    previousTime = currentTime;
    currentTime = Math.floor(player.currentTime());

    // save 'position' so long as time is moving forward with each update
    if (previousTime < currentTime) {
        position = previousTime;
        console.log('pos',position)

        previousTime = currentTime;
        console.log('pre',previousTime)
    }
});

player.on('seeked', function () {
    completeTime = Math.floor(player.currentTime());
    console.log("User came from: " + position);
    console.log("User ended at: " + completeTime);
    position= Math.floor(player.currentTime())
});
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda