|
@@ -40,6 +40,11 @@ export type Props = {
|
40
|
40
|
*/
|
41
|
41
|
disableDeviceChange: boolean,
|
42
|
42
|
|
|
43
|
+ /**
|
|
44
|
+ * Whether video input dropdown should be enabled or not.
|
|
45
|
+ */
|
|
46
|
+ disableVideoInputSelect: boolean,
|
|
47
|
+
|
43
|
48
|
/**
|
44
|
49
|
* Whether or not the audio permission was granted.
|
45
|
50
|
*/
|
|
@@ -57,6 +62,12 @@ export type Props = {
|
57
|
62
|
*/
|
58
|
63
|
hideAudioInputPreview: boolean,
|
59
|
64
|
|
|
65
|
+ /**
|
|
66
|
+ * If true, the button to play a test sound on the selected speaker will not be displayed.
|
|
67
|
+ * This needs to be hidden on browsers that do not support selecting an audio output device.
|
|
68
|
+ */
|
|
69
|
+ hideAudioOutputPreview: boolean,
|
|
70
|
+
|
60
|
71
|
/**
|
61
|
72
|
* Whether or not the audio output source selector should display. If
|
62
|
73
|
* true, the audio output selector and test audio link will not be
|
|
@@ -70,12 +81,6 @@ export type Props = {
|
70
|
81
|
*/
|
71
|
82
|
hideVideoInputPreview: boolean,
|
72
|
83
|
|
73
|
|
- /**
|
74
|
|
- * Whether video output dropdown should be displayed or not.
|
75
|
|
- * (In the case of iOS Safari)
|
76
|
|
- */
|
77
|
|
- hideVideoOutputSelect: boolean,
|
78
|
|
-
|
79
|
84
|
/**
|
80
|
85
|
* An optional callback to invoke after the component has completed its
|
81
|
86
|
* mount logic.
|
|
@@ -212,7 +217,7 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {
|
212
|
217
|
render() {
|
213
|
218
|
const {
|
214
|
219
|
hideAudioInputPreview,
|
215
|
|
- hideAudioOutputSelect,
|
|
220
|
+ hideAudioOutputPreview,
|
216
|
221
|
hideVideoInputPreview,
|
217
|
222
|
selectedAudioOutputId
|
218
|
223
|
} = this.props;
|
|
@@ -237,7 +242,7 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {
|
237
|
242
|
className = 'device-selectors'>
|
238
|
243
|
{ this._renderSelectors() }
|
239
|
244
|
</div>
|
240
|
|
- { !hideAudioOutputSelect
|
|
245
|
+ { !hideAudioOutputPreview
|
241
|
246
|
&& <AudioOutputPreview
|
242
|
247
|
deviceId = { selectedAudioOutputId } /> }
|
243
|
248
|
</div>
|
|
@@ -371,33 +376,27 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {
|
371
|
376
|
devices: availableDevices.audioInput,
|
372
|
377
|
hasPermission: hasAudioPermission,
|
373
|
378
|
icon: 'icon-microphone',
|
374
|
|
- isDisabled: this.props.disableAudioInputChange
|
375
|
|
- || this.props.disableDeviceChange,
|
|
379
|
+ isDisabled: this.props.disableAudioInputChange || this.props.disableDeviceChange,
|
376
|
380
|
key: 'audioInput',
|
377
|
381
|
id: 'audioInput',
|
378
|
382
|
label: 'settings.selectMic',
|
379
|
|
- onSelect: selectedAudioInputId =>
|
380
|
|
- super._onChange({ selectedAudioInputId }),
|
|
383
|
+ onSelect: selectedAudioInputId => super._onChange({ selectedAudioInputId }),
|
381
|
384
|
selectedDeviceId: this.state.previewAudioTrack
|
382
|
|
- ? this.state.previewAudioTrack.getDeviceId() : null
|
383
|
|
- }
|
384
|
|
- ];
|
385
|
|
-
|
386
|
|
- if (!this.props.hideVideoOutputSelect) {
|
387
|
|
- configurations.unshift({
|
|
385
|
+ ? this.state.previewAudioTrack.getDeviceId() : this.props.selectedAudioInputId
|
|
386
|
+ },
|
|
387
|
+ {
|
388
|
388
|
devices: availableDevices.videoInput,
|
389
|
389
|
hasPermission: hasVideoPermission,
|
390
|
390
|
icon: 'icon-camera',
|
391
|
|
- isDisabled: this.props.disableDeviceChange,
|
|
391
|
+ isDisabled: this.props.disableVideoInputSelect || this.props.disableDeviceChange,
|
392
|
392
|
key: 'videoInput',
|
393
|
393
|
id: 'videoInput',
|
394
|
394
|
label: 'settings.selectCamera',
|
395
|
|
- onSelect: selectedVideoInputId =>
|
396
|
|
- super._onChange({ selectedVideoInputId }),
|
|
395
|
+ onSelect: selectedVideoInputId => super._onChange({ selectedVideoInputId }),
|
397
|
396
|
selectedDeviceId: this.state.previewVideoTrack
|
398
|
|
- ? this.state.previewVideoTrack.getDeviceId() : null
|
399
|
|
- });
|
400
|
|
- }
|
|
397
|
+ ? this.state.previewVideoTrack.getDeviceId() : this.props.selectedVideoInputId
|
|
398
|
+ }
|
|
399
|
+ ];
|
401
|
400
|
|
402
|
401
|
if (!this.props.hideAudioOutputSelect) {
|
403
|
402
|
configurations.push({
|
|
@@ -408,8 +407,7 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {
|
408
|
407
|
key: 'audioOutput',
|
409
|
408
|
id: 'audioOutput',
|
410
|
409
|
label: 'settings.selectAudioOutput',
|
411
|
|
- onSelect: selectedAudioOutputId =>
|
412
|
|
- super._onChange({ selectedAudioOutputId }),
|
|
410
|
+ onSelect: selectedAudioOutputId => super._onChange({ selectedAudioOutputId }),
|
413
|
411
|
selectedDeviceId: this.props.selectedAudioOutputId
|
414
|
412
|
});
|
415
|
413
|
}
|