|
@@ -106,7 +106,6 @@ import {
|
106
|
106
|
trackRemoved
|
107
|
107
|
} from './react/features/base/tracks';
|
108
|
108
|
import { getJitsiMeetGlobalNS } from './react/features/base/util';
|
109
|
|
-import { getBlurEffect } from './react/features/blur';
|
110
|
109
|
import { addMessage } from './react/features/chat';
|
111
|
110
|
import { showDesktopPicker } from './react/features/desktop-picker';
|
112
|
111
|
import { appendSuffix } from './react/features/display-name';
|
|
@@ -560,63 +559,47 @@ export default {
|
560
|
559
|
// Resolve with no tracks
|
561
|
560
|
tryCreateLocalTracks = Promise.resolve([]);
|
562
|
561
|
} else {
|
563
|
|
- const loadEffectsPromise = options.startWithBlurEnabled
|
564
|
|
- ? getBlurEffect()
|
565
|
|
- .then(blurEffect => [ blurEffect ])
|
566
|
|
- .catch(error => {
|
567
|
|
- logger.error('Failed to obtain the blur effect instance with error: ', error);
|
568
|
|
-
|
569
|
|
- return Promise.resolve([]);
|
570
|
|
- })
|
571
|
|
- : Promise.resolve([]);
|
572
|
|
-
|
573
|
|
- tryCreateLocalTracks = loadEffectsPromise.then(trackEffects =>
|
574
|
|
- createLocalTracksF(
|
575
|
|
- {
|
576
|
|
- devices: initialDevices,
|
577
|
|
- effects: trackEffects
|
578
|
|
- }, true)
|
579
|
|
- .catch(err => {
|
580
|
|
- if (requestedAudio && requestedVideo) {
|
581
|
|
-
|
582
|
|
- // Try audio only...
|
583
|
|
- audioAndVideoError = err;
|
584
|
|
-
|
585
|
|
- return (
|
586
|
|
- createLocalTracksF({ devices: [ 'audio' ] }, true));
|
587
|
|
- } else if (requestedAudio && !requestedVideo) {
|
588
|
|
- audioOnlyError = err;
|
|
562
|
+ tryCreateLocalTracks = createLocalTracksF({ devices: initialDevices }, true)
|
|
563
|
+ .catch(err => {
|
|
564
|
+ if (requestedAudio && requestedVideo) {
|
589
|
565
|
|
590
|
|
- return [];
|
591
|
|
- } else if (requestedVideo && !requestedAudio) {
|
592
|
|
- videoOnlyError = err;
|
|
566
|
+ // Try audio only...
|
|
567
|
+ audioAndVideoError = err;
|
593
|
568
|
|
594
|
|
- return [];
|
595
|
|
- }
|
596
|
|
- logger.error('Should never happen');
|
597
|
|
- })
|
598
|
|
- .catch(err => {
|
599
|
|
- // Log this just in case...
|
600
|
|
- if (!requestedAudio) {
|
601
|
|
- logger.error('The impossible just happened', err);
|
602
|
|
- }
|
|
569
|
+ return (
|
|
570
|
+ createLocalTracksF({ devices: [ 'audio' ] }, true));
|
|
571
|
+ } else if (requestedAudio && !requestedVideo) {
|
603
|
572
|
audioOnlyError = err;
|
604
|
573
|
|
605
|
|
- // Try video only...
|
606
|
|
- return requestedVideo
|
607
|
|
- ? createLocalTracksF({ devices: [ 'video' ] }, true)
|
608
|
|
- : [];
|
609
|
|
- })
|
610
|
|
- .catch(err => {
|
611
|
|
- // Log this just in case...
|
612
|
|
- if (!requestedVideo) {
|
613
|
|
- logger.error('The impossible just happened', err);
|
614
|
|
- }
|
|
574
|
+ return [];
|
|
575
|
+ } else if (requestedVideo && !requestedAudio) {
|
615
|
576
|
videoOnlyError = err;
|
616
|
577
|
|
617
|
578
|
return [];
|
618
|
|
- })
|
619
|
|
- );
|
|
579
|
+ }
|
|
580
|
+ logger.error('Should never happen');
|
|
581
|
+ })
|
|
582
|
+ .catch(err => {
|
|
583
|
+ // Log this just in case...
|
|
584
|
+ if (!requestedAudio) {
|
|
585
|
+ logger.error('The impossible just happened', err);
|
|
586
|
+ }
|
|
587
|
+ audioOnlyError = err;
|
|
588
|
+
|
|
589
|
+ // Try video only...
|
|
590
|
+ return requestedVideo
|
|
591
|
+ ? createLocalTracksF({ devices: [ 'video' ] }, true)
|
|
592
|
+ : [];
|
|
593
|
+ })
|
|
594
|
+ .catch(err => {
|
|
595
|
+ // Log this just in case...
|
|
596
|
+ if (!requestedVideo) {
|
|
597
|
+ logger.error('The impossible just happened', err);
|
|
598
|
+ }
|
|
599
|
+ videoOnlyError = err;
|
|
600
|
+
|
|
601
|
+ return [];
|
|
602
|
+ });
|
620
|
603
|
}
|
621
|
604
|
|
622
|
605
|
// Hide the permissions prompt/overlay as soon as the tracks are
|
|
@@ -678,7 +661,6 @@ export default {
|
678
|
661
|
'initial device list initialization failed', error))
|
679
|
662
|
.then(() => this.createInitialLocalTracksAndConnect(
|
680
|
663
|
options.roomName, {
|
681
|
|
- startWithBlurEnabled: APP.store.getState()['features/blur'].blurEnabled,
|
682
|
664
|
startAudioOnly: config.startAudioOnly,
|
683
|
665
|
startScreenSharing: config.startScreenSharing,
|
684
|
666
|
startWithAudioMuted: config.startWithAudioMuted || config.startSilent,
|