feat(lotus): report the frame's audio outputs to the host (cinny #310) #49

Merged
jared merged 1 commits from fix/audio-output-list into lotus 2026-10-17 20:45:10 -04:00
Owner

Fork half of cinny #310.

Browsers hash deviceId per frame/origin, so the ids the host gets from its own enumerateDevices() are unknown inside the call iframe. mediaDevices.audioOutput.select() then falls back to the default output, so picking a headset in Lotus's call bar did nothing.

Change: io.lotus.audio_output_state now also carries available: [{ id, label }]. These come from the frame's own audioOutput.available$, so the ids are valid in the frame. It is re-sent whenever the list or the selection changes. The host builds its menu from this list. Hosts that ignore the field are unaffected.

Verified with a local build in Lotus (Chromium fake devices):

  • The menu lists the frame's outputs.
  • Picking "Fake Audio Output 2" saves a real frame device in matrix-setting-audio-output.
  • The host's ✓ follows the selection.
  • No more "host did not ack io.lotus.audio_output_state" warnings once the host handles the action.

Unit test for the labels · tsc · oxlint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fork half of cinny #310. Browsers hash `deviceId` per frame/origin, so the ids the host gets from its own `enumerateDevices()` are unknown inside the call iframe. `mediaDevices.audioOutput.select()` then falls back to the default output, so picking a headset in Lotus's call bar did nothing. **Change:** `io.lotus.audio_output_state` now also carries `available: [{ id, label }]`. These come from the frame's own `audioOutput.available$`, so the ids are valid in the frame. It is re-sent whenever the list or the selection changes. The host builds its menu from this list. Hosts that ignore the field are unaffected. **Verified** with a local build in Lotus (Chromium fake devices): - The menu lists the frame's outputs. - Picking "Fake Audio Output 2" saves a real frame device in `matrix-setting-audio-output`. - The host's ✓ follows the selection. - No more "host did not ack io.lotus.audio_output_state" warnings once the host handles the action. Unit test for the labels · `tsc` · oxlint clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-17 19:48:34 -04:00
feat(lotus): report the frame's audio outputs to the host (cinny #310)
CI / Publish to Gitea npm registry (pull_request) Skipped
CI / Build embedded bundle (pull_request) Successful in 3m28s
34d541b707
Browsers hash deviceIds per frame/origin, so ids from the host's own
enumerateDevices() are unknown in here and select() fell back to the
default. io.lotus.audio_output_state now also carries
available: [{id,label}] (frame-valid ids), so the host's call-bar menu
can offer real choices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit e3ac9a96d6 into lotus 2026-10-17 20:45:10 -04:00
Sign in to join this conversation.