Class Playlist<PluginInfo>

Represents a playlist containing multiple tracks

Type Parameters

  • PluginInfo extends JsonObject = CommonPluginInfo

Constructors

Properties

name: string = "Unknown Playlist"

Name of the playlist

selectedTrack: number = -1

Index of the track that was selected (from URL)

tracks: Track<CommonUserData, CommonPluginInfo>[] = []

List of tracks in the playlist

pluginInfo: PluginInfo = ...

Additional info from plugins

duration: number = 0

Total duration of all tracks in milliseconds

formattedDuration: string = "00:00"

Formatted total duration string

Accessors

Methods

  • Get the selected track (if any)

    Returns undefined | Track<CommonUserData, CommonPluginInfo>

    The selected track or undefined if none/invalid