Class

PlaylistItem

PlaylistItem(item, playlist)

Represents an item in a playlist - i.e. a map rotation. Provides a duration property but no start and end times - this is because they are sometimes not available internally, e.g. when building a RotatingPlaylist but before the start/end times have been calculated. Items for which this information is available should instead be created as instances of the child class ScheduledPlaylistItem.

Constructor

# new PlaylistItem(item, playlist)

Creates a playlist item (aka a 'map rotation').

Parameters:
Name Type Description
item object

data about this item

mapName string

name of the map for this item

mapDuration number

duration of this rotation in milliseconds

playlist Playlist

the parent playlist of this item

View Source classes/PlaylistItem.js, line 9

Members

number

# duration

Returns the duration of this map rotation in milliseconds.

View Source classes/PlaylistItem.js, line 44

boolean

# LTM Optional

Whether this item is from a playlist which is an LTM. The property only exists when its value is true.

View Source classes/PlaylistItem.js, line 57

string

# map

Returns the name of the map for this item (e.g. King's Canyon).

View Source classes/PlaylistItem.js, line 38

string

# mode

Returns the mode of the Playlist to which this item belongs (e.g. Play Apex, Ranked Leagues)

View Source classes/PlaylistItem.js, line 32

boolean

# ranked Optional

Whether the Playlist this item is from is ranked. The property only exists when its value is true.

View Source classes/PlaylistItem.js, line 46

string

# replaces Optional

When the item's parent Playlist is a 'takeover LTM'-type playlist, this property returns the name of the playlist this item replaces. This property only exists if the parent playlist has the replaces property.

View Source classes/PlaylistItem.js, line 77

boolean

# takeover Optional

Whether the playlist this item belongs to is a takeover LTM. This property only exists when its value is true.

View Source classes/PlaylistItem.js, line 67