– wezzy 2011-01-31 18:27:56
在iPad的情況下,你應該使用HTML 5視頻標籤,並使用它的一個例子是:
<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>
我只用MP4擴展使用它,我的視頻是在H264編碼用於視頻的編解碼器和用於音頻編解碼器的AAC編解碼器。
在Android的,我使用的PhoneGap插件從GitHub稱爲Web意圖(https://github.com/phonegap/phonegap-plugins/tree/master/Android/WebIntent)使用量的例子是:
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 :(!!');}
);
資源:
http://diveintohtml5.info/(HTML5/ipad的/ iphone)
http://www.808.dk/?code-html-5-video(HTML5/ipad的/ iphone)
有一個plugin,它允許在Android上使用phonegap/cordova播放視頻。這對我的情況有很大的幫助。關於IOS + Phonegap - 它支持視頻標籤(與Android + phonegap不同)。
我試過,但它與SIGABRT崩潰<身體的onload = 「onBodyLoad()」> \t <視頻SRC = 「Cars2.m4v」> \t \t你的瀏覽器不支持視頻標籤 \t