a432511 a432511 - 2 months ago 34
iOS Question

Phonegap iOS HTML5 Video Opens Player

I am using Phonegap with a very simple landing page:

<video playsinline autoplay muted loop id='bgvid'>
<source src='vid/localvid.mp4' type='video/mp4'>

The intent is to have the video playing in the background with some content overlayed on top. The video does indeed start playing, but on iOS it launches the native full screen video player rather than playing it in the div itself.

Any idea how to keep it from launching the native video player?



It actually takes two things and it DOES work on the iPhone:

Add this to config.xml <preference name="AllowInlineMediaPlayback" value="true" />

And in the HTML you must include webkit-playsinline

<video webkit-playsinline playsinline autoplay muted loop><source src='vid/vid.mp4' type='video/mp4'></video>