Skip to main content

Module editor_ipc

Module editor_ipc 

Source
Expand description

Leptos-side bindings for the editor IPC (ED.5 / M-EDIT).

app-ui is a WASM crate and can’t depend on screen-app (Tauri- native), but it can depend on the pure edit crate — so the open_in_editor command’s payload deserializes straight into [edit::EditProject] with no hand-mirrored type.

The flow mirrors the player IPC: a fire-and-forget invoke wrapper (screen_open_in_editor, bound to the __screenOpenInEditor helper in index.html) plus an editor-project CustomEvent listener that pushes the loaded project into a Leptos signal.

Structs§

EditorStatus
IPC-stable mirror of screen_app::editor_session::EditorStatusView (plain-text reference — app-ui can’t depend on the Tauri-native crate). Field names must match the Rust-side Serialize shape.
ExportProgress
Progress payload from the backend editor-export-progress event.
RecordingEntry
Library mirror of the backend RecordingEntry (deserialize side).

Enums§

ExportUiState
UI-facing export state, driven by the export event bridge.
TransportAction
Mirror of the backend TransportAction (serialize side). The JS bridge forwards this object to the editor_transport command, which re-deserializes it on the Rust side.

Functions§

editor_export
Start exporting project to format (e.g. "mp4"). Progress + result arrive as events (see install_editor_export_listeners).
editor_export_cancel
Request cancellation of the in-flight export.
editor_preview_open
Open / update the live editor preview for project (AUT-510). Call on the initial load and whenever an edit mutates the project, so the next composed frame reflects it. The composed frames themselves come from the canvas poll (__screenEditorPreviewFrame).
editor_save_project
Save project to its .screenproj. The written path arrives as an editor-saved event (see install_editor_saved_listener).
editor_transport
Send a transport action. The resulting status arrives asynchronously as an editor-status event (see install_editor_status_listener).
export_percent
Progress as a whole percent 0..=100 (0 when total is 0).
install_drag_active_listeners
Install file-drag-enter / file-drag-leave listeners that drive active — the editor drop zone reads it to show a drag-over highlight. App-lifetime; closures leaked via forget.
install_editor_export_listeners
Install the export event listeners (progress / done / error), each pushing into state. App-lifetime; closures leaked via forget.
install_editor_project_listener
Install an editor-project CustomEvent listener that deserializes the loaded [EditProject] and pushes it into project.
install_editor_saved_listener
Install an editor-saved listener pushing the written path into saved.
install_editor_status_listener
Install an editor-status CustomEvent listener pushing the parsed EditorStatus into status. App-lifetime; leaked via forget.
install_file_drop_to_editor_listener
Install a file-dropped listener that opens a dropped video in the editor: it calls screen_open_in_editor, whose editor-project reply loads the project and (via the app-root effect) switches to the Editor tab. Dropping a video anywhere in the app surface opens it for editing. App-lifetime; the closure is leaked via forget.
install_recordings_listener
Install a recordings-listed listener pushing the entries into entries.
list_recordings
Ask the shell to list recordings (results via recordings-listed).
looks_like_video 🔒
Whether path has a recognized video extension. The editor drop listener ignores non-video drops so dropping an unrelated file is a no-op rather than a failed gst-discoverer probe.
on_custom_event 🔒
screen_editor_export_cancel_js 🔒
Request cancellation of the in-flight export.
screen_editor_export_js 🔒
Start an edited export. Resolves to the output path (re-dispatched as editor-export-done); rejects as editor-export-error.
screen_editor_preview_open_js 🔒
Open / update the live editor preview (AUT-510) for project — builds the compose pipeline (and re-applies edits) so editor_preview_frame composes the current edit. Fire-and-forget.
screen_editor_save_project_js 🔒
Save the current project to its .screenproj (ED.23). The written path is re-dispatched as an editor-saved event.
screen_editor_transport_js 🔒
Send a transport action to the backend editor session. catch so it degrades to a no-op outside Tauri.
screen_list_recordings_js 🔒
List recordings; results arrive as a recordings-listed event.
screen_open_in_editor
Ask the shell to open path in the editor. Fire-and-forget: the loaded project arrives asynchronously as an editor-project browser CustomEvent (see install_editor_project_listener). catch so it degrades to a no-op outside Tauri.