-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Use 'ideal' rather than 'exact' for deviceid #852
Conversation
We were using 'exact' which means we fail outright if the device we wanted isn't available. This means if a user selects a specific device then later unplugs it, we fail to open a capture device the next time they make a call even if there's one available. Using 'ideal' uses the chosen device in preference, but something else if it isn't available. Also log the name of the exception when we fail to open a capture device to give us more of an idea of what's gone wrong. Should help fix element-hq/element-web#8993
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.
This seems like a good improvement, but what will it mean for the capture device settings tab?
It seems like we may also need to add a way to query the JS SDK for "what device did you actually choose" since it's now a non-exact match. This way, the Settings tab has a mechanism to show what device has actually been chosen, instead of just displaying whatever device value was last saved in the settings store (which not match what's actually going to be used).
Yeah, the device selection is still a little bit odd. It gets the current preferred device ID from the js-sdk (if any) and sets that as the 'value' of the select, then populates the select with the devices it got from the browser. If the preferred device isn't there any more, you'll therefore have a select with a value that isn't one of the options in the select, in which case browsers will just show the first as selected (ie. the default device). So that means you open settings and it says you have the default device selected when in fact you do have a preferred device. So another thing we could do would be to add the current preferred device to the select options, although we don't currently save the name (just the ID) so we'd have to display it as 'Unknown Device' or something. |
It seems like the sequence is:
That sounds like a good improvement to file, if we don't want to do it right now. It sounds like that could good be added later if we want, so I'll mark this as approved and leave the next step up to you. |
Filed as element-hq/element-web#9045 |
We were using 'exact' which means we fail outright if the device
we wanted isn't available. This means if a user selects a specific
device then later unplugs it, we fail to open a capture device
the next time they make a call even if there's one available.
Using 'ideal' uses the chosen device in preference, but something
else if it isn't available.
Also log the name of the exception when we fail to open a capture
device to give us more of an idea of what's gone wrong.
Should help fix element-hq/element-web#8993