Expand description
JS-bridge bindings for the M-MIC.1 / AUT-278 microphone commands (M-MIC.2 / AUT-279).
Mirrors crate::camera_ipc for the audio path. Each function
invokes a __screen* helper declared in index.html’s inline
script, which wraps window.__TAURI__.core.invoke(...).
Returned values are deserialised from JsValue into typed Rust
structs via serde_wasm_bindgen — same pattern as the camera +
player IPC modules.
Structs§
- Microphone
View - Mirror of
crates/app/src/commands.rs::MicrophoneView(M-MIC.1).
Enums§
- MicLifecycle
- Mirror of
crates/app/src/audio/mod.rs::MicLifecycle. Tagged representation matches the Rust enum’s default serde shape (one of"Idle"/"Starting"/"Running"/"Stopping").
Functions§
- list_
microphones - Async helper: list every microphone the OS exposes.
- list_
microphones_ js __screenListMicrophones()— returnsPromise<MicrophoneView[]>.- mic_
status - Async helper: snapshot the worker lifecycle.
- mic_
status_ js __screenMicStatus()— returnsPromise<MicLifecycle>.- microphone_
permission_ status - Async helper: probe OS microphone permission state.
- microphone_
permission_ status_ js __screenMicrophonePermissionStatus()— returnsPromise<CameraPermission>(same three-variant shape).- open_
settings_ microphone - Async helper: shell out to open System Settings → Microphone
(M-RECP.8 / AUT-286). Same shape + silent-failure semantics as
crate::camera_ipc::open_settings_camera. - open_
settings_ microphone_ js __screenOpenSettingsMicrophone()(M-RECP.8 / AUT-286) — shells out to open System Settings → Privacy & Security → Microphone.- start_
mic_ capture - Async helper: kick off
start_mic_capturefor the given mic id. - start_
mic_ capture_ js __screenStartMicCapture(micId)— returnsPromise<void>.- stop_
mic_ capture - Async helper: tear down the active mic worker.
- stop_
mic_ capture_ js __screenStopMicCapture()— returnsPromise<void>.- subscribe_
mic_ level - Subscribe to the
mic-levelTauri event (M-AUDIO.METER / AUT-287) emitted byMicCapturePipelineat ~20 Hz. The handler receives an EMA-smoothed RMS in[0.0, ~1.0].