import type { Channel } from '../types'; /** * Extract EPG URL from M3U playlist header * M3U format: #EXTM3U url-tvg="http://example.com/epg.xml" * @param content - M3U playlist content as string * @returns EPG URL if found, undefined otherwise */ export declare function extractEPGUrlFromM3U(content: string): string | undefined; /** * Parse M3U playlist content into Channel array * @param content - M3U playlist content as string * @param providerId - ID of the provider this playlist belongs to * @returns Array of Channel objects * @throws Error if content is invalid or exceeds limits */ export declare function parseM3U(content: string, providerId: string): Channel[]; /** * Options for fetching M3U playlists */ export interface FetchM3UOptions { /** * Proxy URL for HTTP requests (useful for iOS which blocks HTTP fetch) * The proxy should accept a `url` query parameter * Example: https://web.visioo.online/api/proxy/m3u */ proxyUrl?: string; } /** * Fetch M3U playlist from URL and parse it * @param url - URL to fetch M3U playlist from * @param providerId - ID of the provider * @param options - Optional configuration (e.g., proxy URL) * @returns Object with channels and EPG URL (if found) * @throws Error if fetch fails or content is invalid */ export declare function fetchAndParseM3U(url: string, providerId: string, options?: FetchM3UOptions): Promise<{ channels: Channel[]; epgUrl?: string; }>; /** * Validate if a string is a valid M3U playlist * @param content - Content to validate * @returns true if valid M3U, false otherwise */ export declare function isValidM3U(content: string): boolean; //# sourceMappingURL=m3u.d.ts.map