This week's sponsor

Letters

Hundreds of text designs.


New Video Policies for iOS

Jer Noble on the WebKit blog:

Since before your sun burned hot in space and before your race was born, Safari on iOS has required a user gesture to play media in a <video> or <audio> element. When Safari first supported <video> in iPhoneOS 3, media data loaded only when the user interacted with the page. But with the goal of returning more control over media playback to web developers, we relaxed this restriction in iOS 8: Safari began honoring the preload="metadata" attribute, allowing <video> and <audio> elements to load enough media data to determine that media’s size, duration, and available tracks. For Safari in iOS 10, we are further relaxing this user gesture requirement for silent <video> elements.

There are a few new <video> policies in iOS 10, and the WebKit blog goes into great technical detail about what they all are. But for most users, there will be two main changes that you'll notice in iOS 10. The first is that iOS 10 will now support the ability to play videos automatically if they are silent. For example, some websites have a silent video background (e.g. The Life of Pi movie website), and others use it as an alternative to displaying GIFs. In iOS 10 these will be able to play automatically without a user interacting with it. It is important to note that this feature of automatic playback will only be triggered if a video has no audio tracks or is muted.

The second change is that on the iPhone, user-triggered video will not automatically enter full screen mode. Instead, videos will play inline, just as they do currently on the iPad and on Android. Full screen mode is still available, but a user will have to trigger that manually.

These may seem like small tweaks, but they are notable improvements to the video experience on Safari for iOS. The first brings the iPad and iPhone one step closer to the Mac/PC web experience, whilst the second is a recognition that iPhones have become large enough and powerful enough that it is entirely feasible that users may wish to view videos inline and continue browsing the webpage that has embedded the video.