Why doesn’t autoplay work consistently on browsers?

Bitmovin Web player SDK provides autoplay configuration to allow playback to start automatically when a source is loaded. But this may not work in some cases when audio is also available and unmuted. For example when launching playback from new website domain without any user interaction with the web page. Using play() API to start the playback without user interaction with the web page may also lead to this behaviour.

This is due to auto-play policies of browsers. The main goal of these policies is to improve a user’s browsing experience by eliminating distractions and surprising media playbacks of unmuted content. Thus providing users with more control over the autoplay capabilities on individual websites.

For any app or service to successfully run an autoplay element, the video must either come without an audio track or with a muted attribute. The video element will automatically pause when and if the video becomes unmuted without user interaction or if the video is no longer onscreen.

Additional options are available in the respective website preferences pane to allow or disable autoplay, disable audio in general, or more. In addition to that, browsers have an automated approach, which decides if auto-play will be blocked for media elements with sound in general or if auto-play is disabled at all. For example, auto-play may be allowed if the playback from a specific website domain is already performed a few times earlier.

Please refer to this blogpost for details.