jPlayer.org 上的文档似乎没有包含有关如何创建视频播放列表的任何内容,例如演示中的播放列表。如何使用 jPlayer 创建预定义的播放列表?
如果它有助于了解,我希望在我的网站上播放视频之前自动添加广告。
你可以看看他们演示页面的源代码。您将看到他们如何设置两个 jPlayerPlaylist 对象。
$(document).ready(function(){
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, [
{
title:"Big Buck Bunny Trailer",
artist:"Blender Foundation",
free:true,
m4v:"http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v",
ogv:"http://www.jplayer.org/video/ogv/Big_Buck_Bunny_Trailer.ogv",
webmv: "http://www.jplayer.org/video/webm/Big_Buck_Bunny_Trailer.webm",
poster:"http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png"
},
{
title:"Finding Nemo Teaser",
artist:"Pixar",
m4v: "http://www.jplayer.org/video/m4v/Finding_Nemo_Teaser.m4v",
ogv: "http://www.jplayer.org/video/ogv/Finding_Nemo_Teaser.ogv",
webmv: "http://www.jplayer.org/video/webm/Finding_Nemo_Teaser.webm",
poster: "http://www.jplayer.org/video/poster/Finding_Nemo_Teaser_640x352.png"
},
{
title:"Incredibles Teaser",
artist:"Pixar",
m4v: "http://www.jplayer.org/video/m4v/Incredibles_Teaser.m4v",
ogv: "http://www.jplayer.org/video/ogv/Incredibles_Teaser.ogv",
webmv: "http://www.jplayer.org/video/webm/Incredibles_Teaser.webm",
poster: "http://www.jplayer.org/video/poster/Incredibles_Teaser_640x272.png"
}
], {
swfPath: "../js",
supplied: "webmv, ogv, m4v"
});
......
)};