import { AudioProxyOptions, StreamInfo, Environment } from './types'; declare global { interface Window { __TAURI__?: { tauri?: { convertFileSrc: (filePath: string) => string; invoke?: (command: string, args?: Record) => Promise; }; core?: { convertFileSrc: (filePath: string) => string; invoke?: (command: string, args?: Record) => Promise; }; }; electronAPI?: unknown; } } /** * Main client for processing audio URLs and managing proxy connections. * Automatically detects environment (Tauri/Electron/Web) and handles URL conversion. * * @example * ```typescript * const client = new AudioProxyClient({ * autoStartProxy: true, * fallbackToOriginal: true * }); * const playableUrl = await client.getPlayableUrl('https://example.com/audio.mp3'); * ``` */ export declare class AudioProxyClient { private options; private environment; private autoStartedServer; private telemetry; /** * Creates a new AudioProxyClient instance. * @param options - Configuration options for the client */ constructor(options?: AudioProxyOptions); private detectEnvironment; getEnvironment(): Environment; getProxyUrl(): string; private startProxyServer; isProxyAvailable(): Promise; private trackProxyCheck; /** * Checks if a URL can be played and gets stream information. * @param url - The audio URL to check * @returns Promise resolving to stream information including playability */ canPlayUrl(url: string): Promise; /** * Converts any audio URL to a playable URL, using proxy if needed. * This is the main method you'll use to process audio URLs. * * @param url - The original audio URL * @returns Promise resolving to a playable URL (may be proxied or converted) * @throws Error if proxy is unavailable and fallback is disabled * * @example * ```typescript * const playableUrl = await client.getPlayableUrl('https://example.com/audio.mp3'); * audioElement.src = playableUrl; * ``` */ getPlayableUrl(url: string): Promise; private isLocalFile; private handleLocalFile; private delay; /** * Stops the auto-started proxy server if it was started by this client. * Automatically called on process exit, but can be called manually for cleanup. * * @example * ```typescript * await client.stopProxyServer(); * ``` */ stopProxyServer(): Promise; } /** * Factory function to create an AudioProxyClient instance. * Convenient alternative to using `new AudioProxyClient()`. * * @param options - Configuration options for the client * @returns A new AudioProxyClient instance * * @example * ```typescript * const client = createAudioClient({ * autoStartProxy: true, * proxyUrl: 'http://localhost:3002' * }); * ``` */ export declare function createAudioClient(options?: AudioProxyOptions): AudioProxyClient; //# sourceMappingURL=client.d.ts.map