UNPKG

unified-video-framework

Version:

Cross-platform video player framework supporting iOS, Android, Web, Smart TVs (Samsung/LG), Roku, and more

38 lines 1.25 kB
export interface YouTubeVideoInfo { videoId: string; title: string; duration: number; thumbnail: string; streamUrl: string; format: 'mp4' | 'webm'; } export declare class YouTubeExtractor { private static readonly YOUTUBE_REGEX; private static readonly YOUTUBE_NOEMBED_API; private static readonly YOUTUBE_API_ENDPOINT; static isYouTubeUrl(url: string): boolean; static extractVideoId(url: string): string | null; static getVideoMetadata(url: string): Promise<{ title: string; thumbnail: string; duration?: number; }>; static getEmbedUrl(videoId: string, showControls?: boolean): string; static getDirectStreamUrl(videoId: string, backendEndpoint?: string): Promise<string | null>; private static getFallbackStreamUrl; static prepareYouTubeSource(url: string, backendEndpoint?: string): Promise<{ url: string; type: string; title: string; thumbnail: string; duration: number | undefined; videoId: string; isYouTube: boolean; metadata: { source: string; videoId: string; }; }>; } export default YouTubeExtractor; //# sourceMappingURL=YouTubeExtractor.d.ts.map