Options

jPlayer Jukebox is an add-on to jPlayer. It could be constructed as shown below and accepts all jPlayer options. Options specific to jPlayer Jukebox add-on can be specified using jukeboxOptions option.

// Initialize jPlayerJukebox
var jpjb = new jPlayerJukebox({
   'swfPath': '/js/jplayer', 
   'jukeboxOptions': {
      'position': 'float-bl',
      'className': 'ui-light ui-gradient'
   }
});

Summary

Option Description
jukeboxOptions.autoAdvance Determines whether to advance to the next track automatically once the current track finishes playing.
jukeboxOptions.className Classes to be added to the class attribute of element with id jplayer_jukebox_container.
jukeboxOptions.id ID attribute of the containing element where player will be added on the page.
jukeboxOptions.onInitComplete Initialization complete callback.
jukeboxOptions.playLink Determines whether to play media links.
jukeboxOptions.position Position of the player on the page.
jukeboxOptions.selectorParse Selector expression to match elements that contains links to songs.
jukeboxOptions.uiCover Determines whether to display cover art.
jukeboxOptions.uiRemove Determines whether to display remove button in the playlist for each media.
jukeboxOptions.viewState Visual state of the player.

Details

jukeboxOptions.autoAdvance
Determines whether to advance to the next track automatically once the current track finishes playing.

Type:
Boolean

Default:
true

jukeboxOptions.className
One or more space-separated classes to be added to the class attribute of element with id jplayer_jukebox_container.

Type:
String

Default:
'ui-light ui-gradient'

Classes that control appearance of the player are:

ui-dark Enables dark color scheme
ui-light Enables light color scheme
ui-gradient Enables gradients
ui-flat Enables flat appearance, disables gradients
ui-texture Enables texture

To add a texture, in addition to specifying ui-texture add the following code before the closing </head> tag.

<style type="text/css">
.jp-jukebox .jp-gui-texture {
  background: url(/path/to/images/texture.jpg);
}
</style>

jukeboxOptions.id
ID attribute of the containing element where player will be added on the page.

Type:
String

Default:
'jplayer_jukebox'

jukeboxOptions.onInitComplete
Initialization complete callback.

Type:
Function

Example:
Play first song in the playlist after the player has been initialized.

var jpjb = new jPlayerJukebox({
   'swfPath': '/js/jplayer', 
   'jukeboxOptions': {
      'onInitComplete': function(jpjb){
         // Play first song in the playlist
         jpjb.play(0);
      }
   }
});

jukeboxOptions.playLink
Determines whether to play media links.

Type:
Boolean

Default:
true

Version Since:
0.6.5

jukeboxOptions.position
Position of the player on the page.

Type:
String

Default:
'float-bl'

Available options are:

float-bl Floating appearance, bottom-left alignment
fixed-t Fixed appearance, top alignment
fixed-b Fixed appearance, bottom alignment

jukeboxOptions.selectorParse
Selector expression to match elements that contains links to songs.

Type:
String or Element

Default:
window.document

jukeboxOptions.uiCover
Determines whether to display cover art.

Type:
Boolean

Default:
false

jukeboxOptions.uiRemove
Determines whether to display remove button in the playlist for each media.

Type:
Boolean

Default:
true

jukeboxOptions.viewState
Visual state of the player.

Type:
String

Default:
'minimized'

Available options are:

minimized Minimized
maximized Maximized
hidden Hidden