2015-06-06 67 views
-5

以下是我的代碼,請幫助。無法在iOS上使用jwplayer播放mp4視頻

jwplayer("myElement").setup({ 
     playlist: [{ 
     sources: [{ 
      file: "rtmp://draco.streamingwizard.com/wizard/_definst_/demo/sample.mp4" 
     }], 
     image: "vtts/bbb-splash.png" 
     }], 
     width: 480, 
     height: 270, 
     type:"video/mp4" 
    }); 
+0

請提供更多信息。什麼是錯的,你試圖達到什麼目的。你有沒有看過谷歌的解決方案,如果是的話,你用什麼來編寫這段代碼?這個問題還不清楚。請提供更多信息。 –

+0

獲取錯誤,如...「Error loading player:No playable sources found」 – billa

+0

此代碼通常看起來不太好。請再次檢查,並檢查是否有加載文件的方式不同。請將詳細信息添加到問題本身... –

回答

2

您正在使用RTMP,它是一種Flash協議。任何移動設備上都沒有Flash。您需要爲移動設備提供HLS流或MP4後備廣告。

+0

請示例.. – billa

+0

http://support.jwplayer.com/customer/portal/articles/1710454-configuring-multiple-sources – MisterNeutron

+0

我試過了。但那些不能在iOS設備上工作...... – billa