How to play inline HTML5 video using Phonegap for Android 4.1.1

Viewed 1274

I'm trying to embed an MP4 video in an Android Phonegap 2.9.0 application using the HTML5 video tag.

The application will be used at an exhibition and the video has to be played back offline on the device. The video also can't be played back in the native player as the back button will be locked, which I think rules out the VideoPlayer plugin (http://simonmacdonald.blogspot.ca/2011/11/video-player-plugin-for-phonegap.html).

I have set the hardwareAccelerated attribute to true, which should work on Android 4.x devices (see http://simonmacdonald.blogspot.co.uk/2012/10/partial-support-for-video-tag-in.html). I successfully got a video embedded and played back as desired from a folder on the SD card on a Motorola Xoom tablet (Android 4.0.4).

I then wanted to recreate the same on an Archos 97 Titanium HD tablet (Android 4.1.1), which will be the device used in the exhibition. Using the same code as on the Xoom (just with the folder path adjusted according to the device) the Archos tablet plays only the sound and the video itself stays black, apart from a line of changing pixels in the top left corner. If I switch to fullscreen mode the video plays fine.

Also if I stream the same video from a web server it plays back fine embedded in webview - again using the same code.

So it seems like it can cope with the video format and encoding in webview, but for some reason it does not work from the internal (or external) SD card.

Has anyone come across a similar problem and is there any solution?

Is there a problem version 4.1.1 of Android or is this likely to be an issue with the device itself?

0 Answers
Related