* Stop only audio capture. * Works on desktop (macOS) and iOS.
()
| 1391 | * Works on desktop (macOS) and iOS. |
| 1392 | */ |
| 1393 | async stopAudio(): Promise<void> { |
| 1394 | if (!isTauri()) { |
| 1395 | throw new Error('Audio capture only available in Tauri'); |
| 1396 | } |
| 1397 | |
| 1398 | try { |
| 1399 | if (isDesktop()) { |
| 1400 | await invoke('sc_stop_audio'); |
| 1401 | } else { |
| 1402 | // iOS: Stop audio stream and broadcast |
| 1403 | await invoke('stop_audio_stream_cmd'); |
| 1404 | await invoke('plugin:screen-capture|stop_capture_cmd'); |
| 1405 | } |
| 1406 | this.latestAudioData = null; |
| 1407 | } catch (error) { |
| 1408 | throw error; |
| 1409 | } |
| 1410 | } |
| 1411 | |
| 1412 | /** |
| 1413 | * Unified status + frame query - the single source of truth for broadcast state. |