这是我的jwplayer实例设置。我正在尝试将播放列表从源切换到source2,但是问题是质量标签未加载到第一个源上。在第一个剪辑结束并加载并启动了source2之后,我可以看到“质量”选择器。
playerInstance.setup({
width: "100%",
height : "100%",
playlist: [{
image: posterURL,
sources: sources,
}],
playbackRateControls: [0.5, 1, 1.5, 2]
});
var sources = [
{
file: ur_intro_1080,
type: "video/mp4",
label: "1080p",
},
{
file: url_intro_720,
type: "video/mp4",
label: "720p",
"default": "true",
},
{
file: url_intro_540,
type: "video/mp4",
label: "540p"
}
];
var sources2 = [
{
file: url_clip_1080,
type: "video/mp4",
label: "1080p",
tracks: [{
file: "thumbURL",
kind: "thumbnails"
}]
},
{
file: url_clip_720,
type: "video/mp4",
label: "720p",
"default": "true",
tracks: [{
file: "thumbURL",
kind: "thumbnails"
}]
},
{
file: url_clip_540,
type: "video/mp4",
title: movieTitle,
label: "540p",
tracks: [{
file: "thumbURL",
kind: "thumbnails"
}]
}
];
playerInstance.on('complete', function(){
playerInstance.load(sources2);
});
我尝试加载第二个源或仅放置一个播放列表数组,但问题仍然存在。我也检查过了,这不是CSS或皮肤问题。