Packagecv.data
Classpublic class PlayListManager
InheritancePlayListManager Inheritance flash.events.EventDispatcher

The PlayListManager class handles the PlayList component of TempoLite. It will handle the parsing of the playlist file types. It also manages shuffling, and loading of single media items.



Public Properties
 PropertyDefined by
  autoStart : Boolean
Gets or sets whether media will play automatically once the playlist is loaded.
PlayListManager
  autoStartIndex : int
Gets or sets the index of the item that would play if autoStart is enabled.
PlayListManager
  list : PlayList
[read-only] Gets a reference to the PlayList
PlayListManager
  repeat : String
Gets or sets whether repeat is enabled, or which type of repeat is enabled.
PlayListManager
  shuffle : Boolean
Gets or sets whether shuffle is enabled or not.
PlayListManager
Public Methods
 MethodDefined by
  
PlayListManager
  
addItem(oItem:Object, nIdx:int = -1):void
Adds an item to the playlist.
PlayListManager
  
clear():void
Removes all items from the playlist and dispatches the TempoLite.NEW_PLAYLIST event.
PlayListManager
  
getNext():Object
Returns the next item in the playlist
PlayListManager
  
getPrevious():Object
Returns the previous item in the playlist
PlayListManager
  
load(s:String):void
Loads a playlist file to be used as a playlist
PlayListManager
  
loadSingle(oItem:Object):void
Creates a new playlist with a single item, the item passed in as a parameter.
PlayListManager
  
removeItem(idx:int = -1):void
Removes an item from the playlist.
PlayListManager
  
updateItemLength(idx:uint, n:Number):void
Updates the length or duration used for an Item in the playlist.
PlayListManager
  
updateItemTitle(idx:uint, strTitle:String):void
Updates the title used for an Item in the playlist.
PlayListManager
Events
 EventSummaryDefined by
   Dispatched when the playlist is cleared, a new playlist is loaded, or a single meida is loaded.PlayListManager
   Dispatched when ever an item is removed, or updated, or the entire list is updated PlayListManager
Property detail
autoStartproperty
autoStart:Boolean  [read-write]

Gets or sets whether media will play automatically once the playlist is loaded.

The default value is true.

Implementation
    public function get autoStart():Boolean
    public function set autoStart(value:Boolean):void
autoStartIndexproperty 
autoStartIndex:int  [read-write]

Gets or sets the index of the item that would play if autoStart is enabled.

The default value is 0.

Implementation
    public function get autoStartIndex():int
    public function set autoStartIndex(value:int):void
listproperty 
list:PlayList  [read-only]

Gets a reference to the PlayList

Implementation
    public function get list():PlayList
repeatproperty 
repeat:String  [read-write]

Gets or sets whether repeat is enabled, or which type of repeat is enabled. Accepted values are:

Implementation
    public function get repeat():String
    public function set repeat(value:String):void
shuffleproperty 
shuffle:Boolean  [read-write]

Gets or sets whether shuffle is enabled or not.

Implementation
    public function get shuffle():Boolean
    public function set shuffle(value:Boolean):void
Constructor detail
PlayListManager()constructor
public function PlayListManager()
Method detail
addItem()method
public function addItem(oItem:Object, nIdx:int = -1):void

Adds an item to the playlist. The index at which it is added can be specified but not required.

Parameters
oItem:Object — An Item object
 
nIdx:int (default = -1) — The index in which ot add the item at
clear()method 
public function clear():void

Removes all items from the playlist and dispatches the TempoLite.NEW_PLAYLIST event.

getNext()method 
public function getNext():Object

Returns the next item in the playlist

Returns
Object — The next Item object in the playlist
getPrevious()method 
public function getPrevious():Object

Returns the previous item in the playlist

Returns
Object — The previous Item object in the playlist
load()method 
public function load(s:String):void

Loads a playlist file to be used as a playlist

Parameters
s:String — The url to the playlist file
loadSingle()method 
public function loadSingle(oItem:Object):void

Creates a new playlist with a single item, the item passed in as a parameter. Also dispatches a TempoLite.NEW_PLAYLIST event.

Parameters
oItem:Object — An Item object, which will be the sole item in the playlist
removeItem()method 
public function removeItem(idx:int = -1):void

Removes an item from the playlist. If no index is specified, it removes the last item in the playlist.

Parameters
idx:int (default = -1) — The index of the item to be removed
updateItemLength()method 
public function updateItemLength(idx:uint, n:Number):void

Updates the length or duration used for an Item in the playlist. This is used in situations where the metadata has been loaded, and the correct duration is updated for the playlist display. Dispatches the TempoLite.REFRESH_PLAYLIST event.

Parameters
idx:uint — The index of the item to be updated
 
n:Number — The new length to be used
updateItemTitle()method 
public function updateItemTitle(idx:uint, strTitle:String):void

Updates the title used for an Item in the playlist. This is used in situations where the metadata has been loaded, and the correct title is updated for the playlist display. Dispatches the TempoLite.REFRESH_PLAYLIST event.

Parameters
idx:uint — The index of the item to be updated
 
strTitle:String — The new title to be used
Event detail
newPlaylistevent 
Event object type: flash.events.Event

Dispatched when the playlist is cleared, a new playlist is loaded, or a single meida is loaded.

refreshPlaylistevent  
Event object type: flash.events.Event

Dispatched when ever an item is removed, or updated, or the entire list is updated