import type { AudioOrVideoAsset } from 'remotion/no-react'; import type { LogLevel } from '../log-level'; import type { CancelSignal } from '../make-cancel-signal'; import type { AssetDownloadState, DownloadMap } from './download-map'; export type RenderMediaOnDownload = (src: string) => ((progress: { percent: number | null; downloaded: number; totalSize: number | null; }) => void) | undefined | void; type AssetDownloadEvent = { type: 'start'; promise: Promise; } | { type: 'succeeded'; path: string; } | { type: 'failed'; promise: Promise; } | { type: 'file-missing'; }; export declare const assetDownloadTransition: (state: AssetDownloadState | null, event: AssetDownloadEvent) => AssetDownloadState | null; export declare const downloadAsset: ({ src, downloadMap, indent, logLevel, shouldAnalyzeAudioImmediately, binariesDirectory, cancelSignalForAudioAnalysis, audioStreamIndex, }: { src: string; downloadMap: DownloadMap; indent: boolean; logLevel: LogLevel; shouldAnalyzeAudioImmediately: boolean; binariesDirectory: string | null; cancelSignalForAudioAnalysis: CancelSignal | undefined; audioStreamIndex: number | undefined; }) => Promise; export declare const markAllAssetsAsDownloaded: (downloadMap: DownloadMap) => void; export declare const getSanitizedFilenameForAssetUrl: ({ src, downloadDir, contentDisposition, contentType, }: { src: string; downloadDir: string; contentDisposition: string | null; contentType: string | null; }) => string; export declare const downloadAndMapAssetsToFileUrl: ({ renderAsset, onDownload, downloadMap, logLevel, indent, binariesDirectory, cancelSignalForAudioAnalysis, shouldAnalyzeAudioImmediately, }: { renderAsset: AudioOrVideoAsset; onDownload: RenderMediaOnDownload | null; downloadMap: DownloadMap; logLevel: LogLevel; indent: boolean; shouldAnalyzeAudioImmediately: boolean; binariesDirectory: string | null; cancelSignalForAudioAnalysis: CancelSignal | undefined; }) => Promise; export declare const attachDownloadListenerToEmitter: (downloadMap: DownloadMap, onDownload: RenderMediaOnDownload | null) => () => void; export {};