Open jhakooz opened 5 years ago
I am having the same issue -- any update on this?
Proof of concept: I rewrote the change function and now autoplay works on iOS without having to re-click... though. Only for HTML5 audio files in this rendition, just to show that it should be a simple change for the dev and it does in fact fix the issue.
change: function change(input) { var _this2 = this;
var sources = input.sources,
type = input.type;
var _sources = _slicedToArray(sources, 1),
_sources$ = _sources[0],
_sources$$provider = _sources$.provider,
provider = _sources$$provider === void 0 ? providers.html5 : _sources$$provider,
src = _sources$.src;
$("audio source").attr({"src":src});
$("audio")[0].load();
$("audio")[0].play(); }`
hello guys, I have the same issue, changing source with all autoplay active on youtube should automatically play video on changing source
I ended using video.js with playlist plugin it works perfectly.
It looks like the same issue exists on the video element as well.
Expected behaviour
After initial "click to play" audio on iOS, changing the audio source and calling player.play() should not require an additional click to play.
Actual behaviour
After initial click to play on iOS, changing the audio source requires an additional click to play. *** Pretty sure this is because iOS now requires the user to click to play audio for each element on the page. Since Plyr is re-creating the audio element, iOS treats it as a new element and requires a new "click".
Can Plyr change the source of the audio element without re-creating it? Seems like this would fix the issue.
Steps to reproduce
Environment
iPad / iPhone
Console errors (if any)
Link to where the bug is happening
Simple CodePen showing the issue: https://codepen.io/anon/pen/xMLNGj
This is a link describing the "New" iOS AutoPlay Policies. See section: Developer recommendations from Safari https://bitmovin.com/play-not-play-new-autoplay-policies-safari-11-chrome-64/