视频不完整只播放第一个视频,但无法播放第二个视频。我该如何播放第二个视频?
var playerInstance = jwplayer('myPlayer');
playerInstance.setup({
playlist: [
{
file: myvideo.mp4
}
],
autostart: true,
icons: false,
height: 340,
width: 680,
wmode: "transparent",
skin: 'roundster'
});
playerInstance.onComplete(function() {
jwplayer().load([
{
file: "myvideo1.mp4",
file: "myvideo2.mp4"
}
]);
jwplayer().play();
});
答案 0 :(得分:0)
当我在onComplete函数中只加载一个视频时,你的代码对我有用。要加载和播放多个视频,您需要创建一个播放列表。
https://support.jwplayer.com/customer/portal/articles/1413089-javascript-api-reference#playlist