Skip to content

fix: respect call type settings when applying persisted device preferеnces #1879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 6, 2025

Conversation

oliverlaz
Copy link
Member

💡 Overview

Before applying local preferences, we now check whether the appropriate device kind is enabled on the call type level.
This is especially important for customers using default and audio-only call types in the same app.

Although preferences can be kept under a different key depending on the call type, it is good to handle this in the hook itself, too.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes device preference handling by checking call type settings before applying persisted device preferences. This ensures that devices like cameras are only enabled/applied when the call type actually supports them, preventing issues when mixing default and audio-only call types.

  • Adds call type setting checks before applying persisted device preferences
  • Conditionally renders camera/video controls based on call type video settings
  • Updates device preference application to respect call type enablement

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
sample-apps/react/react-dogfood/components/Lobby.tsx Conditionally renders video controls based on call type video settings
packages/react-sdk/src/hooks/usePersistedDevicePreferences.ts Updates preference application logic to check call type enablement before applying device states

@oliverlaz oliverlaz merged commit 4d1352d into main Aug 6, 2025
13 of 14 checks passed
@oliverlaz oliverlaz deleted the device-prefs branch August 6, 2025 15:08
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.

1 participant