fix(lotus): soundboard says "not permitted" in audio-only rooms instead of failing silently (#47) #52

Merged
jared merged 1 commits from lotus-soundboard-not-permitted into lotus 2026-10-18 07:42:09 -04:00
Owner

Refs #47. This makes the failure visible. Actually playing clips in audio-only rooms (mixing them into the mic track) is a bigger audio-pipeline change and stays open.

Soundboard clips publish as an Unknown-source track. In audio-only rooms the voice-limit guard signs a token with canPublishSources: [microphone], so LiveKit refuses the publish. The fork had already replied {}, so the host just stopped "playing", with no message.

Change: new pure canPublishSoundboard(permissions): no permissions or an empty source list means unrestricted; otherwise UNKNOWN (0) must be allowed. When any connected room's local participant can't publish it, the fork replies { played: false, reason: "not_permitted" } before trying. The existing muted refusal is unchanged.

Verified with a local build in Lotus (with cinny's matching message):

  • Audio-only Voice Lounge (allow_camera: false, allow_screenshare: false), click a clip → "The soundboard isn't available in this voice channel (only microphone audio is allowed here)."
  • Open room → the clip plays, no error.

Unit test for the permission check. tsc and oxlint are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Refs #47. This makes the failure visible. Actually playing clips in audio-only rooms (mixing them into the mic track) is a bigger audio-pipeline change and stays open. Soundboard clips publish as an **Unknown-source** track. In audio-only rooms the voice-limit guard signs a token with `canPublishSources: [microphone]`, so LiveKit refuses the publish. The fork had **already replied `{}`**, so the host just stopped "playing", with no message. **Change:** new pure `canPublishSoundboard(permissions)`: no permissions or an empty source list means unrestricted; otherwise `UNKNOWN` (0) must be allowed. When any connected room's local participant can't publish it, the fork replies **`{ played: false, reason: "not_permitted" }`** before trying. The existing `muted` refusal is unchanged. **Verified** with a local build in Lotus (with cinny's matching message): - Audio-only Voice Lounge (`allow_camera: false, allow_screenshare: false`), click a clip → "The soundboard isn't available in this voice channel (only microphone audio is allowed here)." - Open room → the clip plays, no error. Unit test for the permission check. `tsc` and oxlint are clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-18 01:22:55 -04:00
fix(lotus): soundboard says "not permitted" in audio-only rooms instead of failing silently (#47)
CI / Publish to Gitea npm registry (pull_request) Skipped
CI / Build embedded bundle (pull_request) Successful in 3m20s
888ed1a66c
Clips publish as an Unknown-source track. In audio-only rooms the guard
signs a microphone-only token, LiveKit refuses the publish, and since
the fork had already replied {} the host never heard. Check the grants
up front and reply { played: false, reason: "not_permitted" }.

Refs #47

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