Plyr: "Playing" event not triggered when autoplaying Vimeo embed

Created on 8 Jun 2018  路  6Comments  路  Source: sampotts/plyr

On desktop, when initialising a Vimeo Plyr instance with autoplay: true (I have a placeholder img with the player only being initialised on click), it seems the "playing" event is not triggered and the "play" icon doesn't change to "pause". The video itself actually starts playing. The player needs to be clicked 2 times to be paused, with the expected functionality returning afterwards.

Thanks for your help!

Help Wanted Replicated

All 6 comments

Added the label "Help wanted". If this issue is important to you, then please help us out. We have a lot of users, but few contributors.

@friday I'm not sure the two issues are related, as in this case the video does play and the pause icon is not displayed, so it's the exact opposite. I will try to have a look.

Thank you!

I haven't looked deeply into either issue, so they may not be related, but in both cases the css "state" is wrong. The play and pause buttons are shown/hidden conditionally based on the existence of a class "plyr--paused" on the container element.

The fact that this is failing with autoplay, although in different ways, may be relevant to finding the issue (or it may not).

@friday further looking into this, it seems youtube doesn't actually autoplay the video. Furthermore, I had only tested in Chrome so far, in Safari neither Vimeo nor Youtube autoplay. So this seems related to the new autoplay policies, not sure if it can be "fixed", I might need to rethink my use of a custom placeholder image and have the player initialised from the get-to.

Actually just started looking at this. Since we can't fix the browser restrictions, we should make sure that this doesn't break the UI so it appears paused or playing when it's the opposite.

Also found a fix for this. It must never have been implemented, or Vimeo changed their events.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nam-co picture nam-co  路  4Comments

tomByrer picture tomByrer  路  3Comments

Generalomosco picture Generalomosco  路  3Comments

TheZoker picture TheZoker  路  4Comments

elliottcoe picture elliottcoe  路  4Comments