使用jwplayer加载视频时出现错误"No playable source found"



现在我正在使用jwplayer,当我加载视频时,它会给我一个错误,比如"找不到可播放的源",这是我的代码

<html>
<head>
    <script type="text/javascript" src='http://content.jwplatform.com/libraries/DkwOvSfA.js'></script>
</head>
<body>
<div id="container">Loading the player...</div>
<script>
var playerInstance = jwplayer('container');
playerInstance.setup({
    file: 'https://testvideoout.s3.amazonaws.com/Videos/Streaming/mp4_Videos_29_1446555606635',
    image: "https://testvideoout.s3.amazonaws.com/Videos/Thumb/Thumb_Videos_29_1446555606635_00001.png",
    primary: 'flash',
    advertising: {
          client: 'vast',
          //tag: 'http://demo.jwplayer.com/static-tag/preroll.xml',
          schedule: {
                    adbreak1: {
                            offset: "pre",
                            tag: 'http://demo.jwplayer.com/static-tag/preroll.xml'
                    },
                    adbreak2: {
                            offset: 5,
                            tag: 'http://demo.jwplayer.com/static-tag/preroll.xml',
                            //type: 'nonlinear'
                    },
                    adbreak3: {
                            offset: 20,
                            tag: 'http://demo.jwplayer.com/static-tag/preroll.xml',
                            //type: 'nonlinear'
                    },
                    adbreak4: {
                            offset: 80,
                            tag: 'http://demo.jwplayer.com/static-tag/preroll.xml',
                            //type: 'nonlinear'
                    },
                    adbreak5: {
                            offset: "post",
                            tag: 'http://demo.jwplayer.com/static-tag/preroll.xml'
                    },
            }
    }
});
</script>
</body>
</html>

你可以检查文件和图像都在工作,但它给了我错误,有人能告诉我是什么问题吗?我试了很多次来解决这个问题,但我没有成功

JWPlayer在没有文件扩展名的情况下出现问题,因此必须添加type变量(在这种情况下,我会说它是type: "mp4":
var playerInstance = jwplayer('container');
playerInstance.setup({
    file: 'https://testvideoout.s3.amazonaws.com/Videos/Streaming/mp4_Videos_29_1446555606635',
    type: "mp4",
    ...
    ...

相关内容

  • 没有找到相关文章

最新更新