mirror of https://github.com/vector-im/riot-web
this is just endless
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
beedeec163
commit
3eb519b227
|
@ -958,14 +958,18 @@ module.exports = React.createClass({
|
|||
|
||||
const audioInputs = this.state.mediaDevices.audioinput.slice(0);
|
||||
if (audioInputs.length > 0) {
|
||||
let defaultInput;
|
||||
if (!audioInputs.some((input) => input.deviceId === 'default')) {
|
||||
audioInputs.unshift(defaultOption);
|
||||
} else {
|
||||
defaultInput = 'default';
|
||||
}
|
||||
|
||||
microphoneDropdown = <div>
|
||||
<h4>Microphone</h4>
|
||||
<Dropdown
|
||||
className="mx_UserSettings_webRtcDevices_dropdown"
|
||||
value={this.state.activeAudioInput}
|
||||
value={this.state.activeAudioInput || defaultInput}
|
||||
onOptionChange={this._setAudioInput}>
|
||||
{this._mapWebRtcDevicesToSpans(audioInputs)}
|
||||
</Dropdown>
|
||||
|
@ -974,14 +978,18 @@ module.exports = React.createClass({
|
|||
|
||||
const videoInputs = this.state.mediaDevices.videoinput.slice(0);
|
||||
if (videoInputs.length > 0) {
|
||||
let defaultInput;
|
||||
if (!videoInputs.some((input) => input.deviceId === 'default')) {
|
||||
videoInputs.unshift(defaultOption);
|
||||
} else {
|
||||
defaultInput = 'default';
|
||||
}
|
||||
|
||||
webcamDropdown = <div>
|
||||
<h4>Cameras</h4>
|
||||
<Dropdown
|
||||
className="mx_UserSettings_webRtcDevices_dropdown"
|
||||
value={this.state.activeVideoInput}
|
||||
value={this.state.activeVideoInput || defaultInput}
|
||||
onOptionChange={this._setVideoInput}>
|
||||
{this._mapWebRtcDevicesToSpans(videoInputs)}
|
||||
</Dropdown>
|
||||
|
|
Loading…
Reference in New Issue