2012-06-20 115 views
0

我正在使用JW播放器嵌入我的視頻http://www.longtailvideo.com/players/ 我的視頻沒有在Ipad或Iphone上播放,我幾乎覺得HTML5視頻標籤有問題。視頻只是黑色。代碼嵌入在divJW播放器IPAD黑屏

<div id="jwplayer-1"></div>  
<script type="text/javascript"> 
     jwplayer('jwplayer-1').setup(
{"flashplayer":"<?php echo $jwplayer_folder; ?>/player.swf", 
"width":"550", 
"height":"500", 
"controlbar":"bottom", 
"icons":"true","playlist.position":"none","playlistsize":"180","repeat":"none", 
"shuffle":"false","bufferlength":"1", 
"smoothing":"true", 
"stretching":"uniform", 
"wmode":"opaque", 
"mute":"false", 
"volume":"90", 
"skin":"<?php echo $jwplayer_folder; ?>/skins/whotube.zip", 
"dock":"false", 
"autostart":"false", 
"file":"http://www.longtailvideo.com/jw/upload/bunny.mp4", 
"image":"<?php echo $image_slug; ?>", 
}); 
</script> 

一切工作的閃速結束精細它播放視頻上的任何正常的瀏覽器,但在iPad上的視頻也無法播放。我知道,因爲我使用此代碼的權利下的視頻和它的作品是不是編碼問題,或者什麼...

<video width="320" height="240" controls="controls"> 
<source src="<?php echo $video_slug ?>" type="video/mp4" /> 
<source src="movie.ogg" type="video/ogg" /> 
Your browser does not support the video tag. 
</video> 

任何想法或想法,我已經試過各種我想這大概是我正在塞汀方式在設置方法上使用JW播放器?

謝謝!

+0

宇都加載安裝()方法不正確的屬性,請查看我的答案以獲取正確的代碼。 –

回答

1

好吧,我現在明白你的問題,

下面的代碼似乎在iPad/iPhone上運行,Working Demo Here

這種方法支持Flash回退爲好,但主要起到HTML5視頻(前提是影片沒有編碼問題。)

現在,您可以使用PHP動態加載圖像,視頻,JW文件夾名稱等 如果你想徹底擺脫閃光燈的支持,請從模式節點
{ type: 'flash', src:'http://player.longtailvideo.com/player.swf'}!視頻播放iPad上

<script src="http://player.longtailvideo.com/jwplayer.js" type="text/javascript"></script>  

<p><div id="exampleHTML"></div></p> 

<script type="text/javascript"> 
jwplayer('exampleHTML').setup({ 
    height: 360, 
    image: "http://content.bitsontherun.com/thumbs/bkaovAYt-720.jpg", 
    levels: [ 
     { file: "http://content.bitsontherun.com/videos/bkaovAYt-injeKYZS.mp4", type:"video/mp4" }, 
     { file: "http://content.bitsontherun.com/videos/bkaovAYt-27m5HpIu.webm", type:"video/webm" } 
    ], 
    modes: [ 
     { type: 'html5' }, 
     { type: 'flash', src:'http://player.longtailvideo.com/player.swf'} 
    ], 
    width: 640 
}); 
</script>​ 

截圖: enter image description here 也請記住,有與JW HTML5播放器的限制,你可以找到他們here

+0

嘿感謝您花時間回覆。我的問題是,Jwplayer實施的HTML5視頻標籤無法正常工作...我爲示例提供的額外視頻標籤是爲了表明它在我自己使用視頻標籤時工作,因此我的視頻的編碼應該可以正常工作。 JW播放器再次沒有正確處理HTML5視頻標籤或其他東西。這是我的問題。感謝你的寶貴時間。 – Pengume

+0

嗨,明白了,我用更新後的jw嵌入代碼更新了答案,嘗試使用Php生成上面的代碼。 –

+0

非常感謝這麼多當我有機會生病嘗試它並報告回來! – Pengume