Song
Immutable provider-neutral identity and display fields.
PluginData is declared by the owning SourcePlugin; core stores the reference and never reads,
clones, freezes or interprets it.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
PluginData |
unknown |
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Song<
PluginData>(data):Song<PluginData>
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data |
SongData<PluginData> |
Returns
Section titled “Returns”Song<PluginData>
Properties
Section titled “Properties”ageRestricted?
Section titled “ageRestricted?”
readonlyoptionalageRestricted?:boolean
True when the provider marks the media for adults, false when it says it is not, absent when it did not say. Core never acts on it.
artist?
Section titled “artist?”
readonlyoptionalartist?:string
duration?
Section titled “duration?”
readonlyoptionalduration?:number
readonlyid:string
readonlyname:string
pluginData
Section titled “pluginData”
readonlypluginData:PluginData
source
Section titled “source”
readonlysource:string
thumbnails
Section titled “thumbnails”
readonlythumbnails: readonlyThumbnail[]
readonlyurl:string
Accessors
Section titled “Accessors”formattedDuration
Section titled “formattedDuration”Get Signature
Section titled “Get Signature”get formattedDuration():
string
h:mm:ss from one hour, otherwise m:ss; Live when no duration is known.
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