Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

218
Visualizações
Detect when users click on buttons in Youtube bar

I'm sure this should to be quite easy, but I can't find the answer elsewhere...

I'm embedding a youtube (live) video on my domain through an iframe. I've managed to detect when the user clicks on the pause/play button using javascript events defined in onYouTubeIframeAPIReady. I'd like to detect when the user clicks on the speaker icon (sound muted/sound on), on the fullscreen button, and also when he/she clicks on the "go to youtube" button.

Is this posisble?

Thanks in advance for your help.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can utilize Youtube Embed API and hide standard controls with controls:0 option. Add your own controls with all callbacks/event handlers you need.

Best option — you can use Player Events and act accordingly. There is onStateChange available, so, you can detect and verify pause/unpause. Mute status can be verified too - you need to check muted status with isMuted() method constantly.

For Youtube button click I see this way to check - you can monitor window active state via visibilitychange and check iframe focus state to get video details (will not work in fullscreen I guess).

For fullscreen - fullscreenchange event. In coupe with current active (playing) video you can check exact embedded video where fullscreen was clicked. Im not sure about the situation when fullscreen was clicked before play button was clicked by user.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda