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

155
Vistas
Javascript: Detect mouse click vs video.play() OR use video.play() without triggering an event

I wan't to know if there is a modern way to detect how an event was triggered i.e. if it was a mouse click or was the code video.play() ran (With video of course being the result of a document.getElementById('video')). And if not is there a way to run video.play() without triggering an event (this seems unlikely but i'll take a shot at asking).

My issue is that i'm building a system to play videos in sync. So when I send a request to play a video and the other user receives that request it uses video.play() to play their video. Only problem is when video.play() fires on the receiving end it also triggers the event to send a request back to the original user to play the video which ends up sending two requests, this can easily turn into an infinite loop if a user clicks pause / play during this period.

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