How can I display a video in a PhoneGap app for iPad ?
I can't find any reference.
In the Ipad's case you should use the html 5 video tag, and an example of its use is the following:
<video controls="controls" autoplay="autoplay">
<source src="yourVideo.mp4" type="video/mp4" />
<source src="yourVideo.webm" type="video/webm" />
<source src="yourVideo.ogv" type="video/ogg" />
</video>
I used it only with the mp4 extension, and my video was encoding with h264 codec for video and AAC codec for audio codec.
In the Android's, I used a Phonegap plugin from github called web Intent (https://github.com/phonegap/phonegap-plugins/tree/master/Android/WebIntent) a example of usage is:
window.plugins.webintent.startActivity({
action: WebIntent.ACTION_VIEW,
url: 'http"//yourVideo.mp4'},
function() {console.log('Is wirking :D!');},
function() {console.log('Failed to open the URL :( !!');}
);
resources:
http://diveintohtml5.info/ (html5/ipad/iphone)
http://www.808.dk/?code-html-5-video (html5/ipad/iphone)
http://smus.com/android-phonegap-plugins (Android)
A quick search of the PhoneGap API does not show any way to do so. However, a quick Google Search returns this, which suggests simply using the HTML video tag.
There is a plugin, which allows playing video with phonegap/cordova on Android. It helped a lot in my case. About IOS + Phonegap - it supports video tag (unlike Android + phonegap).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With