如何在每首歌曲之前在jplayer播放列表中添加默认音乐[作为广告]

时间:2015-04-16 16:42:04

标签: jquery jplayer

我使用了jplayer插件并创建了一个播放列表 这一切都对我没问题, 但我想添加默认"声音"在播放播放列表中的每首歌曲之前(作为广告)

如何在播放播放列表中的每首歌曲之前告诉jplayer操作此默认歌曲 而且我想添加" Skip Add"链接以启用用户跳过此添加并指示他播放此歌[有些像youtube]

这是我的代码



$(document).ready(function () {
new jPlayerPlaylist({
          jPlayer: "#jquery_jplayer_1",
          cssSelectorAncestor: "#jp_container_1"
        }, [
          {
            title: "Cro Magnon Man",
            mp3: "http://www.jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3",
            oga: "http://www.jplayer.org/audio/ogg/TSP-01-Cro_magnon_man.ogg"
          },
          {
            title: "Your Face",
            mp3: "http://www.jplayer.org/audio/mp3/TSP-05-Your_face.mp3",
            oga: "http://www.jplayer.org/audio/ogg/TSP-05-Your_face.ogg"
          },
          {
            title: "Cyber Sonnet",
            mp3: "http://www.jplayer.org/audio/mp3/TSP-07-Cybersonnet.mp3",
            oga: "http://www.jplayer.org/audio/ogg/TSP-07-Cybersonnet.ogg"
          },
          {
            title: "Tempered Song",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-01-Tempered-song.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-01-Tempered-song.ogg"
          },
          {
            title: "Hidden",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-02-Hidden.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-02-Hidden.ogg"
          },
          {
            title: "Lentement",
            free: true,
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-03-Lentement.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-03-Lentement.ogg"
          },
          {
            title: "Lismore",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-04-Lismore.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-04-Lismore.ogg"
          },
          {
            title: "The Separation",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-05-The-separation.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-05-The-separation.ogg"
          },
          {
            title: "Beside Me",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-06-Beside-me.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-06-Beside-me.ogg"
          },
          {
            title: "Bubble",
            free: true,
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-07-Bubble.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-07-Bubble.ogg"
          },
          {
            title: "Stirring of a Fool",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-08-Stirring-of-a-fool.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-08-Stirring-of-a-fool.ogg"
          },
          {
            title: "Partir",
            free: true,
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-09-Partir.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-09-Partir.ogg"
          },
          {
            title: "Thin Ice",
            mp3: "http://www.jplayer.org/audio/mp3/Miaow-10-Thin-ice.mp3",
            oga: "http://www.jplayer.org/audio/ogg/Miaow-10-Thin-ice.ogg"
          }
        ], {
          swfPath: "../../dist/jplayer",
          supplied: "oga, mp3",
          wmode: "window",
          useStateClassSkin: true,
          autoBlur: false,
          smoothPlayBar: true,
          keyEnabled: true,
        });
  
  });
        




0 个答案:

没有答案