我有一个问题,当我尝试使用视频js的播放列表插件的例子:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Playlist Tester Perform</title>
<style type="text/css">
.video-js {
float: left;
margin: 15px;
width: 440px;
height: 280px;
}
.vjs-playlist {
width: 250px;
float: left;
margin: 15px;
}
</style>
</head>
<body>
<video id="myPlayerID"
data-account="3676484087001"
data-player="04ac0699-ca6b-449b-a2b6-0f14b4a7893b"
data-embed="default"
class="video-js" controls></video>
<ol class="vjs-playlist"></ol>
<script src="//players.brightcove.net/3676484087001/04ac0699-ca6b-449b-a2b6-0f14b4a7893b_default/index.min.js"></script>
<script type="text/javascript">
videojs('myPlayerID').ready(function () {
var myPlayer = this;
myPlayer.playlist([{
"sources": [{
"src": "http://solutions.brightcove.com/bcls/assets/videos/Sea_SeaHorse.mp4", "type": "video/mp4"
}],
"name": "Seahorse",
"thumbnail": "http://solutions.brightcove.com/bcls/assets/images/Sea_Seahorse_poster.png",
"poster": "http://solutions.brightcove.com/bcls/assets/images/Sea_Seahorse_poster.png"
}, {
"sources": [{
"src": "http://solutions.brightcove.com/bcls/assets/videos/Sea_Anemone.mp4", "type": "video/mp4"
}],
"name": "Sea Anemone",
"thumbnail": "http://solutions.brightcove.com/bcls/assets/images/Sea_Anemone_poster.png",
"poster": "http://solutions.brightcove.com/bcls/assets/images/Sea_Anemone_poster.png"
}, {
"sources": [{
"src": "http://solutions.brightcove.com/bcls/assets/videos/Tiger.mp4", "type": "video/mp4"
}],
"name": "Tiger",
"thumbnail": "http://solutions.brightcove.com/bcls/assets/images/Tiger_poster.png",
"poster": "http://solutions.brightcove.com/bcls/assets/images/Tiger_poster.png"
}, {
"sources": [{
"src": "http://solutions.brightcove.com/bcls/assets/videos/Sea_ClownFish.mp4", "type": "video/mp4"
}],
"name": "Clownfish",
"thumbnail": "http://solutions.brightcove.com/bcls/assets/images/Sea_ClownFish_poster.png",
"poster": "http://solutions.brightcove.com/bcls/assets/images/Sea_ClownFish_poster.png"
}, {
"sources": [{
"src": "http://solutions.brightcove.com/bcls/assets/videos/Sea_LionFish.mp4", "type": "video/mp4"
}],
"name": "Lionfish",
"thumbnail": "http://solutions.brightcove.com/bcls/assets/images/Sea_LionFish_poster.png",
"poster": "http://solutions.brightcove.com/bcls/assets/images/Sea_LionFish_poster.png"
}]);
});
</script>
</body>
</html>
当我改变视频链接到我的本地文件夹("src": "/files/convert/videos/38472531Test.mp4", "type": "video/mp4"),播放列表不会推进到下一个视频。我认为这是ffmpeg转换的问题,但我不确定。
PD:问题只在播放列表中而不是在播放
我刚刚遇到了同样的问题。我在我的工作,如果我设置视频文件的url为http://myip/path to video file
,而不是给它一个本地链接到文件,我开始自动播放。这是你的箱子吗?
我认为这是一个bug在播放列表插件,但它似乎工作作为一个变通在我的情况下。