clappr
clappr copied to clipboard
Handling new auto-play policy in Mac OS High Sierra and Chrome
Browser: Safari 11
OS: Mac OS High Sierra
Clappr Version: latest
Steps to reproduce:
Videos with audio won't play automatically in Safari on High Sierra anymore, see also https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/ Upcoming Versions of Chrome will also be more restrictive regarding the autoplay of videos: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
In Safari on High Sierra this currently results in Clappr preloading some HLS chunks, but not starting the playback. The big play button disappears though, so it isn't obvious for the user anymore that there's a video he can start, as he needs to hover the mouse over the player to see the media controls with the play button.
According to the documentation, in both browsers the play method returns a promise, which makes it possible for developers to determine if the autoplay was successful. Has this already been implemented in Clappr? I've tried to catch the PLAYBACK_ERROR and PLAYER_ERROR events, but they weren't fired. It would be great if the big play button wouldn't be removed when the autoplay fails and if there'd be a AUTPLAY_FAILED event we could listen to. Currently we'd have to try to workaround this by checking the playback with player.isPlaying().
It's not implemented yet, but we're already working on a solution for this.
Initially, we'll prevent autoplay from working when it's blocked by a browser policy, to prevent having inconsistencies on the UI state. Afterwards, we'll add some feedback (probably through an event) to allow the caller to take action.
Hi, has there been any progress with this or an ETA?
@eeggenberger the autoplay handling has been delayed, but I believe it will be released this week.
I'd clarify that "videos won't play automatically with sound anymore.
hey @towerz there's any place where we can track the development of this issue?
@rmueller actually, I asked @joaopaulovieira to work on this one. The previous prototype we had was unreliable, so we're reworking the solution. I'll check with him and give you a status update.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is there any progress on this issue?
Issue closed due to inactivity.