import type { CompressOptions, ImageCompressOptions } from './BayutVideoCompressor.types'; export * from './BayutVideoCompressor.types'; /** * Compress a video with hardware-accelerated encoding. * * @param fileUrl - File URI of the video to compress * @param options - Compression options * @param onProgress - Optional progress callback (0.0 - 1.0) * @returns Promise resolving to the compressed file URI * * @example * ```ts * import { compress } from 'expo-image-and-video-compressor'; * * const result = await compress(videoUri, { * bitrate: 2_500_000, * maxSize: 1080, * codec: 'h264', * speed: 'ultrafast', * }, (progress) => { * console.log(`${Math.round(progress * 100)}%`); * }); * ``` */ export declare function compress(fileUrl: string, options?: CompressOptions, onProgress?: (progress: number) => void): Promise; /** * Compress an image file. * * @param fileUrl - File URI of the image to compress * @param options - Image compression options (maxWidth, maxHeight, quality) * @returns Promise resolving to the compressed file URI * * @example * ```ts * import { compressImage } from 'expo-image-and-video-compressor'; * * const result = await compressImage(imageUri, { * maxWidth: 1080, * maxHeight: 1920, * quality: 0.8, * }); * ``` */ export declare function compressImage(fileUrl: string, options?: ImageCompressOptions): Promise; /** * Cancel an ongoing compression. * @param uuid - The cancellation ID received from getCancellationId */ export declare function cancel(uuid: string): void; /** * Get metadata for a video file. * @param fileUrl - File URI of the video */ export declare function getMetadata(fileUrl: string): Promise; /** * Activate a background task to keep compression running when app is backgrounded. * @param onExpired - Optional callback when the background task expires */ export declare function activateBackgroundTask(onExpired?: () => void): Promise; /** * Deactivate the background task. */ export declare function deactivateBackgroundTask(): Promise; //# sourceMappingURL=index.d.ts.map