问题
I am currently working on a page with videos on it. Since iOS 11.2, it seems they disabled autoplay muted inlineplaying completely without a user gesture.
Has anyone experienced this issue too?
This all wouldn't be such a mess if there would be a possibilty to check whether it is possible to playinline or not. But like this it results in a new hack by UA sniffing.
Edit: I have seen that i am have missed something. Autoplay is working, but trying to video.play() a muted inline video is not working anymore.
回答1:
Just turn off the "Low Power Mode" ;)
回答2:
Found a working solution thanks to the WebRTC repo (works in iOS 11.2.5
):
Set the video's playsinline
attribute to true
.
References:
- https://github.com/webrtc/samples/issues/929#issuecomment-330816567
- https://webkit.org/blog/6784/new-video-policies-for-ios/ (check the note about vendor prefixes)
来源:https://stackoverflow.com/questions/47655077/autoplay-muted-video-ios-11-2