Reputation: 6051
I have a simple modal dialog:
<iframe>
element is added.All is good in most browsers - video starts playing, except Safari 11.1.
Safari has new auto-play policy that requires explicit click and video element to start playing it: https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/
Is there some way to make it autoplay for dynamically added YouTube (or Vimeo) iframe?
Example YouTube iframe:
<iframe frameborder="0" allowfullscreen="" allow="autoplay; encrypted-media; fullscreen" src="https://www.youtube-nocookie.com/embed/20iMzRklHNU?rel=0&controls=0&showinfo=0&autoplay=1&enablejsapi=1"></iframe>
Upvotes: 0
Views: 7717
Reputation: 17631
Safari 11 now disables/blocks autoplay features. You have to manually go to the safari settings and Allow All Auto-Play.
Upvotes: 4