sampotts / plyr

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

Youtube-/Vimeo-Video (also on https://plyr.io) cannot be played when opened in Androids Instagram In-App-Browser #1628

Open ClemensSchneider opened 4 years ago

ClemensSchneider commented 4 years ago

Hi there,

everything works fine on all browsers we tested on Android and iOS but now we came to an unexpected edge-case where video-playback of Youtube-videos fails: Say hello to the Instagram in-app browser on Android which states itself as Instagram 121 on Android 9 when using https://whatismybrowser.com:

image

To test if we did something wrong while integrating plyr into our project, we checked if https://plyr.io/#youtube is working - but unfortunately it isn't.. So this seems to be rooted somewhere in plyr itself or better the combination of YT/Vimeo and plyr, as the HTML5 demo video on plyr.io does work as expected while YT and Vimeo are not.

Is there anything that comes to your mind what could cause these issues and what might be a solution to it?

I'll try to attach a screen recording showcasing the issue.

We're on plyr@3.5.6.

Thanks for your work!

ClemensSchneider commented 4 years ago

To test this issue yourself, just send a message containing the link you want to test to a friend in the Instagram app. You're then able to open it.

ClemensSchneider commented 4 years ago

Here is a short screen-recording showcasing the isse using the Plyr demo-page: https://1drv.ms/v/s!ArHafmgt4Y1CkJw0L0WjYNefxqtlvQ?e=8SeJKe

andrewkng commented 4 years ago

Having the same exact issue.

oriolparicio commented 3 years ago

Any solution??

peckomingo commented 3 years ago

We have the same issue. I stumbled over it in our Sentry error monitoring logs. It says:

It reposts an "unhandled error": Non-Error exception captured with keys: currentTarget, detail, isTrusted, target

With the additional data:

{
   "currentTarget":"[object Window]",
   "detail":{
      "message":"The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.",
      "method":"play",
      "name":"NotAllowedError",
      "plyr":"[Object]"
   },
   "isTrusted":false,
   "target":"div.plyr.plyr--full-ui.plyr--video.plyr--vimeo.plyr--is-ios.plyr--is-touch.plyr--captions-enabled.plyr--loading.plyr--paused.plyr--stopped",
   "type":"error"
}
PWaddict commented 1 year ago

Hello!

Testing the https://plyr.io/ page on Instagram in-app browser (version 262) it doesn't play the videos from both YouTube & Vimeo. On Facebook in-app browser works fine. Tested on Android device.