How to play HTML5 embedded video using Phonegap for Android 4.1.1

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

The application will be used at the exhibition, and the video should be played offline on the device. The video also cannot be played in the main player, since the back button will be blocked, which, I think, excludes the VideoPlayer plugin ( http://simonmacdonald.blogspot.ca/2011/11/video-player-plugin-for-phonegap.html )

I 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 received the embedded video and played it as desired from the folder on the SD card on the Motorola Xoom tablet (Android 4.0.4).

Then I wanted to recreate it on an Archos 97 Titanium HD tablet (Android 4.1.1), which will be used at the exhibition. Using the same code as on Xoom (only with the path to the folder configured in accordance with the device), the Archos tablet plays only sound, and the video itself remains black, except for the pixel line in the upper left corner. If I switch to full screen mode, the video plays normally.

Also, if I transmit the same video from a web server, it plays perfectly built in to webview - again using the same code.

Thus, it looks like it can handle the video format and encoding in webview, but for some reason it does not work with the internal (or external) SD card.

Has anyone encountered a similar problem and is there any solution?

Is there a problem with version 4.1.1 of Android, or could it be a problem with the device itself?

+4
source share

All Articles