import { UndiciRequestOptions } from "./utils"; export interface VideoInfoOptions { requestOptions?: UndiciRequestOptions; } export interface VideoFormat { /** * Used to check if stream was passed through `getFormats()`. */ __decoded?: boolean; itag?: number; /** * This will be `undefined`, if `getFormats()` is not called upon this. */ url: string; mimeType?: string; bitrate?: number; width?: number; height?: number; initRange?: { start: string; end: string; }; indexRange?: { start: string; end: string; }; lastModified?: string; contentLength?: string; quality?: string; fps?: number; qualityLabel?: string; projectionType?: string; averageBitrate?: number; approxDurationMs?: string; colorInfo?: { primaries: string; transferCharacteristics: string; matrixCoefficients: string; }; highReplication?: boolean; audioQuality?: string; audioSampleRate?: string; audioChannels?: number; loudnessDb?: number; targetDurationSec?: number; maxDvrDurationSec?: number; signatureCipher?: string; } export interface VideoStream { expiresInSeconds: string; formats: VideoFormat[]; adaptiveFormats: VideoFormat[]; dashManifestUrl?: string; hlsManifestUrl?: string; player?: { url: string; }; } export interface VideoInfo { title: string; id: string; url: string; shortDescription: string; description: string; channel: { name: string; id: string; url: string; subscribers: { pretty: string; }; icons: { url: string; width: number; height: number; }[]; }; duration: { lengthSec: string; }; thumbnails: { url: string; width: number; height: number; }[]; ratings: { likes: { text: string; pretty: string; }; dislikes: { text: string; pretty: string; }; }; views: { text: string; pretty: string; }; published: { text: string; pretty: string; }; uploaded: { text: string; }; keywords: string[]; isLive: boolean; isUnlisted: boolean; isFamilySafe: boolean; category: string; embed: { iframeUrl: string; flashUrl: string; height: number; width: number; flashSecureUrl: string; }; stream: VideoStream; } /** * Get full information about a YouTube video. */ export declare const videoInfo: (url: string, options?: VideoInfoOptions) => Promise; export default videoInfo;