Class: playlist

osmplayer. playlist

This class creates the playlist functionality for the minplayer.

new playlist(context, options)

Parameters:
Name Type Description
context object The jQuery context.
options object This components options.

Extends

  • minplayer.display

Members

constructor

Reset the constructor.

nodes

The nodes within this playlist.

Methods

addNode(node)

Adds a new node to the playlist.
Parameters:
Name Type Description
node object The node that you would like to add to the playlist.

construct()

See:
  • minplayer.plugin#construct

defaultOptions(options)

Returns the default options for this plugin.
Parameters:
Name Type Description
options object The default options for this plugin.

load(page, loadIndex) → {boolean}

Loads a playlist.
Parameters:
Name Type Description
page integer The page to load.
loadIndex integer The index of the item to load.
Returns:
TRUE if loaded, FALSE if not.
Type
boolean

loadItem(index) → {boolean}

Loads a playlist node.
Parameters:
Name Type Description
index number The index of the item you would like to load.
Returns:
TRUE if loaded, FALSE if not.
Type
boolean

next() → {boolean}

Loads the next item.
Returns:
TRUE if loaded, FALSE if not.
Type
boolean

nextPage(loadIndex) → {boolean}

Loads the next page.
Parameters:
Name Type Description
loadIndex integer The index of the item to load.
Returns:
TRUE if loaded, FALSE if not.
Type
boolean

onAdded()

See:
  • minplayer.plugin.onAdded

prev() → {boolean}

Loads the previous item.
Returns:
TRUE if loaded, FALSE if not.
Type
boolean

prevPage(loadIndex) → {boolean}

Loads the previous page.
Parameters:
Name Type Description
loadIndex integer The index of the item to load.
Returns:
TRUE if loaded, FALSE if not.
Type
boolean

refreshScroll()

Refresh the scrollbar.

scrollTo(pos, relative)

Wrapper around the scroll scrollTo method.
Parameters:
Name Type Description
pos number The position you would like to set the list.
relative boolean If this is a relative position change.

set(playlist, loadIndex)

Sets the playlist.
Parameters:
Name Type Description
playlist object The playlist object.
loadIndex integer The index of the item to load.

setQueue()

Stores the current playlist state in the playqueue.