Expand description
JS bridge for the webcam-bubble toggle command (M-BUBBLE.0 / AUT-273).
One-function module mirroring crate::camera_ipc’s shape — wraps
a __screen* helper declared inline in index.html, which in turn
calls window.__TAURI__.core.invoke("toggle_webcam_bubble").
Async + ignores the return value — toggling the bubble cannot fail
in any way the UI needs to react to. If the window can’t be found
the Rust-side command logs via tracing::warn! (see
crate::commands::toggle_webcam_bubble
in the screen-app crate) and the click is a no-op.
Functions§
- set_
bubble_ clickthrough - Fire-and-forget click-through toggle.
enabled = truemakes the bubble pass mouse events through;falserestores normal interaction (drag works again). Failures log to the JS console; the Rust side also logs viatracing::warn!. M-BUBBLE.1 v0 / AUT-274. - set_
bubble_ clickthrough_ js __screenSetBubbleClickthrough(enabled)inindex.html— returnsPromise<void>. M-BUBBLE.1 v0 / AUT-274.- set_
webcam_ bubble_ visibility - Fire-and-forget setter. Use when the UI owns the source of truth
for the bubble’s desired state (e.g. the recorder’s
camera_enabledsignal). Idempotent on the Rust side, so safe to call on every toggle click + on page mount for initial alignment. ISS-05. - set_
webcam_ bubble_ visibility_ js __screenSetBubbleVisibility(visible)inindex.html— returnsPromise<void>. ISS-05 fix; explicit setter so the recorder’scamera_enabledsignal can drive the bubble’s visibility without the toggle-drift the always-flip path had.- toggle_
webcam_ bubble - Fire-and-forget toggle. Spawns the IPC call as a wasm-bindgen
future so the click handler returns immediately; failures are
logged to the JS console via
web_sys::console::warn_1rather than surfaced to the user (the Rust side warns viatracing). - toggle_
webcam_ bubble_ js __screenToggleBubble()inindex.html— returnsPromise<void>.