Playlist
new Playlist(player, data)
Parameter | Type | Optional | Description |
---|---|---|---|
player | Player | ❌ | The player |
data | PlaylistInitData | ❌ | The data |
Properties
public author: { name: string,url: string }
public description: string
public id: string
public player: Player
public rawPlaylist: any
public source: TrackSource
public thumbnail: string
public title: string
public tracks: Array<Track>
public type: 'playlist' | 'album'
public url: string
public durationFormatted: string
Formatted estimated duration of this playlist
public estimatedDuration: number
Estimated duration of this playlist
Methods
public [iterator](): Generator<Track, void, undefined>
public toJSON(withTracks?): PlaylistJSON
JSON representation of this playlist
Parameter | Type | Optional | Description |
---|---|---|---|
withTracks | boolean | ✅ | If it should build json with tracks |