Ensuring autoplay for videos and live streams in Clevercast

A question that we are asked very often is: “How do I make sure that my video player starts automatically?” We’ll try to answer this question here, and explain how you can turn on autoplay in Clevercast.
 

Why doesn’t my video start playing automatically in the browser?

The answer is simple: most browser builders have decided that video autoplay with sound is not appropriate behaviour. So in order to allow autoplay, you must ensure that both ‘autoplay’ and ‘muted’ are turned on for your player. This will cause your video stream to play automatically on desktop browsers without sound. This works for both live and on-demand video.

Microsoft Edge is currently the only exception. By default, Edge still allows you to autoplay videos with sound. However, users can decide to adjust their settings, both in general and for certain sites.

Note: autoplay is rarely ever permitted for mobile devices. In general, mobile viewers will always have to press the play button.

 

Is it impossible to do autoplay with sound on your site (desktop, cross-browser)?

Short answer: yes.

Long answer: the only exception depends on the behavior of each individual viewer on your website. It has nothing to do with the video player you choose, your player settings, the way of streaming… So it is beyond your control as a content owner.

Firefox allows autoplay with sound for users that have previously interacted with the domain (such as clicking or pressing buttons). Safari doesn’t allow unmuted autoplay anymore.

Google Chrome also keeps a so-called Media Engagement Index (MEI) which measures the extent to which the user plays video with sound on each site. This is the reason why Google Chrome will do autoplay with sound on some sites (eg YouTube) by default: “If you don’t have browsing history, Chrome allows autoplay for over 1,000 sites where we see that the highest percentage of visitors play media with sound. As you browse the web, that list changes as Chrome learns and enables autoplay on sites where you play media with sound during most of your visits, and disables it on sites where you don’t.”

But keep in mind that browsers can change their behaviour with every new upgrade. So even if unmuted autoplay works now in a browser, that doesn’t mean it will still work tomorrow. This may result in undefined behaviour in the player. We therefore strongly recommend to combine autoplay with muted.

 

How do I get a Clevercast player with autoplay and muted?

By default, Clevercast’s ‘Live Player’ now has ‘autoplay‘ and ‘muted‘ both turned on.

If your account was created before October 2021, this may not be the case.  But you can easily change the default behaviour by going to the ‘Live Player’ profile (through the Media > Players menu) and setting its ‘muted‘ property to ‘Yes’. Once you have done this, the embedded player for all events (or items) with this profile will automatically start playing in all browsers.

A player profile with muted and autoplay on

Note: the ‘Live Player’ profile doesn’t have a pause button by default. If you want the pause button to be available for live streams, you should set ‘Hide Pause Button‘ to ‘No‘ in the player profile.

For more info on using our player, see chapter 6 of our Clevercast Enterprise Manual.

 

Alternative: adding custom properties to your embed code

Instead of customizing the player profile, you can also add the properties ‘autoplay’ and ‘muted’ to the embed code you use. These will override the settings of the player profile. To do this, press the ‘Customize’ button before copying the embed code.

Generate a custom embed code for a live event

In the ‘Customize Embed Code’ dialog, uncheck ‘Use Player defaults’ and check the ‘Autoplay’ and ‘Muted’ properties. Then copy the resulting embed code to your website. This will always work, no matter which player profile you use.

Select autoplay and muted and copy the embed code

Note: you can also the Clevercast Player API to set autoplay and muted programmatically.