Queue
Overview
| Properties | Methods |
|---|---|
| current | add |
| duration | clear |
| size | remove |
| previous | shuffle |
| totalSize |
Properties
• current
The current track.
Type Value Track or UnresolvedTrack or null null
• duration
The total time of the queue.
Type number
• size
The size of tracks in the queue.
Type number
• previous
The past track.
Type number
• totalSize
The total size of tracks in the queue including the current track.
Type number
Methods
• add()
Adds a track to the queue.
Returns:
void
Parameter type track Track Optionaloffsetnumber
• clear()
Description Returns Clears the queue. void
• remove()
Removes a track from the queue. Defaults to the first track, returning the removed track, excluding the
currenttrack.Returns:
Track[]
Parameter type Optionalpositionnumber
• remove()
Removes an amount of tracks using a exclusive start and end exclusive index, returning the removed tracks, excluding the
currenttrack.Returns:
Track|UnresolvedTrack[]
Parameter type start number end number
• shuffle()
Description Returns Mixes the queue. void