mirror of
https://github.com/element-hq/element-web.git
synced 2024-11-30 23:31:28 +03:00
only unshift default if there is no deviceId===default
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
dd4480f8c3
commit
4e36c10c38
1 changed files with 6 additions and 2 deletions
|
@ -958,7 +958,9 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
const audioInputs = this.state.mediaDevices.audioinput;
|
const audioInputs = this.state.mediaDevices.audioinput;
|
||||||
if (audioInputs.length > 0) {
|
if (audioInputs.length > 0) {
|
||||||
audioInputs.unshift(defaultOption);
|
if (!audioInputs.some((input) => input.deviceId === 'default')) {
|
||||||
|
audioInputs.unshift(defaultOption);
|
||||||
|
}
|
||||||
microphoneDropdown = <div>
|
microphoneDropdown = <div>
|
||||||
<h4>Microphone</h4>
|
<h4>Microphone</h4>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
@ -972,7 +974,9 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
const videoInputs = this.state.mediaDevices.videoinput;
|
const videoInputs = this.state.mediaDevices.videoinput;
|
||||||
if (videoInputs.length > 0) {
|
if (videoInputs.length > 0) {
|
||||||
videoInputs.unshift(defaultOption);
|
if (!videoInputs.some((input) => input.deviceId === 'default')) {
|
||||||
|
videoInputs.unshift(defaultOption);
|
||||||
|
}
|
||||||
webcamDropdown = <div>
|
webcamDropdown = <div>
|
||||||
<h4>Cameras</h4>
|
<h4>Cameras</h4>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
|
Loading…
Reference in a new issue