Audio/Video‎ > ‎

Autoplay

Summary

This policy controls when media (video and audio) is allowed to autoplay, and is designed to meet three primary goals:
  • Provide user control over what content can autoplay
  • Enable legitimate uses of autoplay without complicated workarounds
  • Make progress towards consistent policies across mobile and desktop platforms

Under the new policy media content will be allowed to autoplay under the following conditions:
  • The content is muted, or does not include any audio (video only)
  • The user tapped or clicked somewhere on the site during the browsing session
  • On mobile, if the site has been added to the Home Screen by the user
  • On desktop, if the user has frequently played media on the site, according to the Media Engagement Index

By default embedded IFrames will only be able to play muted or silent videos. However, if site owners wish for IFrames on their site to be able to play unmuted content, they may pass the autoplay permissions to the IFrame via the gesture=media attribute. This attribute allows any video contained in the IFrame to play as if it were hosted on the site.

For a more detailed design and rationale, please click here.


Autoplay blocking

Around the same time we will be making two additional changes related to autoplay that will make muted autoplay more reliable. These two changes will make it possible for sites and advertisers to use muted videos instead of animated .gifs, which in most cases will reduce overall bandwidth consumption.
  • Removing the block autoplay setting that is currently available on Chrome for Android
  • Removing autoplay blocking on mobile when data saver mode is enabled

Developer Recommendations

  • Use autoplay sparingly. Autoplay can be a powerful engagement tool, but it can also annoy users if undesired sound is played or they perceive unnecessary resource usage (e.g. data, battery) as the result of unwanted video playback. 
  • If you do want to use autoplay, consider starting with muted content and let the user unmute if they are interested in exploring more. This technique is being effectively used by numerous sites and social networks.
  • Unless there is a specific reason to do so, we recommend using the browser’s native controls for video and audio playback. This will ensure that autoplay policies are properly handled. 
  • If you are using custom media controls, ensure that your website functions properly when autoplay is not allowed. We recommend that you always look at the promise returned by the play function to see if it was rejected:

var promise = document.querySelector('video').play();

if (promise !== undefined) {

 promise.then(_ => {

   // Autoplay started!

 }).catch(error => {

   // Autoplay was prevented.

   // Show a "Play" button so that user can start playback.

 });

}


Release Schedule


September 2017

New autoplay policies announced

Site muting available in M63 Beta

Begin collecting Media Engagement Index (MEI) data in M62 Canary and Dev

October 2017

Site muting available in M63 Stable

Autoplay policies available in M63+ Canary and Dev

December 2017

Autoplay policies available in M64 Beta

January 2018

Autoplay policies available in M64 Stable



More information

Autoplay policy summary presentation

Autoplay design document

Media engagement index (MEI) design document



Comments