api.video

Features

Developers

Glossary

All things video.

Full glossary

autoplay

autoplay is an attribute commonly used in the HTML5 video tag. It tells the browser that the developers would like the video to play autoomatically when the webpage loads.

The actual implementation of autoplay is not as straightforward. We'll walk thorugh the options in order of ease of implementation:

general autoplay settings

  1. On mobile Chrome and Safari (and in most other browsers), videos will only autoplay when paired with the muted attribute. Of course, without audio, you might want to consider adding captions to your video.

  2. If a user has interacted with video on your website in the past, videos with autoplay set will play automatically with audio. Each browser has different criteria to make this occur. This is can hard to test, since once you interact with the page - you'll see the video autoplay.

api.video autoplay settings

  1. api.video player: You can set the 'force autoplay' attribute to true, and all videos viewed with this player will autoplay (they will be muted).

  2. Player SDK: Setting the autoplay attribute will result in the video playing as soon ias it is loaded. player.loadConfig({ id: "<VIDEO_ID>", autoplay: true, hideControls: true, });

  3. api.video video: You can set the player to autoplay in the url by adding #autoplay to the end of the player url.