I have created HTML using Axure SW. This includes some inbuilt videos. These all work fine as html docs however, when I use worklight to convert them to .apk files the videos do not play (with the exception of on my Samsung Galaxy note). How would I invoke the inbuilt video player?
1 Answers
Missing in your question: Worklight version, device models, used Android version, whether these are local or remote video files, the video files format (mp3, ogg, mp4, m4v, ...), any errors found in LogCat and even better - implementation snippets.
Possible causes for video to not work in Android:
Media file format: make sure you follow Google's guidelines: http://developer.android.com/guide/appendix/media-formats.html
File encoding, video compatibility in devices:
The Android Emulator is not good for testing video playback
Also some related questions:
Playing video from a server
This worked for me:
<video id="myVideo" controls="">
<source src="http://broken-links.com/tests/media/BigBuck.mp4"></source>
</video>
From the device
Note that here I created a "video" folder in my_app\common. This may not work on every device due to the above stated.
<video id="myVideo" autobuffer controls>
<source src="video/BigBuck.mp4" type="video/mp4"></source>
</video>
You could also use Cordova plug-ins to enable video playback. Unfortunately adding them requires some extra work which did not yet work for me...