sampotts / plyr

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

WebView Vimeo not play if volume unmuted #1445

Open n-eliseev opened 5 years ago

n-eliseev commented 5 years ago

In android webview, when i am muting it plays but when i am unmuting it pauses and not playing.

baderkhane commented 4 years ago

same here

deepansh96 commented 4 years ago

same here

fkaraer commented 3 years ago

Is there a solution for this bug? my problem is a little urgent. I haven't found the problem yet.

ajgagnon commented 3 years ago

You all are seeing this in Chrome, right?

ajgagnon commented 3 years ago

Found the solution. In plugins/vimeo.js, the iframe attributes should be changed from this:

autoplay,fullscreen,picture-in-picture

To this:

autoplay;fullscreen;picture-in-picture

According to Google's iframe delegation docs here:

https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#iframe

deepansh96 commented 3 years ago

@ajg

Found the solution. In plugins/vimeo.js, the iframe attributes should be changed from this:

autoplay,fullscreen,picture-in-picture

To this:

autoplay;fullscreen;picture-in-picture

According to Google's iframe delegation docs here:

https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#iframe

Have you tested it? Is it working? If yes, then can you also help with the Youtube plugin as well?

aneeskhan47 commented 3 years ago

Issue: if plyr or any other video player is used in website and video can’t be played by tapping on play ️icon typically it throws the following error in android logcat: play() can only be initiated by a user gesture, source: https://player.vimeo.com/api/player.js

Solution: add webViewSettings.setMediaPlaybackRequiresUserGesture(false); in your android code (where your webview code is)

@deepansh96 @n-eliseev @baderkhane

bestis commented 1 year ago

I find it puzzling that the same thing works in Chrome, but not in Android System WebView? Doesn't these Google documents should match both cases? It feels like that the permission delegation is not working on Android System WebView.

Is there like any explanation from Google why not?