使用 jwplayer 加载视频时出现错误 "No playable source found"
getting error "No playable source found" while i load video with jwplayer
现在我正在使用 jwplayer,当我加载视频时出现 "No playable source found" 之类的错误,这是我的代码
<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",
...
...
现在我正在使用 jwplayer,当我加载视频时出现 "No playable source found" 之类的错误,这是我的代码
<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",
...
...