The Omniform Rust backend communicates asynchronously with the React frontend via Tauri’s event system. Rather than polling or awaiting long-running commands, the frontend subscribes to named event channels and reacts as the backend pushes updates. Subscribe withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/damianiglesias/omniform/llms.txt
Use this file to discover all available pages before exploring further.
listen() from @tauri-apps/api/event. All event payloads are typed in src/types/index.ts and referenced throughout this page.
General listen pattern
Every call tolisten() returns an unlisten function. Always call it when the subscribing component unmounts to avoid memory leaks and stale handlers.
download://info
Emitted once per download after yt-dlp’s --dump-json pass completes and video metadata is available — before the actual download bytes start transferring. Use this event to display the video title and thumbnail in the download queue.
The download ID originally passed to
start_download.The video or track title as reported by yt-dlp.
URL of the video thumbnail, or
null if the platform did not provide one.download://progress
Emitted repeatedly during the download lifecycle. This event carries the current progress percentage, transfer speed, estimated time remaining, and a status string. It is also emitted at the very start of a job with status: "fetching-info" so the UI can show activity immediately.
The download ID originally passed to
start_download.Current progress as a value between
0 and 100. Derived from yt-dlp’s
%(progress._percent_str)s template field.Current transfer speed as a human-readable string, e.g.
"1.50MiB/s".
null when speed data is not yet available.Estimated time remaining as a formatted string, e.g.
"00:30". null when
ETA is not yet calculable.One of the
DownloadStatus string values. Values observed during a normal
download lifecycle, in order:| Value | Meaning |
|---|---|
fetching-info | yt-dlp is retrieving video metadata |
downloading | Bytes are being transferred |
converting | ffmpeg is merging or re-encoding the file |
done | The output file has been written successfully |
download://done
Emitted exactly once per download when yt-dlp exits with a zero exit code and the output file has been written to disk. After this event the download is complete and the entry in the queue can be marked done.
The download ID originally passed to
start_download.The absolute path to the directory where the file was saved. This matches the
outputDir argument provided to start_download.download://error
Emitted when yt-dlp exits with a non-zero exit code and its stderr contains an error message. The message field contains the raw stderr output and can be shown directly to the user.
The download ID originally passed to
start_download.The stderr output captured from the yt-dlp process. Typical causes include
invalid URLs, private or geo-restricted videos, and unsupported platforms.
If the yt-dlp process exits non-zero but with empty stderr — for example,
when the process is killed by
cancel_download — no download://error event
is emitted. Instead, the download status transitions to "cancelled".deps://status
Emitted by ensure_dependencies during and after the binary setup process. Subscribe to this event before calling ensure_dependencies so the UI can display real-time progress as yt-dlp and ffmpeg are downloaded.
true if yt-dlp is present and executable at the time of this event.true if ffmpeg is present and executable at the time of this event.true while a binary download is actively in progress.A human-readable description of the current step, e.g.
"Downloading ffmpeg…". null when there is nothing to report.TypeScript type definitions
The following interfaces are defined insrc/types/index.ts and represent the exact payload shapes for each event.
DownloadStatus type used in DownloadProgressEvent covers the full lifecycle including terminal states: