Queue
You know the queues for Diablo or New World's servers on launch day? Pretty much the same thing but for songs.
Constructor
new Queue()
Properties
.current
The current track.
Type: Track
.previous
The previous track.
Type: Track
.size
The size of the queue.
Type: Number
.first
The first song in the queue.
Type: Track or 0
Methods
.add(track)
Adds a new track to the queue.
Parameter | Type | Description |
---|---|---|
track | Track | The track that will be added to the queue. |
Returns: Queue
Exemple
<Queue>.add(track);
.remove(index)
Retrieves all the players that are currently running on the node.
Parameter | Type | Description |
---|---|---|
index | Number | The number of the track that will be removed. |
Returns: Track
Exemple
<Queue>.remove(1)
.clear()
Clears the queue.
Returns: AutomataTrack
Exemple
<Queue>.clear()
.shuffle()
Shuffles the queue.
Returns: void
Exemple:
<Queue>.shuffle()