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

271
Visualizações
Plyr library: can't stop event propagation when multiple instances of plyr are on the same page

Expected behaviour : Having multiple instances of Plyr on the page, should be able to add a 'enterfullscreen' and 'exitfullscreen' event that fires when a specific instance's full screen button is clicked. - this works perfectly when only 1 instance of Plyr exists. using event.stopPropagation() / event.stopImmediatePropagation() should stop other instances from triggering.

Actual behaviour :

'enterfullscreen' successfully triggers , but also calls the custom 'exitfullscreen' event multiple times (even though still in full screen mode). The amount of extra unwanted triggers for 'exitfullscreen' pends where the element is in the DOM, it triggers each subsequent instance of plyr to 'exitfullscreen' event.

Console errors (if any) no errors

player[0].on('enterfullscreen', function(event) {
    alert('enter full screen');
    event.stopImmediatePropagation();
});
player[0].on('exitfullscreen', function(event) {
    alert('exit full screen');
    event.stopImmediatePropagation();
});

Link to where the bug is happening https://codepen.io/stewart-so-bold/pen/BammmoR

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