Is It Ever Acceptable To Autoplay A Video On A Web Page?

Since nearly its beginning, the web has included support for some form of visual media presentation. Originally, these capabilities were limited, and were expanded organically, with different browsers finding their own solutions to the problems around including still and video imagery on the web. The modern web has powerful features to support the presentation and manipulation of media, with several media-related APIs supporting various types of content. Generally, the media formats supported by a browser are entirely up to the browser's creators, which can complicate the work of a web developer.

  • In a recent article, our Knutsford web agency predicted video will continue to be one of the few leading website trends in 2017 Well over the past year, there still continues to be an increasing trend of businesses using autoplay video’s on their website homepage.
  • Automatically playing a video or audio on page load is probably one of the annoying things that a website can do to a user. So to deter websites from autoplaying audio and video, browsers have brought out new policies.

It seems increasingly that web content is being delivered in video form. That itself is hostile to some people. Some of us want the freedom to read (or scan quickly). But many of the providers of 'content' know they have little to provide, so they drag it out in video form, saving the actual information for the last 10% of the video (if ever!). Video must be relevant to your ad, relating to your product, service, or brand. Users should be in control of the video experience, on click for instance, both within ad copy or landing page. Videos cannot auto-play. Ability to pause and/or stop the video must be present. Video content must be suited for the targeted audience or query it is.

This guide provides an overview of the media file types, codecs, and algorithms that may comprise media used on the web. It also provides browser support information for various combinations of these, and suggestions for prioritization of formats, as well as which formats excel at specific types of content.

References

Images

Image file type and format guide
Covers support of image file types and content formats across the major web browsers, as well as providing basic information about each type: benefits, limitations, and use cases of interest to web designers and developers.
Image file types for web designers
Fundamental information about the various image file types that may be useful for web designers, including best practices and use cases for each type, and guidelines for choosing the right image file format for specific types of content.

Is It Ever Acceptable To Autoplay A Video On A Web Page Chrome

Web

Is It Ever Acceptable To Autoplay A Video On A Web Page Automatically

Media file types and codecs

Media containers (file types)
A guide to the file types that contain media data. Some are audio-specific, while others may be used for either audio or combined audiovisual content such as movies. Includes overviews of each of the file types supported by the major web browsers, along with browser support information and supported features.
Web audio codec guide
A guide to the audio codecs allowed for by the common media containers, as well as by the major browsers. Includes benefits, limitations, key specifications and capabilities, and use cases. It also covers each browser's support for using the codec in given containers.
Web video codec guide
This article provides basic information about the video codecs supported by the major browsers, as well as some that are not commonly supported but that you might still run into. It also covers codec capabilities, benefits, limitations, and browser support levels and restrictions.
The 'codecs' parameter in common media types
When specifying the MIME type describing a media format, you can provide details using the codecs parameter as part of the type string. This guide describes the format and possible values of the codecs parameter for the common media types.
Codecs used by WebRTC
WebRTC doesn't use a container, but instead streams the encoded media itself from peer to peer using MediaStreamTrack objects to represent each audio or video track. This guide discusses the codecs commonly used with WebRTC.

Guides

Concepts

Digital audio concepts
An introduction to how audio is converted into digital form and stored for use by computers. It explains basic concepts about how audio is sampled, as well as concepts such as sample rate, audio frames, and audio compression.
Digital video concepts
A guide to fundamental concepts involved with digital video as used on the web, including basics about color formats, chroma subsampling, how human perception influences video coding, and so forth.

Tutorials and how-tos

Learning: Video and audio content
This tutorial introduces and details the use of media on the web.
Handling media support issues in web content
In this guide, we look at how to build web content that maximizes quality or performance while providing the broadest possible compatibility, by choosing media formats wisely, and offering fallbacks and alternate formats where it would be helpful.

Other topics

Media Capabilities API
The Media Capabilities API lets you discover the encoding and decoding capabilities of the device your app or site is running on. This lets you make real-time decisions about what formats to use and when.

Automatically playing a video or audio on page load is probably one of the annoying things that a website can do to a user. A muted video is still probably okay, but any kind of autoplaying sound comes as more of a surprise to the user!

To deter websites from autoplaying audio and video, browsers have brought out new policies for them. In general, browsers will now block an autoplaying video or audio from playing. In addition, users can set their preferences as to which websites can be allowed to autoplay, and which cannot. Good news for end users, bad news for marketing guys.

Each browser has their own rules for autoplaying media, but more or less they are the same.

Autoplaying Rules for Google Chrome

  • A muted autoplay will be allowed to play.
  • An autoplay with sound is allowed only when the user has done some kind of gesture with the website before — click, tap etc.
  • On desktop, an autoplay with sound is also allowed when the the user's MEI (Media Engagement Index) for the website domain has crossed a certain limit. MEI is an indication that the user has previously played a media with sound on the website before, so its okay to autoplay the media in the current case.
    Chrome has some rules for calculating the MEI, like the the usage of media beforehand must be greater than 7 seconds, size of the video played beforehand must be greater than 200x140 px etc.
  • On mobiles, autoplaying with sound will always be allowed if the user has placed the website to their home screen.

You can check the MEI for your visited websites by entering chrome://media-engagement/ in Chrome's navigation bar.

Is it ever acceptable to autoplay a video on a web page automatically

The complete list and more information can be found on Autoplay Policy Changes for Google Chrome

Is It Ever Acceptable To Autoplay A Video On A Web Page Automatically

Autoplaying Rules for Safari

  • If the user had done some kind of interaction like click, touch, keypress then autoplaying is allowed.
  • If the user had not done some kind of interaction, then a muted video or video that has no audio tracks will be allowed to play. If the video gradually plays an audio, the video will be paused.
  • Autoplaying video caused due to the autoplay attribute will play only when they are visible in the viewport. They are paused if they are scrolled out of the viewport.
    Autoplaying video caused due to the play() method will keep on playing even if they are scrolled out of the viewport.

The complete set of rules can be found on New <video> Policies for iOS.

Autoplaying Rules for Firefox

  • Muted autoplay is always allowed.
  • Autplaying will never be allowed if no user interaction has been performed
  • An audible autoplay is allowed if the user has granted camera/microphone permissions

More information on Firefox 66 to block automatically playing audible video and audio.

Best Practices for Allowing Autoplay Media to Work Properly

Autoplaying rules for all browsers are somewhat similar :

  • Wait for the user to perform some kind of gesture before autoplaying. For example wait for the user to click somewhere, press a key, or scroll down the page. Then autoplay the media.
  • Videos can be autoplayed with sound muted. If the user gains interest he can unmute it himself.

The whole point is not to annoy or surprise the user.

Is It Ever Acceptable To Autoplay A Video On A Web Page Chrome

How to Know Autoplaying Was Blocked

Is It Ever Acceptable To Autoplay A Video On A Web Page Mla

  • If autoplay happened due to the play() method :

    The Promise returned by the media element's play method will throw an exception if autoplaying is blocked. You will then need to show the 'Play' button.

  • If autoplay happened due to the set autoplay attribute :

    There is no error thrown in this case. The video will just stop playing with proper controls still there and you don't need to do anything.