HTML5 inline video on iPhone vs iPad/Browser

Right,

I was going nowhere with this and filed a bug with Apple.

After a couple of weeks they got back to me saying, very simply, that I should add “webkit-playsinline” to the video tag on the HTML, as well as adding the “allowsInlineMediaPlayback” property on the UIWebView.

So in the end, this is what it looks like:

HTML

<video id="player" width="480" height="320" webkit-playsinline>

Obj-C

webview.allowsInlineMediaPlayback = YES;

And all works just fine 🙂

Hope this helps someone, as it’s virtually undocumented and the only place I could find a reference to “webkit-playsinline” was in the iAds reference, where it says: “iAds JS only”.

Leave a Comment