Skip to content

fix(call): respect saved camera/mic preferences when starting call from room header#305

Merged
Just-Insane merged 2 commits intodevfrom
fix/call-camera-default
Mar 16, 2026
Merged

fix(call): respect saved camera/mic preferences when starting call from room header#305
Just-Insane merged 2 commits intodevfrom
fix/call-camera-default

Conversation

@Just-Insane
Copy link
Collaborator

Summary

Fixes #285 — Camera was turning on by default when starting a call from the room header button, even when the user had previously disabled video in their call preferences.

Root cause

RoomCallButton called startCall(room) without passing any preferences. This caused createCallEmbed to fall back to CallEmbed's default CallControlState (which uses hardcoded defaults), ignoring the user's saved preferences stored in callPreferencesAtom.

PrescreenControls already correctly passed { microphone, video, sound } via useCallPreferences() when starting a call from the in-room join button. RoomCallButton was missing this.

Fix

Added useCallPreferences() to RoomCallButton and passed the preferences to startCall(room, { microphone, video, sound }), matching the pattern used in PrescreenControls.

…m room header

RoomCallButton was calling startCall(room) without passing preferences,
which caused Element Call to use its own defaults (camera on) instead of
the user's saved settings. Now reads preferences via useCallPreferences()
and passes them to startCall(), matching the behavior of PrescreenControls.

Fixes #285
@Just-Insane Just-Insane requested a review from a team March 16, 2026 19:08
@github-actions
Copy link
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-305-sable.raspy-dream-bb1d.workers.dev cd1f7ef pr-305 Mon, 16 Mar 2026 19:30:21 GMT

@Just-Insane Just-Insane added this pull request to the merge queue Mar 16, 2026
Merged via the queue into dev with commit bfefbf3 Mar 16, 2026
8 checks passed
@Just-Insane Just-Insane deleted the fix/call-camera-default branch March 17, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Camera is on by default 💀

1 participant