Open ashleahhill opened 6 years ago
Seems like a duplicate of #754. You should notice the actual error thrown is a big clue: Unrecognized feature: 'autoplay'
This error is thrown by youtube, not Plyr.
Phones rarely support autoplay with audio unless you mute it. This is being implemented for desktop browsers as well (Chrome 64 removed support for autoplay with audio unless you visited the domain and played media before). I would never use it, and haven't gotten this issue either.
Related links: https://developers.google.com/web/updates/2016/07/autoplay https://www.macrumors.com/2017/09/19/safari-11-released-macos-sierra-os-x-el-capitan/ https://venturebeat.com/2017/09/14/chrome-will-no-longer-autoplay-content-with-sound-in-january-2018/
@friday
I'm getting the Unrecognized feature: 'autoplay'
as a warning from the YouTube code on Chrome on my Mac, as well but plyr is, correctly, not treating that as an error.
Also, switching to Vimeo embed also causes plyr to throw an error but there's no Unrecognized feature: 'autoplay'
warning happening there.
Expected behaviour
You should be able to setup Plyr using the markup for one kind of source, namely the HTML5
<video>
element, and switch to another type of source, namely YouTube usingplyr#source
method without raising an error onplyr#media
.Actual behaviour
In Chrome 64 on the Nexus 6P plyr is throwing an error when you load YouTube using
plyr#source
looking at the logs, it seems to happen where theloadeddata
,canplay
, andcanplaythrough
events should be thrown. The embed is successful and the video is playable.I also observed the same behavior on Plyr.io when switching to Vimeo. I have little experience working with Vimeo so I've concentrated on YouTube here.
This is an edge case, as this is a phone that could and should be updated to Android 8.0. My issue is mostly struggling to differentiate this ignorable error from another error that could be fatal. The way the error events are proxied, the only information that comes through is that an
error
type event was raised onplyr#container
.Update
I've tested on some other devices and I'm seeing plyr throw an error when I switch on devices running both 6.0.1 and 7.0.1
Environment
Players affected:
Steps to reproduce
plyr#source
to switch to a YouTube videoRelevant links
Logs
Log on Nexus 6P when switching to YouTube
Log with errors, switching to Vimeo on Nexus 6P
Log with no errors, from Chrome on Mac switching to YouTube