-
Notifications
You must be signed in to change notification settings - Fork 976
Autoplay and Browser Policies
In recent years, web browsers have set stricter policies regarding automatic video playback. In the past, autoplay was allowed in Desktop browsers but not allowed in mobile browsers (mainly to prevent unwanted data consumption over a mobile network connection), but the rules have changed and things are not that simple anymore.
Unfortunately, none of the HTML5 players in the market don't have full control on autoplay; The browser decides whether the video should play automatically or not. Note that in most environments, after a video is played, the next video can start automatically without the need for additional user interaction.
Our solution at the moment is as follows: When loading the page with a player, we will try to play the video. If this is not possible due to browser prevention, we will try to play the video again, but with the sound set to mute.
However, you can change the behavior of the player. but it needs to be done in each of the browsers (client). The options are as follows:
- When the browser does not allow autoplay with sound: The volume is forced to mute and the video plays without sound.
- When the browser allows autoplay: Video plays automatically with sound.
- When the browser prohibits autoplay: The browser prevents the video from playing, the video will not play until user interaction.