2016-02-02 15 views
1

創建一個將Scene7視頻注入到JWPlayer腳本的應用程序,但它顯示JWPlayer無法播放視頻URL,儘管URL本身直接鏈接到視頻,這可能可能是因爲Scene7是不是給我的MP4等結尾的視頻網址有效的Adobe Scene7 URL產生'Error loading player:No playable sources found'

下面是相關的代碼片段:

<script src="https://jwpsrv.com/library/6qcWCLNWEeS4Ig4AfQhyIQ.js"></script><div id="jwplayer_gK8G1wBJrmNLGlA">Loading the player...</div><script type="text/javascript">jwplayer('jwplayer_gK8G1wBJrmNLGlA').setup({ 
 
"sources": [ 
 
{ 
 
"file": "https://sonyglobal.scene7.com/is/content/gwtvid/MDR-100AAP_Lifestyle-Video_1280x720_2000K", 
 
"label": "sd" 
 
}, 
 
{ 
 
"file": "https://sonyglobal.scene7.com/is/content/gwtvid/MDR-100AAP_Lifestyle-Video_1280x720_2000K", 
 
"label": "hd" 
 
}, 
 
{ 
 
"file": "https://sonyglobal.scene7.com/is/content/gwtvid/MDR-100AAP_Lifestyle-Video_1280x720_2000K", 
 
"label": "hls" 
 
}, 
 
{ 
 
"file": "https://sonyglobal.scene7.com/is/content/gwtvid/MDR-100AAP_Lifestyle-Video_1280x720_2000K", 
 
"label": "mobile" 
 
} 
 
], 
 
"width": 640, 
 
"height": 360 
 
});</script>

任何想法,爲什麼牛逼他不工作?如果這是由於沒有文件擴展名。有沒有辦法在Adobe Scene7上顯示它?

感謝, 查理

回答

2

如果你知道你的文件是支持的格式,你可以使用類型的配置選項強制玩家識別該文件作爲該格式的。有關更多信息,請參閱配置選項參考。

https://support.jwplayer.com/customer/portal/articles/1413113-configuration-options-reference

播放列表[]。來源[]。鍵入源的 介質類型。僅當文件屬性不包含可識別的文件擴展名時才需要(如mp4的.mp4)。媒體格式參考列出了所有支持的類型。

https://support.jwplayer.com/customer/portal/articles/1403635-media-format-reference

+0

嗨何超儀,我檢查你所說的話和鏈接,您給了我。我提醒我將視頻鏈接定義爲一種類型,因爲它沒有名稱中的文件擴展名。一個快速的「類型」:「.mp4」解決了它。謝謝你的幫助! :) –

相關問題