|
@@ -64,6 +64,18 @@ export type Props = {
|
64
|
64
|
*/
|
65
|
65
|
hideAudioOutputSelect: boolean,
|
66
|
66
|
|
|
67
|
+ /**
|
|
68
|
+ * Whether video input preview should be displayed or not.
|
|
69
|
+ * (In the case of iOS Safari)
|
|
70
|
+ */
|
|
71
|
+ hideVideoInputPreview: boolean,
|
|
72
|
+
|
|
73
|
+ /**
|
|
74
|
+ * Whether video output dropdown should be displayed or not.
|
|
75
|
+ * (In the case of iOS Safari)
|
|
76
|
+ */
|
|
77
|
+ hideVideoOutputSelect: boolean,
|
|
78
|
+
|
67
|
79
|
/**
|
68
|
80
|
* An optional callback to invoke after the component has completed its
|
69
|
81
|
* mount logic.
|
|
@@ -201,17 +213,20 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {
|
201
|
213
|
const {
|
202
|
214
|
hideAudioInputPreview,
|
203
|
215
|
hideAudioOutputSelect,
|
|
216
|
+ hideVideoInputPreview,
|
204
|
217
|
selectedAudioOutputId
|
205
|
218
|
} = this.props;
|
206
|
219
|
|
207
|
220
|
return (
|
208
|
|
- <div className = 'device-selection'>
|
|
221
|
+ <div className = { `device-selection${hideVideoInputPreview ? ' video-hidden' : ''}` }>
|
209
|
222
|
<div className = 'device-selection-column column-video'>
|
210
|
|
- <div className = 'device-selection-video-container'>
|
211
|
|
- <VideoInputPreview
|
212
|
|
- error = { this.state.previewVideoTrackError }
|
213
|
|
- track = { this.state.previewVideoTrack } />
|
214
|
|
- </div>
|
|
223
|
+ { !hideVideoInputPreview
|
|
224
|
+ && <div className = 'device-selection-video-container'>
|
|
225
|
+ <VideoInputPreview
|
|
226
|
+ error = { this.state.previewVideoTrackError }
|
|
227
|
+ track = { this.state.previewVideoTrack } />
|
|
228
|
+ </div>
|
|
229
|
+ }
|
215
|
230
|
{ !hideAudioInputPreview
|
216
|
231
|
&& <AudioInputPreview
|
217
|
232
|
track = { this.state.previewAudioTrack } /> }
|
|
@@ -264,6 +279,12 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {
|
264
|
279
|
* @returns {void}
|
265
|
280
|
*/
|
266
|
281
|
_createVideoInputTrack(deviceId) {
|
|
282
|
+ const { hideVideoInputPreview } = this.props;
|
|
283
|
+
|
|
284
|
+ if (hideVideoInputPreview) {
|
|
285
|
+ return;
|
|
286
|
+ }
|
|
287
|
+
|
267
|
288
|
return this._disposeVideoInputPreview()
|
268
|
289
|
.then(() => createLocalTrack('video', deviceId, 5000))
|
269
|
290
|
.then(jitsiLocalTrack => {
|
|
@@ -342,18 +363,6 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {
|
342
|
363
|
const { availableDevices, hasAudioPermission, hasVideoPermission } = this.props;
|
343
|
364
|
|
344
|
365
|
const configurations = [
|
345
|
|
- {
|
346
|
|
- devices: availableDevices.videoInput,
|
347
|
|
- hasPermission: hasVideoPermission,
|
348
|
|
- icon: 'icon-camera',
|
349
|
|
- isDisabled: this.props.disableDeviceChange,
|
350
|
|
- key: 'videoInput',
|
351
|
|
- label: 'settings.selectCamera',
|
352
|
|
- onSelect: selectedVideoInputId =>
|
353
|
|
- super._onChange({ selectedVideoInputId }),
|
354
|
|
- selectedDeviceId: this.state.previewVideoTrack
|
355
|
|
- ? this.state.previewVideoTrack.getDeviceId() : null
|
356
|
|
- },
|
357
|
366
|
{
|
358
|
367
|
devices: availableDevices.audioInput,
|
359
|
368
|
hasPermission: hasAudioPermission,
|
|
@@ -369,6 +378,21 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {
|
369
|
378
|
}
|
370
|
379
|
];
|
371
|
380
|
|
|
381
|
+ if (!this.props.hideVideoOutputSelect) {
|
|
382
|
+ configurations.unshift({
|
|
383
|
+ devices: availableDevices.videoInput,
|
|
384
|
+ hasPermission: hasVideoPermission,
|
|
385
|
+ icon: 'icon-camera',
|
|
386
|
+ isDisabled: this.props.disableDeviceChange,
|
|
387
|
+ key: 'videoInput',
|
|
388
|
+ label: 'settings.selectCamera',
|
|
389
|
+ onSelect: selectedVideoInputId =>
|
|
390
|
+ super._onChange({ selectedVideoInputId }),
|
|
391
|
+ selectedDeviceId: this.state.previewVideoTrack
|
|
392
|
+ ? this.state.previewVideoTrack.getDeviceId() : null
|
|
393
|
+ });
|
|
394
|
+ }
|
|
395
|
+
|
372
|
396
|
if (!this.props.hideAudioOutputSelect) {
|
373
|
397
|
configurations.push({
|
374
|
398
|
devices: availableDevices.audioOutput,
|