-
Notifications
You must be signed in to change notification settings - Fork 440
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
Device preferences are not saved when set from Talk settings #12185
Comments
Yes, we could move it to:
|
Actually... you do :-( In fact I was going to open an issue about that also. But it is unrelated to the latest changes, though. If you open the media settings during a call and select a new device that device will immediately become the selected/active one. It does not matter if you then close the media settings without clicking on Apply settings, the device is already selected. Note that it is different in the case of the virtual background; in that case the changes are in fact not applied in the call until Apply settings is clicked. This is a legacy behaviour from a limitation in the browsers. Back in the day (I am not sure if that still applies, though) it was not possible to have more than one active device of the same kind at the same time. To overcome that and taking advantage of the fact that, in most cases, settings in Nextcloud are immediately applied without having to explicitly use an Accept or Apply button, as soon as a device was selected it became the active device application wide, stopping any track from any previously selected device of that kind. I think there are two options, one safer and one riskier. The safer one would be not to show Apply settings when the device is changed, but keep showing it for the virtual background. It might be a bit inconsistent, but it should work. The riskier one would be to first verify if it is possible to have more than one device of the same kind active at the same time* in all the currently supported browsers and, if it is, adjust the code of *It would be good to dig the old pull requests too just in case there are more problematic browser behaviours that I am not recalling right now. |
At first, persisting devices (update preferences) was intended to be only after joining call because user can be experimenting devices and can close media settings after that, BUT the info that I totally forgot is that devices are actually applied on each change which now makes the first assumption contradicting devices selection 🙈. @Antreesy , first option is good. Update preferences needs be called |
How to use GitHub
This is a regression introduced in #11936 and #12108
Before the introduction of the preferred media devices list, when a device was selected its id was stored in the
BrowserStorage
. Then, whenever that device was found again (for example, when the list of available devices was loaded for the first time after a reload) that device was set as the selected device.In #11936 the added OR conditions seem to override the id from the
BrowserStorage
and cause the last device in the list to become the selected one. In #12108 the conditions were removed altogether, so the ids saved to theBrowserStorage
are no longer used when loading the available devices, and the first available device ends being the selected one (unless the preferred device list was also saved).The
MediaSettings
component saves the preferred device list when applying changes, so after joining a call the selected devices are persisted. Thus I guess it would be enough to callmediaDevicesManager.updatePreferences()
when closing the Talk settings (but I have not tested it).However, note that just closing the
MediaSettings
does not persist the selected device; this is done only when joining the call. Maybe for consistency theMediaSettings
should also persist the selected device when simply closed, even if the call is not joined? Specially given that, although the selected device is not persisted between reloads, it is "persisted" between different openings of the media settings within the same session (that is, open the media settings, select another device, close the media settings without joining the call, open the media settings again -> Same selected device; open the media settings, select another device, close the media settings without joining the call, reload, open the media settings again -> Previously selected device)How to test
pactl load-module module-null-source
or the echo cancelling module withpactl load-module module-echo-cancel
Expected result
The second microphone/audio input device is selected
Actual result
The first microphone/audio input device is selected (or the last one if checking 2d20812^, which in practice is #11936)
The text was updated successfully, but these errors were encountered: