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:
HTML
the important part is the added attribute webkit-playsinline. It is required for iPads to be able to play videos inline in the browser.
Obj-C
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 https://stackoverflow.com/a/3767927/818732