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

80
Vistas
MediaElement tracking watch time

I've been searching for a comprehensive solution for this but i'm just unable to figure out something solid.

I have a table that tracks your current position in the video so you can pick up where you previously were. I also want to track the watch time to determine if a person watched it all the way through ( or at least 90% the way through ). Obviously, this will never be 100% perfect but I want it to actually be worth a damn.

My current idea is to have an array in javascript that is the length of the video duration and on timeupdate event set each second that has been played to 1 to mark it as watched. Then on end event check to see if that is greater than or equal to ~90% of the duration of the video. That should work if the user watches that long in one sitting and also ignore a user seeking forward to "trick" the video into being marked as watched.

Now, what about if they watch 25% of the video and then return the next day to finish the rest? Would it be a bad idea to serialize the aforementioned array to a string and store it in the SQL table? That way I can pull it on next visit and use it to persist the watch time? If not, what would be a better alternative?

about 4 years ago · Juan Pablo Isaza
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