Queue
Control playback order, manipulate the queue, and react to track changes in Nuclear.
Queue API for Plugins
Core concepts
Queue structure
type Queue = {
items: QueueItem[]; // Ordered list of tracks
currentIndex: number; // Position of currently playing item (0-based)
};Queue items
type QueueItem = {
id: string; // UUID for this queue entry
track: Track; // Full track metadata
// Playback state
status: 'idle' | 'loading' | 'success' | 'error';
error?: string; // Error message if status is 'error'
// Metadata
addedAtIso: string; // ISO timestamp of when added
};Usage
Reference
Best practices
Last updated