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.
精彩评论