Skip to content
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

Improve default device handling #1357

Merged
merged 16 commits into from
Jan 9, 2025
Merged

Improve default device handling #1357

merged 16 commits into from
Jan 9, 2025

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Dec 19, 2024

This PR improves default device handling across browsers.

For chrome we can rely on default for audio devices, for other browsers and video in chrome, the default device is the first device that's returned by enumerateDevices.

I tried to annotate all changes with code comments that explain the reasoning, but please ask if anything seems unclear.

Copy link

changeset-bot bot commented Dec 19, 2024

⚠️ No Changeset found

Latest commit: d0cd845

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 19, 2024

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 86.93 KB (+0.5% 🔺)
dist/livekit-client.umd.js 93.01 KB (+0.42% 🔺)

@lukasIO lukasIO changed the title Lukas/default device handling Improve default device handling Jan 7, 2025
@lukasIO lukasIO requested review from davidzhao and bcherry January 7, 2025 14:35
@lukasIO lukasIO marked this pull request as ready for review January 7, 2025 15:41
Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

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

nice work tracking down the behavior differences!

src/room/Room.ts Outdated
typeof FinalizationRegistry !== 'undefined' &&
new FinalizationRegistry((cleanup: () => void) => {
cleanup();
console.info('cleaning up room');
Copy link
Member

Choose a reason for hiding this comment

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

nit: should this be info or debug?

@lukasIO lukasIO merged commit 6338af6 into main Jan 9, 2025
3 checks passed
@lukasIO lukasIO deleted the lukas/default-device-handling branch January 9, 2025 15:23
@github-actions github-actions bot mentioned this pull request Jan 8, 2025
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.

3 participants