You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
only unshift default if there is no deviceId===default
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -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) {
|
||||||
|
if (!audioInputs.some((input) => input.deviceId === 'default')) {
|
||||||
audioInputs.unshift(defaultOption);
|
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) {
|
||||||
|
if (!videoInputs.some((input) => input.deviceId === 'default')) {
|
||||||
videoInputs.unshift(defaultOption);
|
videoInputs.unshift(defaultOption);
|
||||||
|
}
|
||||||
webcamDropdown = <div>
|
webcamDropdown = <div>
|
||||||
<h4>Cameras</h4>
|
<h4>Cameras</h4>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
|||||||
Reference in New Issue
Block a user