Playlist
Immutable provider playlist. PluginData types its Songs’ pluginData and ListData the playlist’s own; both are
declared by the owning plugin, and core never reads them.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
PluginData |
unknown |
ListData |
unknown |
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Playlist<
PluginData,ListData>(data):Playlist<PluginData,ListData>
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data |
PlaylistData<PluginData, ListData> |
Returns
Section titled “Returns”Playlist<PluginData, ListData>
Properties
Section titled “Properties”
readonlyid:string
readonlyname:string
pluginData
Section titled “pluginData”
readonlypluginData:ListData
readonlysongs: readonlySong<PluginData>[]
source
Section titled “source”
readonlysource:string
thumbnails
Section titled “thumbnails”
readonlythumbnails: readonlyThumbnail[]
readonlyurl:string
Accessors
Section titled “Accessors”duration
Section titled “duration”Get Signature
Section titled “Get Signature”get duration():
number
Sum of Song durations in seconds; an unknown duration counts as 0.
Returns
Section titled “Returns”number
formattedDuration
Section titled “formattedDuration”Get Signature
Section titled “Get Signature”get formattedDuration():
string
Returns
Section titled “Returns”string
thumbnail
Section titled “thumbnail”Get Signature
Section titled “Get Signature”get thumbnail():
string|undefined
The best image: the last of thumbnails.
Returns
Section titled “Returns”string | undefined