leref.ts
Version:
Something upcoming for aoi.js and npm packages uses
61 lines (60 loc) • 2.01 kB
TypeScript
import { TrackData, TrackInfo } from "../utils/rest";
export interface ITrack {
/** The title of the track */
title: string;
/** The identifier of the track */
identifier: string;
/** The author of the track */
author: string;
/** The duration of the track */
duration: number;
/** Whether the track is seekable */
isSeekable: boolean;
/** Whether the track is a stream */
isStream: boolean;
/** The url of the track */
url: string;
/** The source of the track */
source: string;
}
export declare class LerefTracking implements ITrack {
/** The base 64 encoded of track */
readonly base64: string;
/** The requester of the track if any */
readonly requester?: unknown;
title: string;
identifier: string;
author: string;
duration: number;
isSeekable: boolean;
isStream: boolean;
url: string;
source: string;
constructor(track: TrackData, requester?: unknown);
/** Check if obj is a valid Track */
static isTrack(obj: unknown): obj is LerefTracking;
/** Display thumbnail url if source is youtube */
displayThumbnail(size?: string): string | undefined;
/** Build TrackInfo into ITrack */
build(info: TrackInfo): void;
}
export declare class UnresolvedTrack {
/** Supposely the title of the track */
readonly title: string;
/** Supposably the author of the track */
readonly author?: string | undefined;
/** Supposably the duration of the track */
readonly duration?: number | undefined;
/** The requester of the track if any */
readonly requester?: unknown;
constructor(
/** Supposely the title of the track */
title: string,
/** Supposably the author of the track */
author?: string | undefined,
/** Supposably the duration of the track */
duration?: number | undefined,
/** The requester of the track if any */
requester?: unknown);
static isUnresolved(obj: unknown): obj is UnresolvedTrack;
}