4

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.

Matthias Braun
  • 32,039
  • 22
  • 142
  • 171
BitBender
  • 82
  • 1
  • 7

2 Answers2

20

Just turn off the "Low Power Mode" ;)

Maxime
  • 306
  • 2
  • 10
  • 1
    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 =) – brian Jan 18 '18 at 14:17
  • 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? – Mathieu May 17 '18 at 21:26
  • Posted a question about this: https://stackoverflow.com/questions/50400902/detect-if-ios11-device-is-in-low-power-mode-to-prevent-bad-ux-on-normally-correc – Mathieu May 17 '18 at 21:51
  • Is there a way to detect low power mode and offer an alternative? – Adam Tal Feb 14 '23 at 06:36
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:

nathan
  • 9,329
  • 4
  • 37
  • 51