Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player events does not trigger any callbacks #940

Open
amrtaher1234 opened this issue Sep 4, 2022 · 1 comment
Open

Player events does not trigger any callbacks #940

amrtaher1234 opened this issue Sep 4, 2022 · 1 comment

Comments

@amrtaher1234
Copy link

Describe the bug
the player events like onPause and onPlay does not trigger anything, I tried to run such events on the provided stackblitz link provided in your README here https://stackblitz.com/edit/react-fpmwns?file=src%2FApp.js and still nothing happens
To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://stackblitz.com/edit/react-fpmwns?file=src%2FApp.js '
  2. Add to the <Plyr/> an event like :
<Plyr onPause={() => alert(1)} onPlay={() => console.log('playing')} />
  1. Click on play and pause the player, inspect the console ( nothing in the output and no alerts shown )

Expected behavior
The events should trigger the callbacks provided to them

Desktop (please complete the following information):

  • Window 10
  • Chrome
@realamirhe
Copy link
Collaborator

realamirhe commented Sep 4, 2022

Hey, @amrtaher1234 thanks for the report,
Plyr ecosystem overrides the actual video playing system, so the actual HTMLMediaElement won't work as expected.
You can use plyr [Standard Media Events](use https://github.com/sampotts/plyr#standard-media-events) instead.
take a look at our examples in the examples directory
and make sure you are using the latest release for your convention, the stackblitz you sent used the previous version.

We will change the link in the doc in near future, and all PRs are welcomed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants