Expand description
JS-bridge bindings for the M-AUDIO-SYS.2 / AUT-282 system-audio commands.
Mirrors crate::camera_ipc / crate::mic_ipc for the
per-app speaker-capture path. Each function invokes a __screen*
helper in index.htmlβs inline script, which wraps
window.__TAURI__.core.invoke(...).
StructsΒ§
- Audio
AppView - Mirror of
crates/app/src/commands.rs::AudioAppView(M-AUDIO-SYS.2).
EnumsΒ§
- Audio
AppFilter View - Mirror of
crates/app/src/commands.rs::AudioAppFilterView. The tagged-enum serde shape lets the Tauri command pick one of the three filter modes without an extramode: Stringfield. - List
Audio Apps Result - Result shape carrying either the typed list or a string error so the picker can render the error inline.
FunctionsΒ§
- js_
error_ πstring - Best-effort: turn a
JsValueerror into a human-readable string for inline display in the picker. - list_
audio_ apps - Async helper: enumerate every running app SCK can see.
- list_
audio_ apps_ js __screenListAudioApps()β returnsPromise<AudioAppView[]>or rejects with a string error.- open_
settings_ screen_ recording - Async helper: shell out to open System Settings β Screen Recording (M-RECP.6 / AUT-272). Silently no-ops outside Tauri and silently swallows spawn errors β same shape as the other deep-link helpers.
- open_
settings_ screen_ recording_ js __screenOpenSettingsScreenRecording()(M-RECP.6 / AUT-272) β shells out to open System Settings β Privacy & Security β Screen Recording. macOS only; Linux/Windows no-op.- request_
screen_ recording_ permission - Async helper: trigger Screen Recording TCC before opening Settings.
After
tccutil reset ScreenCapture, this call is what makes macOS recreate the app row in the Screen & System Audio Recording list. - request_
screen_ recording_ permission_ js __screenRequestScreenRecordingPermission()β triggers the macOS Screen & System Audio Recording TCC request.- set_
system_ audio_ filter - Async helper: apply a per-app filter.
- set_
system_ audio_ filter_ js __screenSetSystemAudioFilter(filter)β returnsPromise<void>or rejects with a string error.- start_
system_ audio_ capture - Async helper: start the system-audio session. Returns
Ok(())orErr(message)where the message is the SCK error description. - start_
system_ audio_ js __screenStartSystemAudio()β returnsPromise<void>or rejects with a string error.- stop_
system_ audio_ capture - Async helper: stop the active session.
- stop_
system_ audio_ js __screenStopSystemAudio()β returnsPromise<void>.- subscribe_
system_ audio_ level - Subscribe to the
system-audio-levelTauri event (M-AUDIO.METER / AUT-287) emitted by the SCK delegate at the streamβs natural buffer rate (~20-100 Hz). Handler receives an EMA-smoothed master-stream RMS in[0.0, ~1.0]. Mirror ofcrate::mic_ipc::subscribe_mic_level. - system_
audio_ status - Async helper: status snapshot.
truewhen a session is up. - system_
audio_ status_ js __screenSystemAudioStatus()β returnsPromise<boolean>.