Vimeo video autoplay not working in Safari 11: NotAllowedError

匿名 (未验证) 提交于 2019-12-03 02:59:02

问题:

Since the last Safari update to version 11, some videos stopped working. The worst is that sometimes, like once in five attempts, it works. I thought that the reason is my JS script that integrates Vimeo Player API but it ends up that even Vimeo's embed link doesn't work at all.

So, when you open embed video in Safari 11 it won't start and it blocks completely. You can see it by opening i.e. https://player.vimeo.com/video/XXXXXXXX?autoplay=1

In console log you can get something like:

Unhandled Promise Rejection: NotAllowedError (DOM Exception 35): The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

回答1:

SOLUTION

Export your video again with no sound track at all.

The catch is that Safari 11 is blocking all videos autoplay if they have sound in it.

Even when video, like in my case, doesn't have sound level but it is exported with sound with no volume. You can see the sovolume icon in address bar:



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!