创建了一个将Scene7视频注入JWPlayer脚本的应用程序,但似乎JWPlayer无法播放视频网址,尽管网址本身直接链接到视频,这可能是因为Scene7没有给我一个以.mp4等结尾的视频网址。
下面是相关的代码片段:
<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的一侧?
谢谢你,查莉
发布于 2016-02-03 06:43:56
如果您知道文件采用的是受支持的格式,则可以使用类型配置选项强制播放机将文件识别为该格式。有关详细信息,请参阅配置选项参考。
https://support.jwplayer.com/customer/portal/articles/1413113-configuration-options-reference
Playlist[]。源的sources[].type媒体类型。仅当文件属性不包含可识别的文件扩展名(如mp4的.mp4 )时才需要。《媒体格式参考》列出了所有支持的类型。
https://support.jwplayer.com/customer/portal/articles/1403635-media-format-reference
https://stackoverflow.com/questions/35156312
复制相似问题