Hey all the video is autoplaying when the audio is muted. This didn’t happen before - I understand that a new update block videos that autoplay and have sound…
So is there anyway to have an autoplaying video with sound?
Browsers are adding these restrictions for the sanity of site visitors. From that Safari article:
A note about the user gesture requirement: when we say that an action must have happened “as a result of a user gesture”, we mean that the JavaScript which resulted in the call to video.play() , for example, must have directly resulted from a handler for a touchend , click , doubleclick , or keydown event. So, button.addEventListener('click', () => { video.play(); }) would satisfy the user gesture requirement. video.addEventListener('canplaythrough', () => { video.play(); }) would not.
… meaning, your site visitor has to click something to play a video with audio.
My suggestion, if you want autoplaying video in the design, is to set it to muted. Then you can make another button to unmute it or play another version with audio.