Skip to content

Conversation

@danxuliu
Copy link
Member

Follow up to #4032

The watcher that updated the selected option based on the deviceId passed to the component was not executed when the component was mounted, so it was undefined until something else modified that device ID.

This was not noticeable when the MediaDevicesPreview was shown in the sidebar, as in that case it was mounted once when the UI was loaded and never destroyed, but once moved to the SettingsDialog the component is created and destroyed whenever the dialog is open or closed.

How to test

  • Open the settings dialog
  • Close the settings dialog
  • Open the settings dialog

Result with this pull request

The same devices that were selected before closing the dialog will be selected once it is opened again.

Result without this pull request

There will be no devices selected.

The watcher that updated the selected option based on the "deviceId"
passed to the component was not executed when the component was mounted,
so it was undefined until something else modified that device ID.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@nickvergessen nickvergessen merged commit 00307af into master Aug 24, 2020
@nickvergessen nickvergessen deleted the fix-mediadevicesselector-not-updated-when-mounted branch August 24, 2020 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants