|
@@ -4,6 +4,7 @@ import React, { Component } from 'react';
|
4
|
4
|
|
5
|
5
|
import { translate } from '../../../../base/i18n';
|
6
|
6
|
import { IconMicrophoneEmpty, IconVolumeEmpty } from '../../../../base/icons';
|
|
7
|
+import JitsiMeetJS from '../../../../base/lib-jitsi-meet';
|
7
|
8
|
import { equals } from '../../../../base/redux';
|
8
|
9
|
import { createLocalAudioTracks } from '../../../functions';
|
9
|
10
|
|
|
@@ -11,6 +12,8 @@ import AudioSettingsHeader from './AudioSettingsHeader';
|
11
|
12
|
import MicrophoneEntry from './MicrophoneEntry';
|
12
|
13
|
import SpeakerEntry from './SpeakerEntry';
|
13
|
14
|
|
|
15
|
+const browser = JitsiMeetJS.util.browser;
|
|
16
|
+
|
14
|
17
|
export type Props = {
|
15
|
18
|
|
16
|
19
|
/**
|
|
@@ -169,6 +172,14 @@ class AudioSettingsContent extends Component<Props, State> {
|
169
|
172
|
* @returns {void}
|
170
|
173
|
*/
|
171
|
174
|
async _setTracks() {
|
|
175
|
+ if (browser.isSafari()) {
|
|
176
|
+
|
|
177
|
+ // It appears that at the time of this writing, creating audio tracks blocks the browser's main thread for
|
|
178
|
+ // long time on safari. Wasn't able to confirm which part of track creation does the blocking exactly, but
|
|
179
|
+ // not creating the tracks seems to help and makes the UI much more responsive.
|
|
180
|
+ return;
|
|
181
|
+ }
|
|
182
|
+
|
172
|
183
|
this._disposeTracks(this.state.audioTracks);
|
173
|
184
|
|
174
|
185
|
const audioTracks = await createLocalAudioTracks(
|
|
@@ -244,9 +255,11 @@ class AudioSettingsContent extends Component<Props, State> {
|
244
|
255
|
{this.state.audioTracks.map((data, i) =>
|
245
|
256
|
this._renderMicrophoneEntry(data, i),
|
246
|
257
|
)}
|
247
|
|
- <AudioSettingsHeader
|
248
|
|
- IconComponent = { IconVolumeEmpty }
|
249
|
|
- text = { t('settings.speakers') } />
|
|
258
|
+ { outputDevices.length > 0 && (
|
|
259
|
+ <AudioSettingsHeader
|
|
260
|
+ IconComponent = { IconVolumeEmpty }
|
|
261
|
+ text = { t('settings.speakers') } />)
|
|
262
|
+ }
|
250
|
263
|
{outputDevices.map((data, i) =>
|
251
|
264
|
this._renderSpeakerEntry(data, i),
|
252
|
265
|
)}
|