mirror of https://github.com/vector-im/riot-web
Add clarifying comment in media device selection
Hopefully explain the confusing mismatch.pull/21833/head
parent
24a390f840
commit
d1bca2838f
|
@ -157,6 +157,9 @@ export default class VoiceUserSettingsTab extends React.Component {
|
||||||
label: _t('Default Device'),
|
label: _t('Default Device'),
|
||||||
};
|
};
|
||||||
const getDefaultDevice = (devices) => {
|
const getDefaultDevice = (devices) => {
|
||||||
|
// Note we're looking for a device with deviceId 'default' but adding a device
|
||||||
|
// with deviceId == the empty string: this is because Chrome gives us a device
|
||||||
|
// with deviceId 'default', so we're looking for this, not the one we are adding.
|
||||||
if (!devices.some((i) => i.deviceId === 'default')) {
|
if (!devices.some((i) => i.deviceId === 'default')) {
|
||||||
devices.unshift(defaultOption);
|
devices.unshift(defaultOption);
|
||||||
return '';
|
return '';
|
||||||
|
|
Loading…
Reference in New Issue