Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Intervention change: allow autoplay of muted videos on mobile #23

@mounirlamouri

Description

@mounirlamouri

/CC @ojanvafai @foolip @avayvod @xxyzzzq @jernoble @padenot @hober

This isn't your usual intervention. This is actually an intervention relaxation but this is probably the right place to discuss about it because it is related to a common intervention.

The current status of the autoplay restrictions on mobile is that Chrome Android and Safari iOS both block autoplay. IE/Edge and Firefox Android do not as far as I know.

In a nutshell, both browsers require that a user gesture is being processed (ie. in JS stack) in order for a call to play() to be successful and the usage of the autoplay attribute will be ignored.

Chrome Android is going to introduce a change that will relax the autoplay intervention on mobile the following way:

  • videos marked as muted will be allowed to play without a user gesture;
  • videos marked as muted and with the autoplay attribute will start playing when they are visible (in the viewport);
  • when unmuting a video, if it did not receive a user gesture when playback started or when the mute change happened, volume will change but the video will pause.

Note that Chrome Android will disable this feature via a couple of settings.

The following minor changes could be added to the HTML specification:

  • when the autoplay attribute is checked to start playback when enough data is available, it should be said that the UA may wait for the element to be visible.
  • when the muted state is changed, the specification should allow the UA to pause the playback if playback is currently not allowed, following the same wording as the play() algorithm (step 1).

WDYT? :)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions