FORGE. Playlist

new Playlist(viewer, config)

A FORGE.Playlist is an object that represents a list of media.
Parameters:
Name Type Description
viewer FORGE.Viewer The FORGE.Viewer reference.
config AudioPlaylistConfig The playlist config object.
Source:

Extends

Members

(readonly) alive :boolean

Get the alive flag value of the object.
Type:
  • boolean
Inherited From:
Source:

autoPlay :boolean

Get and set the auto play state of the playlist.
Type:
  • boolean
Source:

(readonly) className :string

Get the class name of the object.
Type:
  • string
Inherited From:
Source:

data :*

Get and set any custom data you want to associate to this object.
Type:
  • *
Inherited From:
Source:

debug :boolean

Get and set the debug flag.
Type:
  • boolean
Inherited From:
Source:

(readonly) decoded :boolean

Get the decoded status of this playlist current track.
Type:
  • boolean
Source:

loop :boolean

Get and set the loop state of the playlist.
Type:
  • boolean
Source:

(readonly) name :string

Get the name of this playlist.
Type:
  • string
Source:

(readonly) onDestroy :FORGE.EventDispatcher

Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
Inherited From:
Source:

(readonly) onEnded :FORGE.EventDispatcher

Get the "onEnded" event FORGE.EventDispatcher of the playlist.
Type:
Source:

(readonly) onPause :FORGE.EventDispatcher

Get the "onPause" event FORGE.EventDispatcher of the playlist.
Type:
Source:

(readonly) onPlay :FORGE.EventDispatcher

Get the "onPlay" event FORGE.EventDispatcher of the playlist.
Type:
Source:

(readonly) onReady :FORGE.EventDispatcher

Get the "onReady" FORGE.EventDispatcher of the playlist.
Type:
Source:

(readonly) onResume :FORGE.EventDispatcher

Get the "onResume" event FORGE.EventDispatcher of the playlist.
Type:
Source:

(readonly) onStop :FORGE.EventDispatcher

Get the "onStop" event FORGE.EventDispatcher of the playlist.
Type:
Source:

(readonly) paused :boolean

Get the paused status of this playlist current track.
Type:
  • boolean
Source:

(readonly) playing :boolean

Get the playing status of this playlist current track.
Type:
  • boolean
Source:

(readonly) ready :boolean

Get the ready status of this playlist current track.
Type:
  • boolean
Source:

(readonly) tags :Array

Get the tags associated to this object.
Type:
  • Array
Inherited From:
Source:

(readonly) track :FORGE.PlaylistTrack

Get the current FORGE.PlaylistTrack of this playlist.
Type:
Source:

(readonly) tracks :Array.<string>

Get the list of tracks of this playlist.
Type:
  • Array.<string>
Source:

(readonly) uid :string

Get the uid of the object.
Type:
  • string
Inherited From:
Source:

volume :number

Get the playlist volume.
Type:
  • number
Source:

warning :boolean

Get and set the warning flag.
Type:
  • boolean
Inherited From:
Source:

Methods

destroy()

Destroy sequence
Overrides:
Source:

hasTracks() → {boolean}

Know if the playlist have any FORGE.PlaylistTrack.
Source:
Returns:
Returns true if the playlist has at least a FORGE.PlaylistTrack, false if not.
Type
boolean

log(value)

Basic log method, log a string in the console if debug is enabled.
Parameters:
Name Type Description
value * The value you want to log in the console.
Inherited From:
Source:

nextTrack()

Set the next FORGE.PlaylistTrack to be the current track. If the playlist is paused, keep the pause status of the playlist.
Source:

pause()

Pause the current track.
Source:

play(track, checkAutoPlayopt) → {FORGE.PlaylistTrack}

Play the current track or set a track to be the current one then play it.
Parameters:
Name Type Attributes Description
track FORGE.PlaylistTrack | string | number The track you want to play or its uid or its index, if undefined, play the current track.
checkAutoPlay boolean <optional>
Does the autoPlay status must be checked?
Source:
Returns:
Returns the playing track.
Type
FORGE.PlaylistTrack

previousTrack()

Set the previous FORGE.PlaylistTrack to be the current track. If the playlist is paused, keep the pause status of the playlist.
Source:

resume()

Resume the current track if it's paused.
Source:

stop()

Stop the current track.
Source:

warn(valuenullable)

Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name Type Attributes Description
value string | Object <nullable>
The value you want to warn in the console.
Inherited From:
Source:

FORGE. Playlist

Members
Methods