[Video Autoplay] not working in Safari 15.5

HI,
I can't make an autoload video playing on safari...
Settings seems corrects, it's probably a safari pb, but is there a workaround ?

Thanks.
autoload

Do you see any errors in the browser's console? Will it play if you click play on the video? If you can share a link that would be helpful as well.

You may be seeing autoplay being blocked altogether: Auto-Play Policy Changes for macOS | WebKit
Also see: Apple Developer Documentation

Thanks,
I check the promise and it seems that it's blocked !

But don't know where...
Bu not from the site settings.

You may want to do your local testing in a different browser, but make sure that the video plays as expected in Safari when hosted on your domain.

Works when click play on both domain and local.
Perhaps it works on your safari browser..

test_autoplay.hype.zip (56.9 KB)

Thanks.

Both options here autoplay for me. One change I would make for better mobile support is adding playsinline to your video tag:

<video width="600" height="400" playsinline controls autoplay muted>
 <source src="${resourcesFolderName}/test.mp4" type="video/mp4">
</video>

And then also checking the 'inline' checkbox for the regular Hype video element.

One thing that may encourage your browser to autoplay this content is to run a silent audio element in response to a user interaction prior to this autoplay. Browsers are trending towards this behavior:

  • Don't let media autoplay unless a user action has occurred related to media playback
  • Never let audio play unless it is in direct response to a click (it occurs immediately after some user action

So if you requires some action that actually plays a video or an audio file, the browser will trust that your intention is to receive media playback from that domain and will trust future autoplays.

1 Like

Thanks, I test with playsinline and none of my tests runs the autoplay :smiling_face_with_tear:
But now, I know it comes from my Mac (or Safari) !
I don't know what, but it's not a hype/code problem.

Common problems:

  • Running in low power mode
  • 'Never auto-play' set in the Website tab of Safari's Preferences set on either the page or 'when visiting other websites'
  • An extension getting in the way

Do any of these possibly apply?

2 Likes

Also, are you saying it works in other browsers?

Hi, Thanks all for helping me.

It's working with Firefox, Chrome (Brave).

  • Running in low power mode -> Full charged and plugged
  • 'Never auto-play' set in the Website tab of Safari's Preferences set on either the page or 'when visiting other websites' -> Set all sites to "Allways Allowed" and check tab preferences
  • An extension getting in the way -> Remove all plugins

Try to clean with Onyx and make a disk check... no way :smiling_face_with_tear:

Found !!!
Thanks for this advice : Running in low power mode :star_struck:

Battery was in "Low power mode" when plugged !

2 Likes

Glad we cracked the case... I do feel like this is an overaggressive power saving measure and has tons of unexpected consequences across a lot of websites (let alone your own development!).

Sure !
I don't know why this setting was on.
Now I understand why my mac had less power than usual ! :sweat_smile: