Autoplay muted video iOS 11.2
Asked Answered
T

2

5

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 missed something. Autoplay is working, but trying to video.play() a muted inline video is not working anymore.

Toed answered 5/12, 2017 at 13:42 Comment(6)
support.apple.com/en-in/guide/safari/…Gentry
techcrunch.com/2017/06/05/auto-play-blockGentry
i think you got me wrong. apple disabled muted autoplaying of inline videos on safari on iOS 11.2, not safari on desktop. my macbook is still working correct.Toed
Well , have you checked second link ? **Apple adds auto-play video blocking to desktop Safari **Gentry
> Its coming to upcoming macOS High Sierra desktop OSGentry
yes i did, and i am still referring to iOS and not macOSToed
U
20

Just turn off the "Low Power Mode" ;)

Uncouple answered 10/1, 2018 at 23:47 Comment(4)
I've searching for the past two hours why my video would autoplay on the iOS simulator but not on my iPhone.. Turns out I had the Low Power Mode enabled. Thanks for the tip =)Paschall
Your tip helped me a lot. My web app needs autoplaying videos and it's triggered by user interaction so all is working fine in ios11 ...but when videos did not load and broke my UX on my girlfriend's phone. found out the cause i was using her phone while the phone is charging the battery and in ios11 while charging the phone automativally gets in "low power mode" hehe...thus blocking autoplay videos. Do you know a way to detect in javascript that the phone is either in "low power mode" or "has autoplay blocked" in the iphone settings so that I can display an explanaton message to users?Laticialaticiferous
Posted a question about this: #50401402Laticialaticiferous
Is there a way to detect low power mode and offer an alternative?Clingfish
W
13

Found a working solution thanks to the WebRTC repo (works in iOS 11.2.5):

Set the video's playsinline attribute to true.

References:

Withdraw answered 29/1, 2018 at 0:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.