Collin Price Collin Price - 4 months ago 8x
Android Question

Is it possible to avoid the native video players on mobile devices?

I am trying to play video through a webview on my Android and iPhone device. I would like the video to play and have some text displayed below it. Is it possible for me to play a video and not have the device switch into full-screen mode?

I am using the video tag in HTML5. My target platforms are iOS 5 and Android 2.1.


android does not support inline-html5-video before version 3.1 - no chance before that. iOS 4+ does support it when you add this:


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

the important part is the added attribute webkit-playsinline. It is required for iPads to be able to play videos inline in the browser.


webview.allowsInlineMediaPlayback = YES;

The Obj-C code is required for iPhone/iPod. As of now they don't support inline video in the browser but with this line of code in your container-app it works in the webview

PS: copied the code-snippets from