开发者

How to disable jQuery.jplayer autoplay?

when i initialize the player like this:


$("#jquery_jplayer").jPlayer({
        ready: function () {
            this.element.jPlayer("setFil开发者_高级运维e", "/previews/cancion.mp3", "/previews/horse.ogg").jPlayer("play");
        },
        volume: 50,
        oggSupport: true
    })

is there any way to disable the autoplay?


Remove .jPlayer("play")


how about reading the manual:

http://www.happyworm.com/jquery/jplayer/latest/developer-guide.htm

to disable looping (repeat) i would try:

$("#jpId").jPlayer("onSoundComplete", function() {
  // Directly access this instance's jPlayer methods. (Does not support chaining.)
  this.stop(); 
});


.jPlayer("pause");

That's it. It worked for my project. Put that at the end of the function that plays the song. Not the function that loads the jplayer, but the track selecting function.

Cheers to those looking at this 6-7 years later. :) The others did help me come to this simple conclusive solution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜