jplayer播放列表?

时间:2012-07-11 14:04:09

标签: java video playback jplayer playlist

jPlayer.org上的文档似乎没有包含有关如何创建视频播放列表的任何内容,例如演示为演示的播放列表。如何使用jPlayer创建预定义的播放列表?

如果知道有用,我希望在我的网站上播放视频之前自动添加广告。

1 个答案:

答案 0 :(得分:2)

您可以查看其demo page的源代码。您将看到他们如何设置两个jPlayer播放列表对象。

$(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"
});
......

)};