sampotts / plyr

A simple HTML5, YouTube and Vimeo player
https://plyr.io
MIT License
26.37k stars 2.92k forks source link

Plyr PlayButton not working anymore #2189

Open Jessto86 opened 3 years ago

Jessto86 commented 3 years ago

Since today on this website the player isn't working in Google Chrome anymore. The controls are there and the video seems to be loading whenever I click the play button but it's not starting to play the video.

Any ideas how to solve that?

Will be really thankful for help.

Best regards, Jessica

meuhland commented 3 years ago

It is interesting to note that it doesn't seem to affect everybody... and for people being affected adding the site in chrome://settings/content/sound (in the Allow section) seems to fix it.

Ended up being an issue that was already resolved and updating (in this case vue-plyr) to use 3.6.7 fixed it nicely.

meuhland commented 3 years ago

@Jessto86 just curious are you using vue-plyr or something like that? Because they are cruely behind in terms of updates...

sakinobashi commented 3 years ago

EDIT

This was a severe case of PEBKAC. My issue was that I had some JS, a leftover from previous attempts at using libraries like Plyr, which was meant to implement an auto-pause feature. It added an event listener that paused all audio elements that were not the target of the event.

Removing this leftover JS made Plyr work as expected. My apologies if I wasted anyone's time with this. I'm leaving the original post just in case someone has a similar issue; if you find this to be polluting the discussion, feel free to delete it!

Original post

I'm having what seems to be the same issue. I'm trying to use Plyr as an audio player.

So it seems to work perfectly… Other than not playing the audio. The progress bar doesn't even move. Tested on a Mac (OS 10.15.7), on Safari 14.0.3 and Chrome 90.0.4430.212 (latest at the time of this post), using Plyr v3.6.8 from the CDN.

Any help would be greatly appreciated; finding a good JS audio player has been more difficult than I would have thought, and Plyr seems to be just what I was looking for so far.

ETA: Enabling debugging, I can see that a "pause" event is being fired immediately when I try to play a file.

On first click: [Log] event: loadeddata (plyr.js, line 1) [Log] event: canplay (plyr.js, line 1) [Log] event: canplaythrough (plyr.js, line 1) [Log] event: play (plyr.js, line 1) [Log] event: waiting (plyr.js, line 1) [Log] event: pause (plyr.js, line 1)

On all following clicks: [Log] event: play (plyr.js, line 1) [Log] event: waiting (plyr.js, line 1) [Log] event: pause (plyr.js, line 1)

I'm trying to figure out the issue and how to solve it, but I'm terrible at Javascript so this will take me a long time, if I ever make it…

(in case you didn't notice the edit on top: this was an issue with my implementation. Not a Plyr bug.)