When I open my website in Safari (desktop) my video usually starts automatically. I know in the past it already won't play automatic on iPad or iPhone but not on desktop.
It's like Safari set new rules. Is there a way to play the videos automatically? Because there is a website that I've found that still automatically play videos on their website on Safari.
Thanks in advance!
When I open my website in Safari (desktop) my video usually starts automatically. I know in the past it already won't play automatic on iPad or iPhone but not on desktop.
It's like Safari set new rules. Is there a way to play the videos automatically? Because there is a website that I've found that still automatically play videos on their website on Safari.
Thanks in advance!
Share Improve this question edited Aug 21, 2019 at 9:42 Pingolin 3,4177 gold badges27 silver badges43 bronze badges asked Mar 29, 2018 at 9:06 Sebbe77Sebbe77 1531 gold badge1 silver badge6 bronze badges 6 | Show 1 more comment3 Answers
Reset to default 5This can be circumvented using the following properties:
<video muted playsinline autoplay></video>
But autoplaying with the sound turned on is indeed not possible anymore. More information can be found on webkit.org.
I have Mojave and found a solution that worked for a site I use often.
One can go to the top bar menu:
Safari Preferences -> The 'Websites' (tab heading) -> Auto-Play (left side)
As the default websites Auto-Play
option is Stop Media with Sound
, this strategy introduced the permission issue.
Allow media from that site. One can turn it on at the bottom of that box for all sites.
There is a simpler way in the same menu next to Safari Prefrences, called 'Settings for This Website' -- it allows you to make that same setting, and a few others rather than having to poke around the rest of the Settings box.
Clearly that means a user has to allow it.
The site where I found a working example: https://support.shadowhealth.com/hc/en-us/articles/360009548313-Audio-issues-in-Safari
I did post the way to do it above so the site is not needed if they ever take it down, but they did do nice screen shots. I put it here for handy reference.
To deal with browsers who 'wander' to your location, you would need to provide a button to launch videos or audio clips.
This could be due to the fact that apple is blocking this add-on https://techcrunch.com/2017/06/05/auto-play-block/
document.getElementById('#video-element-id')
should not have a#
. Change todocument.getElementById('video-element-id')
. This is assuming that yourvideo
has theid
"video-element-id" – Turnip Commented Mar 29, 2018 at 9:22