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

273
Vistas
Is it possible to check how long someone has played the mp3 sound?

I need to check how long someone played the mp3 file, I read about the .buffored function, which allows you to check how many times where or when it was stopped, but you have some option to count the listening time of mp3

const myAudio = document.getElementById('my-audio');
const bufferedTimeRanges = myAudio.buffered;
<audio id="my-audio" controls src="music.mp3">
</audio>

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

0

const audio = document.querySelector('audio');

audio.ontimeupdate = (event) => {
  console.log('The currentTime attribute has been updated. Again.');
};

you can use the ontimeupdate event to receive currentTime information about the audio file. You can combine it with the onended event to count how many times the user ended the audio and you'll have the whole feature done.

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