UNPKG

kazagumo

Version:

A shoukaku wrapper with built-in queue support.

36 lines (35 loc) 1.18 kB
import { KazagumoTrack } from './KazagumoTrack'; import { KazagumoPlayer } from '../KazagumoPlayer'; export declare class KazagumoQueue extends Array<KazagumoTrack> { private readonly kazagumoPlayer; constructor(kazagumoPlayer: KazagumoPlayer); /** Get the size of queue */ get size(): number; /** Get the size of queue including current */ get totalSize(): number; /** Check if the queue is empty or not */ get isEmpty(): boolean; /** Get the queue's duration */ get durationLength(): number; /** Current playing track */ current: KazagumoTrack | undefined | null; /** Previous playing tracks */ previous: KazagumoTrack[]; /** * Add track(s) to the queue * @param track KazagumoTrack to add * @returns KazagumoQueue */ add(track: KazagumoTrack | KazagumoTrack[]): KazagumoQueue; /** * Remove track from the queue * @param position Position of the track * @returns KazagumoQueue */ remove(position: number): KazagumoQueue; /** Shuffle the queue */ shuffle(): KazagumoQueue; /** Clear the queue */ clear(): KazagumoQueue; private emitChanges; }