global hotkeys wired up
This commit is contained in:
@@ -85,6 +85,7 @@ export type ExportRequest = {
|
||||
deleted_frame_indices: number[]
|
||||
trim_start_secs?: number | null
|
||||
trim_end_secs?: number | null
|
||||
output_path?: string | null
|
||||
}
|
||||
|
||||
export type ExportResult = {
|
||||
@@ -111,9 +112,13 @@ export const api = {
|
||||
getOverlayRect: () => invoke<CaptureRect>("get_overlay_rect"),
|
||||
extractThumbnails: (fps: number) =>
|
||||
invoke<string[]>("extract_thumbnails", { fps }),
|
||||
defaultOutputPath: (format: Format) =>
|
||||
invoke<string>("default_output_path", { format }),
|
||||
openUrl: (url: string) => invoke<void>("open_url", { url }),
|
||||
onUpdateAvailable: (handler: (info: UpdateInfo) => void): Promise<UnlistenFn> =>
|
||||
listen<UpdateInfo>("update-available", (e) => handler(e.payload)),
|
||||
onHotkey: (handler: (kind: "start" | "stop" | "pause") => void): Promise<UnlistenFn> =>
|
||||
listen<"start" | "stop" | "pause">("hotkey", (e) => handler(e.payload)),
|
||||
}
|
||||
|
||||
export function formatBytes(n: number): string {
|
||||
|
||||
Reference in New Issue
Block a user