autoplay
What is the autoplay attribute in HTML5?
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
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
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).
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, });
api.video video: You can set the player to autoplay in the url by adding #autoplay to the end of the player url.