Autoplay on iOS10
by
James Duffell
Touted as the biggest release ever for Apple devices, iOS10 is packed full of new features & integrations, one I’m currently loving is the ability to have autoplaying videos.
This update appears to have slipped completely under the radar, with new <video> policies the line between desktop and mobile is becoming less and less apparent. The new policies coming into force with iOS10 will essentially mean that certain videos can autoplay without the need for a user gesture to act as a trigger (perfect for those slick background videos).
Hold your horses, don’t stop reading there, I said policies you can’t just go autoplaying any video content, so here’s what you need to know.
- Background videos (autoplay videos) – with the autoplay attribute will now do just that providing that they adhere to a few rules; the videos must not contain any audio and if they do the mute attribute should be applied. These elements will only start playing when they’re visible within the viewport.
- Inline videos (embedded videos) – with the playsinline attribute you can now have videos placed inline within your content autoplay, like in the past when you interact with the videos these will not jump into fullscreen mode.
A demo of a video background on iOS10
A demo of a video background on iOS9 falling back to an image