-
Notifications
You must be signed in to change notification settings - Fork 166
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
Conversation
|
size-limit report 📦
|
There was a problem hiding this 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'); |
There was a problem hiding this comment.
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?
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 byenumerateDevices
.I tried to annotate all changes with code comments that explain the reasoning, but please ask if anything seems unclear.