UNPKG

newpipe-extractor-js

Version:
110 lines 5.24 kB
export { NewPipe } from './core/NewPipe'; export { Downloader, DefaultDownloader, Request, Response } from './core/Downloader'; export { StreamingService, ServiceInfo, LinkHandler } from './core/StreamingService'; export * from './types'; export { YoutubeService } from './services/youtube/YoutubeService'; export { YoutubeLinkHandler } from './services/youtube/YoutubeLinkHandler'; export { YoutubeSignatureDecryptor } from './services/youtube/YoutubeSignatureDecryptor'; export { DashManifestParser, DashManifest, DashRepresentation, DashAdaptationSet, DashSegmentTemplate } from './services/youtube/DashManifestParser'; export { PoTokenProvider, PoTokenRequest, PoTokenResponse, PoTokenCache, PoTokenContext, ContentBindingType, PoTokenError, PoTokenProviderRejectedRequest, getWebPoContentBinding, generateWebPoCacheSpec, WEBPO_CLIENTS } from './potoken/PoTokenProvider'; export { WebPoTokenProvider, AdvancedWebPoTokenProvider } from './potoken/WebPoTokenProvider'; export { PoTokenDirector, PoTokenDirectorOptions } from './potoken/PoTokenDirector'; import { NewPipe } from './core/NewPipe'; import { DefaultDownloader } from './core/Downloader'; import { YoutubeService } from './services/youtube/YoutubeService'; import { StreamInfo, Locale, SearchResult, AudioStream, VideoStream } from './types'; import { PoTokenDirectorOptions } from './potoken/PoTokenDirector'; export { extractVideoIdFromUrl, validateYouTubeUrl, getStreamQualityScore, findBestAudioFormat, findBestVideoFormat, isEncryptedFormat, getFormatCodecInfo } from './utils/StreamUtils'; export { parseCodecs, getCodecDescription, isHDRCodec, getOptimalContainer } from './utils/CodecUtils'; export { FormatSorter, FormatSorterPresets } from './utils/FormatSorter'; export { throttlingDecryptor } from './utils/ThrottlingDecryptor'; /** * Initialize NewPipe Extractor with default configuration */ export declare function initializeNewPipe(cookieJson?: any[], userAgent?: string, poTokenOptions?: PoTokenDirectorOptions): void; /** * Initialize NewPipe Extractor with enhanced PoToken configuration */ export declare function initializeNewPipeWithPoToken(options: { cookies?: any[]; userAgent?: string; poToken?: PoTokenDirectorOptions; }): void; /** * Extract stream information from a YouTube URL */ export declare function extractStreamInfo(url: string): Promise<StreamInfo>; /** * Search YouTube for videos, channels, and playlists */ export declare function searchYoutube(query: string, contentFilters?: string[], localization?: Locale): Promise<SearchResult>; /** * Get YouTube search suggestions for a query */ export declare function getYoutubeSearchSuggestions(query: string, localization?: Locale): Promise<string[]>; /** * Check if a URL is supported by any registered service */ export declare function isUrlSupported(url: string): boolean; /** * Get the best audio stream from stream info using enhanced quality scoring */ export declare function getBestAudioStream(streamInfo: StreamInfo): any; /** * Get the best video stream from stream info using enhanced quality scoring */ export declare function getBestVideoStream(streamInfo: StreamInfo): any; /** * Get all DASH streams from stream info (both audio and video) */ export declare function getDashStreams(streamInfo: StreamInfo): { audioStreams: AudioStream[]; videoStreams: VideoStream[]; videoOnlyStreams: VideoStream[]; }; /** * Check if StreamInfo contains DASH streams */ export declare function hasDashStreams(streamInfo: StreamInfo): boolean; /** * Get the best DASH audio stream (highest bitrate) */ export declare function getBestDashAudioStream(streamInfo: StreamInfo): AudioStream | null; /** * Get the best DASH video stream (highest resolution, then highest bitrate) */ export declare function getBestDashVideoStream(streamInfo: StreamInfo): VideoStream | null; /** * Parse DASH manifest from URL */ export declare function parseDashManifest(manifestUrl: string): Promise<any>; /** * Set preferred localization */ export declare function setPreferredLocalization(localization: Locale): void; /** * Set preferred content country */ export declare function setPreferredContentCountry(contentCountry: Locale): void; declare const _default: { initializeNewPipe: typeof initializeNewPipe; initializeNewPipeWithPoToken: typeof initializeNewPipeWithPoToken; extractStreamInfo: typeof extractStreamInfo; searchYoutube: typeof searchYoutube; getYoutubeSearchSuggestions: typeof getYoutubeSearchSuggestions; isUrlSupported: typeof isUrlSupported; getBestAudioStream: typeof getBestAudioStream; getBestVideoStream: typeof getBestVideoStream; getDashStreams: typeof getDashStreams; hasDashStreams: typeof hasDashStreams; getBestDashAudioStream: typeof getBestDashAudioStream; getBestDashVideoStream: typeof getBestDashVideoStream; parseDashManifest: typeof parseDashManifest; setPreferredLocalization: typeof setPreferredLocalization; setPreferredContentCountry: typeof setPreferredContentCountry; NewPipe: typeof NewPipe; DefaultDownloader: typeof DefaultDownloader; YoutubeService: typeof YoutubeService; }; export default _default; //# sourceMappingURL=index.d.ts.map