Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

269
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!