FORGE. PlaylistManager

new PlaylistManager(viewer)

The FORGE.PlaylistManager is an object that manages playlists of the project.
Parameters:
Name Type Description
viewer FORGE.Viewer FORGE.Viewer reference.
Source:
To Do:
  • previous/next playlist
  • real keepAudio to resume a "lost sound"
  • preload of all sounds

Extends

Members

(readonly) alive :boolean

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

(readonly) autoPlay :boolean

Get the auto play status of the current FORGE.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 current FORGE.Playlist.
Type:
  • boolean
Source:

(readonly) enabled :boolean

Get the enabled status of the playlists manager.
Type:
  • boolean
Source:

(readonly) loop :boolean

Get the loop status of the current FORGE.Playlist.
Type:
  • boolean
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) onEndedd :FORGE.EventDispatcher

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

(readonly) onPause :FORGE.EventDispatcher

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

(readonly) onPlay :FORGE.EventDispatcher

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

(readonly) onReady :FORGE.EventDispatcher

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

(readonly) onResume :FORGE.EventDispatcher

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

(readonly) onStop :FORGE.EventDispatcher

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

(readonly) paused :boolean

Get the pause status of current FORGE.Playlist.
Type:
  • boolean
Source:

(readonly) playing :boolean

Get the playing status of current FORGE.Playlist.
Type:
  • boolean
Source:

(readonly, nullable) playlist :FORGE.Playlist

Get the current playlist.
Type:
Source:

(readonly) playlists :Array.<FORGE.Playlist>

Get the playlists Array.
Type:
Source:

preload :boolean

Preload status of audio files.
Type:
  • boolean
Source:

(readonly) ready :boolean

Get the ready status of current FORGE.Playlist.
Type:
  • boolean
Source:

(readonly) tags :Array

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

(readonly) tracks :Array.<FORGE.Playlist>

Get the tracks Array.
Type:
Source:

(readonly) uid :string

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

volume :number

Get the playlist manager main volume.
Type:
  • number
Source:

warning :boolean

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

Methods

add(playlist)

Add a FORGE.Playlist to the playlist manager.
Parameters:
Name Type Description
playlist FORGE.Playlist The FORGE.Playlist you want to add.
Source:

addConfig(config)

Add a playlist config to the manager.
Parameters:
Name Type Description
config AudioPlaylistsConfig The config you want to add.
Source:

addTrack(track)

Add a FORGE.PlaylistTrack to the playlist manager.
Parameters:
Name Type Description
track FORGE.PlaylistTrack The FORGE.PlaylistTrack you want to add.
Source:

boot()

Boot sequence.
Source:

destroy()

Destroy sequence
Overrides:
Source:

hasPlaylists() → {boolean}

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

hasTracks() → {boolean}

Know if the project have any FORGE.PlaylistTrack.
Source:
Returns:
Returns true if the project 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 of the current FORGE.Playlist to be the current track.
If the playlist is paused, keep the pause status of the playlist.
Source:

pause()

Pause the current FORGE.Playlist.
Source:

play()

Stop the current FORGE.Playlist.
Source:

play(playlist, checkAutoPlayopt)

Play the current playlist or a specific one at a specific track.
Parameters:
Name Type Attributes Description
playlist FORGE.Playlist | string | number The FORGE.Playlist you want to play or its uid or its index.
checkAutoPlay boolean <optional>
Set to true if the autoPlay status of the playlist must be checked.
Source:

previousTrack()

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

resume()

Resume the current FORGE.Playlist.
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. PlaylistManager

Members
Methods