leref.ts
Version:
Something upcoming for aoi.js and npm packages uses
25 lines (24 loc) • 1.25 kB
TypeScript
import { LerefTracking, UnresolvedTrack } from "./lerefTracking";
/** The player's queue, the `current` property is the currently playing track, think of the rest as the up-coming tracks */
export declare class LerefQueueSystem extends Array<LerefTracking | UnresolvedTrack> {
/** The current track */
current?: LerefTracking | UnresolvedTrack;
/** The previous track */
previous?: LerefTracking | UnresolvedTrack;
/** The total duration of the queue */
get duration(): number;
/** The total size of tracks in the queue including the current track */
get totalSize(): number;
/** The size of the tracks in the queue */
get size(): number;
/** Add some track to the queue */
add(tracks: (LerefTracking | UnresolvedTrack) | (LerefTracking | UnresolvedTrack)[], offset?: number): void;
/** Removes an amount of tracks using a exclusive start and end exclusive index, returning the removed tracks, EXCLUDING THE `current` TRACK */
remove(start: number, end?: number): (LerefTracking | UnresolvedTrack)[];
/** Clear the queue */
clear(): void;
/** Shuffle the queue */
shuffle(): void;
/** Progress to next song */
progress(): LerefTracking | UnresolvedTrack | undefined;
}