Skip to main content

addToQueue

Adds a track or array of tracks to the bottom of the prioritized queue.

tip

This works similarly to Spicetify.Platform.PlayerAPI.addToQueue but works silently, meaning no notification will be shown.

If you want default Spotify behavior, use Spicetify.Platform.PlayerAPI.addToQueue instead.

function addToQueue(uri: ContextTrack[]): Promise<void>;

Parameters

NameTypeDescription
uriContextTrack[]Array of tracks to add to queue.

Example

// Add current track to queue
const currentTrack = Spicetify.Player.data.item;

await Spicetify.addToQueue([currentTrack]);

// Add a track to queue
const trackUri = "spotify:track:4iV5W9uYEdYUVa79Axb7Rh";

await Spicetify.addToQueue([ { uri: trackUri } ]);