clappr icon indicating copy to clipboard operation
clappr copied to clipboard

Handling new auto-play policy in Mac OS High Sierra and Chrome

Open eeggenberger opened this issue 7 years ago • 8 comments

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().

eeggenberger avatar Dec 19 '17 15:12 eeggenberger

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.

towerz avatar Dec 21 '17 18:12 towerz

Hi, has there been any progress with this or an ETA?

eeggenberger avatar Feb 19 '18 15:02 eeggenberger

@eeggenberger the autoplay handling has been delayed, but I believe it will be released this week.

towerz avatar Feb 21 '18 19:02 towerz

I'd clarify that "videos won't play automatically with sound anymore.

ocorso avatar Mar 06 '18 03:03 ocorso

hey @towerz there's any place where we can track the development of this issue?

rmueller avatar Apr 19 '18 13:04 rmueller

@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.

towerz avatar Apr 19 '18 14:04 towerz

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.

stale[bot] avatar Jun 18 '18 22:06 stale[bot]

Is there any progress on this issue?

eeggenberger avatar Jun 20 '18 09:06 eeggenberger

Issue closed due to inactivity.

leaofelipe avatar Nov 25 '22 00:11 leaofelipe