views:

363

answers:

2

when i initialize the player like this:


$("#jquery_jplayer").jPlayer({
        ready: function () {
            this.element.jPlayer("setFile", "/previews/cancion.mp3", "/previews/horse.ogg").jPlayer("play");
        },
        volume: 50,
        oggSupport: true
    })


is there any way to disable the autoplay?

+1  A: 

Remove .jPlayer("play")

Dominic Barnes
And what about disabling looping?
Mr_Nizzle
I don't believe it does that by default... or does it?
Dominic Barnes
yes it is set by default !
Mr_Nizzle
+1  A: 

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(); 
});
mkoryak
Great man (Y) very useful !
Mr_Nizzle