|
@@ -57,7 +57,7 @@ import {
|
57
|
57
|
participantUpdated
|
58
|
58
|
} from './react/features/base/participants';
|
59
|
59
|
import {
|
60
|
|
- createLocalTracks,
|
|
60
|
+ createLocalTracksF,
|
61
|
61
|
isLocalTrackMuted,
|
62
|
62
|
replaceLocalTrack,
|
63
|
63
|
trackAdded,
|
|
@@ -539,7 +539,7 @@ export default {
|
539
|
539
|
return [desktopStream];
|
540
|
540
|
}
|
541
|
541
|
|
542
|
|
- return createLocalTracks({ devices: ['audio'] }, true)
|
|
542
|
+ return createLocalTracksF({ devices: ['audio'] }, true)
|
543
|
543
|
.then(([audioStream]) => {
|
544
|
544
|
return [desktopStream, audioStream];
|
545
|
545
|
})
|
|
@@ -551,7 +551,7 @@ export default {
|
551
|
551
|
logger.error('Failed to obtain desktop stream', error);
|
552
|
552
|
screenSharingError = error;
|
553
|
553
|
return requestedAudio
|
554
|
|
- ? createLocalTracks({ devices: ['audio'] }, true)
|
|
554
|
+ ? createLocalTracksF({ devices: ['audio'] }, true)
|
555
|
555
|
: [];
|
556
|
556
|
}).catch(error => {
|
557
|
557
|
audioOnlyError = error;
|
|
@@ -561,7 +561,7 @@ export default {
|
561
|
561
|
// Resolve with no tracks
|
562
|
562
|
tryCreateLocalTracks = Promise.resolve([]);
|
563
|
563
|
} else {
|
564
|
|
- tryCreateLocalTracks = createLocalTracks(
|
|
564
|
+ tryCreateLocalTracks = createLocalTracksF(
|
565
|
565
|
{ devices: initialDevices }, true)
|
566
|
566
|
.catch(err => {
|
567
|
567
|
if (requestedAudio && requestedVideo) {
|
|
@@ -569,7 +569,7 @@ export default {
|
569
|
569
|
// Try audio only...
|
570
|
570
|
audioAndVideoError = err;
|
571
|
571
|
|
572
|
|
- return createLocalTracks({devices: ['audio']}, true);
|
|
572
|
+ return createLocalTracksF({devices: ['audio']}, true);
|
573
|
573
|
} else if (requestedAudio && !requestedVideo) {
|
574
|
574
|
audioOnlyError = err;
|
575
|
575
|
|
|
@@ -589,7 +589,7 @@ export default {
|
589
|
589
|
|
590
|
590
|
// Try video only...
|
591
|
591
|
return requestedVideo
|
592
|
|
- ? createLocalTracks({devices: ['video']}, true)
|
|
592
|
+ ? createLocalTracksF({devices: ['video']}, true)
|
593
|
593
|
: [];
|
594
|
594
|
})
|
595
|
595
|
.catch(err => {
|
|
@@ -781,12 +781,14 @@ export default {
|
781
|
781
|
}
|
782
|
782
|
|
783
|
783
|
if (!this.localAudio && !mute) {
|
784
|
|
- createLocalTracks({ devices: ['audio'] }, false)
|
|
784
|
+ const maybeShowErrorDialog = error => {
|
|
785
|
+ showUI && APP.UI.showMicErrorNotification(error);
|
|
786
|
+ };
|
|
787
|
+
|
|
788
|
+ createLocalTracksF({ devices: ['audio'] }, false)
|
785
|
789
|
.then(([audioTrack]) => audioTrack)
|
786
|
790
|
.catch(error => {
|
787
|
|
- if (showUI) {
|
788
|
|
- APP.UI.showMicErrorNotification(error);
|
789
|
|
- }
|
|
791
|
+ maybeShowErrorDialog(error);
|
790
|
792
|
|
791
|
793
|
// Rollback the audio muted status by using null track
|
792
|
794
|
return null;
|
|
@@ -838,16 +840,14 @@ export default {
|
838
|
840
|
return;
|
839
|
841
|
}
|
840
|
842
|
|
841
|
|
- const maybeShowErrorDialog = (error) => {
|
842
|
|
- if (showUI) {
|
843
|
|
- APP.UI.showCameraErrorNotification(error);
|
844
|
|
- }
|
845
|
|
- };
|
846
|
|
-
|
847
|
843
|
// FIXME it is possible to queue this task twice, but it's not causing
|
848
|
844
|
// any issues. Specifically this can happen when the previous
|
849
|
845
|
// get user media call is blocked on "ask user for permissions" dialog.
|
850
|
846
|
if (!this.localVideo && !mute) {
|
|
847
|
+ const maybeShowErrorDialog = error => {
|
|
848
|
+ showUI && APP.UI.showCameraErrorNotification(error);
|
|
849
|
+ };
|
|
850
|
+
|
851
|
851
|
// Try to create local video if there wasn't any.
|
852
|
852
|
// This handles the case when user joined with no video
|
853
|
853
|
// (dismissed screen sharing screen or in audio only mode), but
|
|
@@ -856,7 +856,7 @@ export default {
|
856
|
856
|
//
|
857
|
857
|
// FIXME when local track creation is moved to react/redux
|
858
|
858
|
// it should take care of the use case described above
|
859
|
|
- createLocalTracks({ devices: ['video'] }, false)
|
|
859
|
+ createLocalTracksF({ devices: ['video'] }, false)
|
860
|
860
|
.then(([videoTrack]) => videoTrack)
|
861
|
861
|
.catch(error => {
|
862
|
862
|
// FIXME should send some feedback to the API on error ?
|
|
@@ -1326,7 +1326,7 @@ export default {
|
1326
|
1326
|
let promise = null;
|
1327
|
1327
|
|
1328
|
1328
|
if (didHaveVideo) {
|
1329
|
|
- promise = createLocalTracks({ devices: ['video'] })
|
|
1329
|
+ promise = createLocalTracksF({ devices: ['video'] })
|
1330
|
1330
|
.then(([stream]) => this.useVideoStream(stream))
|
1331
|
1331
|
.then(() => {
|
1332
|
1332
|
JitsiMeetJS.analytics.sendEvent(
|
|
@@ -1412,7 +1412,7 @@ export default {
|
1412
|
1412
|
const didHaveVideo = Boolean(this.localVideo);
|
1413
|
1413
|
const wasVideoMuted = this.isLocalVideoMuted();
|
1414
|
1414
|
|
1415
|
|
- return createLocalTracks({
|
|
1415
|
+ return createLocalTracksF({
|
1416
|
1416
|
desktopSharingSources: options.desktopSharingSources,
|
1417
|
1417
|
devices: ['desktop'],
|
1418
|
1418
|
desktopSharingExtensionExternalInstallation: {
|
|
@@ -2021,7 +2021,7 @@ export default {
|
2021
|
2021
|
UIEvents.VIDEO_DEVICE_CHANGED,
|
2022
|
2022
|
(cameraDeviceId) => {
|
2023
|
2023
|
JitsiMeetJS.analytics.sendEvent('settings.changeDevice.video');
|
2024
|
|
- createLocalTracks({
|
|
2024
|
+ createLocalTracksF({
|
2025
|
2025
|
devices: ['video'],
|
2026
|
2026
|
cameraDeviceId: cameraDeviceId,
|
2027
|
2027
|
micDeviceId: null
|
|
@@ -2050,7 +2050,7 @@ export default {
|
2050
|
2050
|
(micDeviceId) => {
|
2051
|
2051
|
JitsiMeetJS.analytics.sendEvent(
|
2052
|
2052
|
'settings.changeDevice.audioIn');
|
2053
|
|
- createLocalTracks({
|
|
2053
|
+ createLocalTracksF({
|
2054
|
2054
|
devices: ['audio'],
|
2055
|
2055
|
cameraDeviceId: null,
|
2056
|
2056
|
micDeviceId: micDeviceId
|
|
@@ -2281,7 +2281,7 @@ export default {
|
2281
|
2281
|
|
2282
|
2282
|
promises.push(
|
2283
|
2283
|
mediaDeviceHelper.createLocalTracksAfterDeviceListChanged(
|
2284
|
|
- createLocalTracks,
|
|
2284
|
+ createLocalTracksF,
|
2285
|
2285
|
newDevices.videoinput,
|
2286
|
2286
|
newDevices.audioinput)
|
2287
|
2287
|
.then(tracks =>
|