@azure/communication-react 1.7.0-alpha-202308020013 → 1.7.0-alpha-202308030014
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +59 -7
- package/dist/dist-cjs/communication-react/index.js +524 -385
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +34 -8
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +13 -3
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +21 -8
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.d.ts +15 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +5 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +4 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +2 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +3 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +92 -0
- package/dist/dist-esm/react-components/src/components/ImageGallery.js +38 -0
- package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/index.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/index.js +2 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +62 -0
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +179 -0
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +7 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +22 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +6 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +4 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +10 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +5 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependency.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependency.js +33 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependency.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependencyLazy.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependencyLazy.js +32 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependencyLazy.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/index.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/package.json +8 -8
@@ -6,7 +6,6 @@ var communicationCommon = require('@azure/communication-common');
|
|
6
6
|
var reselect = require('reselect');
|
7
7
|
var communicationCalling = require('@azure/communication-calling');
|
8
8
|
var memoizeOne = require('memoize-one');
|
9
|
-
var communicationCallingEffects = require('@azure/communication-calling-effects');
|
10
9
|
var logger = require('@azure/logger');
|
11
10
|
var EventEmitter = require('events');
|
12
11
|
var produce = require('immer');
|
@@ -27,6 +26,7 @@ var reactWindowProvider = require('@fluentui/react-window-provider');
|
|
27
26
|
var copy = require('copy-to-clipboard');
|
28
27
|
var communicationChat = require('@azure/communication-chat');
|
29
28
|
var nanoid = require('nanoid');
|
29
|
+
var communicationCallingEffects = require('@azure/communication-calling-effects');
|
30
30
|
|
31
31
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
32
32
|
|
@@ -178,7 +178,7 @@ const _isValidIdentifier = (identifier) => {
|
|
178
178
|
// Copyright (c) Microsoft Corporation.
|
179
179
|
// Licensed under the MIT license.
|
180
180
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
181
|
-
var telemetryVersion = '1.7.0-alpha-
|
181
|
+
var telemetryVersion = '1.7.0-alpha-202308030014';
|
182
182
|
|
183
183
|
// Copyright (c) Microsoft Corporation.
|
184
184
|
/**
|
@@ -454,7 +454,7 @@ const getSupportedSpokenLanguages = (state, props) => {
|
|
454
454
|
|
455
455
|
// Copyright (c) Microsoft Corporation.
|
456
456
|
// Licensed under the MIT license.
|
457
|
-
var __awaiter$
|
457
|
+
var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
458
458
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
459
459
|
return new (P || (P = Promise))(function (resolve, reject) {
|
460
460
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -493,7 +493,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
493
493
|
*
|
494
494
|
* @private
|
495
495
|
*/
|
496
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
496
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$L(void 0, void 0, void 0, function* () {
|
497
497
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
498
498
|
for (const view of unparentedViews) {
|
499
499
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -548,10 +548,19 @@ const _isRingingPSTNParticipant = (participant) => {
|
|
548
548
|
*
|
549
549
|
* @public
|
550
550
|
*/
|
551
|
-
const microphoneButtonSelector = reselect__namespace.createSelector([
|
551
|
+
const microphoneButtonSelector = reselect__namespace.createSelector([
|
552
|
+
getCallExists,
|
553
|
+
getIsMuted,
|
554
|
+
getDeviceManager$1,
|
555
|
+
/* @conditional-compile-remove(capabilities) */ getCapabilites,
|
556
|
+
/* @conditional-compile-remove(capabilities) */ getRole
|
557
|
+
], (callExists, isMuted, deviceManager,
|
558
|
+
/* @conditional-compile-remove(capabilities) */ capabilities,
|
559
|
+
/* @conditional-compile-remove(capabilities) */ role) => {
|
552
560
|
const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.audio : true;
|
553
561
|
/* @conditional-compile-remove(capabilities) */
|
554
|
-
const incapable = (capabilities === null || capabilities === void 0 ? void 0 : capabilities.muteUnmuteMic.isPresent) === false
|
562
|
+
const incapable = ((capabilities === null || capabilities === void 0 ? void 0 : capabilities.muteUnmuteMic.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.muteUnmuteMic.reason) !== 'NotInitialized') ||
|
563
|
+
role === 'Consumer';
|
555
564
|
return {
|
556
565
|
disabled: !callExists || !permission || /* @conditional-compile-remove(capabilities) */ incapable,
|
557
566
|
checked: callExists ? !isMuted : false,
|
@@ -566,12 +575,23 @@ const microphoneButtonSelector = reselect__namespace.createSelector([getCallExis
|
|
566
575
|
*
|
567
576
|
* @public
|
568
577
|
*/
|
569
|
-
const cameraButtonSelector = reselect__namespace.createSelector([
|
578
|
+
const cameraButtonSelector = reselect__namespace.createSelector([
|
579
|
+
getLocalVideoStreams$1,
|
580
|
+
getDeviceManager$1,
|
581
|
+
/* @conditional-compile-remove(capabilities) */ getCapabilites,
|
582
|
+
/* @conditional-compile-remove(capabilities) */ getRole
|
583
|
+
], (localVideoStreams, deviceManager,
|
584
|
+
/* @conditional-compile-remove(capabilities) */ capabilities,
|
585
|
+
/* @conditional-compile-remove(capabilities) */ role) => {
|
570
586
|
const previewOn = _isPreviewOn(deviceManager);
|
571
587
|
const localVideoFromCall = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
572
588
|
const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.video : true;
|
573
589
|
/* @conditional-compile-remove(capabilities) */
|
574
|
-
const incapable = (capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOnOff.isPresent) === false
|
590
|
+
const incapable = ((capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOnOff.isPresent) === false &&
|
591
|
+
(capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOnOff.reason) !== 'NotInitialized' &&
|
592
|
+
/* TODO: Remove this when Calling SDK fixes bug that sets capabilities.turnVideoOnOff to be MeetingRestricted by default */
|
593
|
+
(capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOnOff.reason) !== 'MeetingRestricted') ||
|
594
|
+
role === 'Consumer';
|
575
595
|
return {
|
576
596
|
disabled: !deviceManager.selectedCamera ||
|
577
597
|
!permission ||
|
@@ -590,13 +610,19 @@ const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoSt
|
|
590
610
|
const screenShareButtonSelector = reselect__namespace.createSelector([
|
591
611
|
getIsScreenSharingOn,
|
592
612
|
/* @conditional-compile-remove(PSTN-calls) */ getCallState,
|
593
|
-
/* @conditional-compile-remove(capabilities) */ getCapabilites
|
613
|
+
/* @conditional-compile-remove(capabilities) */ getCapabilites,
|
614
|
+
/* @conditional-compile-remove(capabilities) */ getRole
|
594
615
|
], (isScreenSharingOn,
|
595
616
|
/* @conditional-compile-remove(PSTN-calls) */ callState,
|
596
|
-
/* @conditional-compile-remove(capabilities) */ capabilities
|
617
|
+
/* @conditional-compile-remove(capabilities) */ capabilities,
|
618
|
+
/* @conditional-compile-remove(capabilities) */ role) => {
|
597
619
|
let disabled = undefined;
|
598
620
|
/* @conditional-compile-remove(capabilities) */
|
599
|
-
disabled =
|
621
|
+
disabled =
|
622
|
+
disabled ||
|
623
|
+
((capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.reason) !== 'NotInitialized') ||
|
624
|
+
role === 'Consumer' ||
|
625
|
+
role === 'Attendee';
|
600
626
|
/* @conditional-compile-remove(PSTN-calls) */
|
601
627
|
disabled = disabled || ['InLobby', 'Connecting'].includes(callState);
|
602
628
|
return {
|
@@ -635,7 +661,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
635
661
|
|
636
662
|
// Copyright (c) Microsoft Corporation.
|
637
663
|
// Licensed under the MIT license.
|
638
|
-
var __awaiter$
|
664
|
+
var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
639
665
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
640
666
|
return new (P || (P = Promise))(function (resolve, reject) {
|
641
667
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -655,8 +681,8 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
655
681
|
*
|
656
682
|
* @private
|
657
683
|
*/
|
658
|
-
const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callClient, deviceManager, call) => {
|
659
|
-
const onStartLocalVideo = () => __awaiter$
|
684
|
+
const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callClient, deviceManager, call, options) => {
|
685
|
+
const onStartLocalVideo = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
660
686
|
// Before the call object creates a stream, dispose of any local preview streams.
|
661
687
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
662
688
|
// of disposing and creating a new stream?
|
@@ -676,7 +702,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
676
702
|
yield call.startVideo(stream);
|
677
703
|
}
|
678
704
|
});
|
679
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
705
|
+
const onStopLocalVideo = (stream) => __awaiter$K(void 0, void 0, void 0, function* () {
|
680
706
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
681
707
|
if (!callId) {
|
682
708
|
return;
|
@@ -685,7 +711,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
685
711
|
yield call.stopVideo(stream);
|
686
712
|
}
|
687
713
|
});
|
688
|
-
const onToggleCamera = (options) => __awaiter$
|
714
|
+
const onToggleCamera = (options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
689
715
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
690
716
|
if (previewOn && call && call.state === 'Connecting') {
|
691
717
|
// This is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
@@ -733,19 +759,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
733
759
|
}
|
734
760
|
}
|
735
761
|
});
|
736
|
-
const onSelectMicrophone = (device) => __awaiter$
|
762
|
+
const onSelectMicrophone = (device) => __awaiter$K(void 0, void 0, void 0, function* () {
|
737
763
|
if (!deviceManager) {
|
738
764
|
return;
|
739
765
|
}
|
740
766
|
return deviceManager.selectMicrophone(device);
|
741
767
|
});
|
742
|
-
const onSelectSpeaker = (device) => __awaiter$
|
768
|
+
const onSelectSpeaker = (device) => __awaiter$K(void 0, void 0, void 0, function* () {
|
743
769
|
if (!deviceManager) {
|
744
770
|
return;
|
745
771
|
}
|
746
772
|
return deviceManager.selectSpeaker(device);
|
747
773
|
});
|
748
|
-
const onSelectCamera = (device, options) => __awaiter$
|
774
|
+
const onSelectCamera = (device, options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
749
775
|
if (!deviceManager) {
|
750
776
|
return;
|
751
777
|
}
|
@@ -768,19 +794,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
768
794
|
}, options);
|
769
795
|
}
|
770
796
|
});
|
771
|
-
const onToggleMicrophone = () => __awaiter$
|
797
|
+
const onToggleMicrophone = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
772
798
|
if (!call || !_isInCall(call.state)) {
|
773
799
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
774
800
|
}
|
775
801
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
776
802
|
});
|
777
|
-
const onStartScreenShare = () => __awaiter$
|
778
|
-
const onStopScreenShare = () => __awaiter$
|
779
|
-
const onToggleScreenShare = () => __awaiter$
|
780
|
-
const onHangUp = (forEveryone) => __awaiter$
|
803
|
+
const onStartScreenShare = () => __awaiter$K(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
804
|
+
const onStopScreenShare = () => __awaiter$K(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
805
|
+
const onToggleScreenShare = () => __awaiter$K(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
806
|
+
const onHangUp = (forEveryone) => __awaiter$K(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
781
807
|
/* @conditional-compile-remove(PSTN-calls) */
|
782
|
-
const onToggleHold = () => __awaiter$
|
783
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
808
|
+
const onToggleHold = () => __awaiter$K(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.state) === 'LocalHold' ? yield (call === null || call === void 0 ? void 0 : call.resume()) : yield (call === null || call === void 0 ? void 0 : call.hold()); });
|
809
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$K(void 0, void 0, void 0, function* () {
|
784
810
|
var _a;
|
785
811
|
if (!call || call.localVideoStreams.length === 0) {
|
786
812
|
return;
|
@@ -796,7 +822,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
796
822
|
const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
|
797
823
|
return view ? { view } : undefined;
|
798
824
|
});
|
799
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
825
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$K(void 0, void 0, void 0, function* () {
|
800
826
|
if (!call) {
|
801
827
|
return;
|
802
828
|
}
|
@@ -827,7 +853,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
827
853
|
}
|
828
854
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
829
855
|
});
|
830
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
856
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
831
857
|
if (!call) {
|
832
858
|
return;
|
833
859
|
}
|
@@ -848,7 +874,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
848
874
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
849
875
|
}
|
850
876
|
});
|
851
|
-
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$
|
877
|
+
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
852
878
|
if (!call) {
|
853
879
|
return;
|
854
880
|
}
|
@@ -865,7 +891,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
865
891
|
callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
|
866
892
|
}
|
867
893
|
});
|
868
|
-
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$
|
894
|
+
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
869
895
|
if (!call) {
|
870
896
|
return;
|
871
897
|
}
|
@@ -882,7 +908,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
882
908
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
883
909
|
}
|
884
910
|
});
|
885
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
911
|
+
const onDisposeLocalStreamView = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
886
912
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
887
913
|
const callState = call && callClient.getState().calls[call.id];
|
888
914
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -895,56 +921,71 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
895
921
|
yield disposeAllLocalPreviewViews(callClient);
|
896
922
|
});
|
897
923
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
898
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
924
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$K(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
899
925
|
const notImplemented = () => {
|
900
926
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
901
927
|
};
|
902
928
|
/* @conditional-compile-remove(call-readiness) */
|
903
|
-
const askDevicePermission = (constrain) => __awaiter$
|
929
|
+
const askDevicePermission = (constrain) => __awaiter$K(void 0, void 0, void 0, function* () {
|
904
930
|
if (deviceManager) {
|
905
931
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
906
932
|
}
|
907
933
|
});
|
908
934
|
/* @conditional-compile-remove(video-background-effects) */
|
909
|
-
const onRemoveVideoBackgroundEffects = () => __awaiter$
|
935
|
+
const onRemoveVideoBackgroundEffects = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
910
936
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
911
937
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
912
938
|
if (stream) {
|
913
|
-
|
939
|
+
if (!(options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency)) {
|
940
|
+
throw new Error(`Video background effects dependency not resolved`);
|
941
|
+
}
|
942
|
+
else {
|
943
|
+
return stream.feature(communicationCalling.Features.VideoEffects).stopEffects();
|
944
|
+
}
|
914
945
|
}
|
915
946
|
});
|
916
947
|
/* @conditional-compile-remove(video-background-effects) */
|
917
|
-
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$
|
948
|
+
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$K(void 0, void 0, void 0, function* () {
|
949
|
+
var _b;
|
918
950
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
919
951
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
920
952
|
if (stream) {
|
921
|
-
|
953
|
+
if (!(options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency)) {
|
954
|
+
throw new Error(`Video background effects dependency not resolved`);
|
955
|
+
}
|
956
|
+
const createEffect = (options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency) &&
|
957
|
+
((_b = (yield options.onResolveVideoBackgroundEffectsDependency())) === null || _b === void 0 ? void 0 : _b.createBackgroundBlurEffect);
|
958
|
+
return createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundBlurConfig));
|
922
959
|
}
|
923
960
|
});
|
924
961
|
/* @conditional-compile-remove(video-background-effects) */
|
925
|
-
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$
|
962
|
+
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$K(void 0, void 0, void 0, function* () {
|
963
|
+
var _c;
|
926
964
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
927
965
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
928
966
|
if (stream) {
|
929
|
-
|
930
|
-
|
931
|
-
|
967
|
+
if (!(options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency)) {
|
968
|
+
throw new Error(`Video background effects dependency not resolved`);
|
969
|
+
}
|
970
|
+
const createEffect = (options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency) &&
|
971
|
+
((_c = (yield options.onResolveVideoBackgroundEffectsDependency())) === null || _c === void 0 ? void 0 : _c.createBackgroundReplacementEffect);
|
972
|
+
return (createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundReplacementConfig)));
|
932
973
|
}
|
933
974
|
});
|
934
975
|
/* @conditional-compile-remove(close-captions) */
|
935
|
-
const onStartCaptions = (options) => __awaiter$
|
976
|
+
const onStartCaptions = (options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
936
977
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).startCaptions(options));
|
937
978
|
});
|
938
979
|
/* @conditional-compile-remove(close-captions) */
|
939
|
-
const onStopCaptions = () => __awaiter$
|
980
|
+
const onStopCaptions = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
940
981
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).stopCaptions());
|
941
982
|
});
|
942
983
|
/* @conditional-compile-remove(close-captions) */
|
943
|
-
const onSetSpokenLanguage = (language) => __awaiter$
|
984
|
+
const onSetSpokenLanguage = (language) => __awaiter$K(void 0, void 0, void 0, function* () {
|
944
985
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).setSpokenLanguage(language));
|
945
986
|
});
|
946
987
|
/* @conditional-compile-remove(close-captions) */
|
947
|
-
const onSetCaptionLanguage = (language) => __awaiter$
|
988
|
+
const onSetCaptionLanguage = (language) => __awaiter$K(void 0, void 0, void 0, function* () {
|
948
989
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).setCaptionLanguage(language));
|
949
990
|
});
|
950
991
|
return {
|
@@ -992,7 +1033,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
992
1033
|
|
993
1034
|
// Copyright (c) Microsoft Corporation.
|
994
1035
|
// Licensed under the MIT license.
|
995
|
-
var __awaiter$
|
1036
|
+
var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
996
1037
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
997
1038
|
return new (P || (P = Promise))(function (resolve, reject) {
|
998
1039
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1009,15 +1050,18 @@ var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
1009
1050
|
*
|
1010
1051
|
* @public
|
1011
1052
|
*/
|
1012
|
-
const createDefaultCallingHandlers = memoizeOne__default['default']((
|
1013
|
-
|
1053
|
+
const createDefaultCallingHandlers = memoizeOne__default['default']((...args) => {
|
1054
|
+
const [callClient, callAgent, deviceManager, call,
|
1055
|
+
/* @conditional-compile-remove(video-background-effects) */ options] = args;
|
1056
|
+
return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call,
|
1057
|
+
/* @conditional-compile-remove(video-background-effects) */ options)), {
|
1014
1058
|
// FIXME: onStartCall API should use string, not the underlying SDK types.
|
1015
1059
|
onStartCall: (participants, options) => {
|
1016
1060
|
/* @conditional-compile-remove(teams-adhoc-call) */
|
1017
1061
|
return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);
|
1018
1062
|
},
|
1019
1063
|
/* @conditional-compile-remove(PSTN-calls) */
|
1020
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1064
|
+
onAddParticipant: (userId, options) => __awaiter$J(void 0, void 0, void 0, function* () {
|
1021
1065
|
const participant = _toCommunicationIdentifier(userId);
|
1022
1066
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
1023
1067
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -1025,7 +1069,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
1025
1069
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
1026
1070
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1027
1071
|
}
|
1028
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1072
|
+
}), onRemoveParticipant: (userId) => __awaiter$J(void 0, void 0, void 0, function* () {
|
1029
1073
|
const participant = _toCommunicationIdentifier(userId);
|
1030
1074
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
1031
1075
|
}) });
|
@@ -1033,7 +1077,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
1033
1077
|
|
1034
1078
|
// Copyright (c) Microsoft Corporation.
|
1035
1079
|
// Licensed under the MIT license.
|
1036
|
-
var __awaiter$
|
1080
|
+
var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1037
1081
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1038
1082
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1039
1083
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1050,8 +1094,8 @@ var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
1050
1094
|
*
|
1051
1095
|
* @beta
|
1052
1096
|
*/
|
1053
|
-
const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call) => {
|
1054
|
-
return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call)), { onStartCall: (participants, options) => {
|
1097
|
+
const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call, options) => {
|
1098
|
+
return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call, options)), { onStartCall: (participants, options) => {
|
1055
1099
|
/* @conditional-compile-remove(teams-identity-support) */
|
1056
1100
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
1057
1101
|
if (!isTeamsCallParticipants(participants)) {
|
@@ -1065,7 +1109,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
1065
1109
|
},
|
1066
1110
|
/* @conditional-compile-remove(teams-identity-support) */
|
1067
1111
|
/* @conditional-compile-remove(PSTN-calls) */
|
1068
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1112
|
+
onAddParticipant: (userId, options) => __awaiter$I(void 0, void 0, void 0, function* () {
|
1069
1113
|
const participant = _toCommunicationIdentifier(userId);
|
1070
1114
|
/* @conditional-compile-remove(teams-identity-support) */
|
1071
1115
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -1082,7 +1126,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
1082
1126
|
}
|
1083
1127
|
/* @conditional-compile-remove(teams-identity-support) */
|
1084
1128
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1085
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1129
|
+
}), onRemoveParticipant: (userId) => __awaiter$I(void 0, void 0, void 0, function* () {
|
1086
1130
|
const participant = _toCommunicationIdentifier(userId);
|
1087
1131
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
1088
1132
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -1164,7 +1208,7 @@ const getCaptionsSpeakerIdentifier = (captions) => {
|
|
1164
1208
|
|
1165
1209
|
// Copyright (c) Microsoft Corporation.
|
1166
1210
|
// Licensed under the MIT license.
|
1167
|
-
var __awaiter$
|
1211
|
+
var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1168
1212
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1169
1213
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1170
1214
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1213,13 +1257,13 @@ class ProxyDeviceManager {
|
|
1213
1257
|
this.selectCamera = (videoDeviceInfo) => {
|
1214
1258
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
1215
1259
|
};
|
1216
|
-
this.videoDevicesUpdated = () => __awaiter$
|
1260
|
+
this.videoDevicesUpdated = () => __awaiter$H(this, void 0, void 0, function* () {
|
1217
1261
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
1218
1262
|
// We don't want to show that in the UI.
|
1219
1263
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
1220
1264
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
1221
1265
|
});
|
1222
|
-
this.audioDevicesUpdated = () => __awaiter$
|
1266
|
+
this.audioDevicesUpdated = () => __awaiter$H(this, void 0, void 0, function* () {
|
1223
1267
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
1224
1268
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
1225
1269
|
});
|
@@ -1607,7 +1651,7 @@ function convertFromSDKToDeclarativeVideoStreamVideoEffects(videoEffects) {
|
|
1607
1651
|
|
1608
1652
|
// Copyright (c) Microsoft Corporation.
|
1609
1653
|
// Licensed under the MIT license.
|
1610
|
-
var __awaiter$
|
1654
|
+
var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1611
1655
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1612
1656
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1613
1657
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2326,7 +2370,7 @@ class CallContext$2 {
|
|
2326
2370
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
2327
2371
|
*/
|
2328
2372
|
withAsyncErrorTeedToState(action, target) {
|
2329
|
-
return (...args) => __awaiter$
|
2373
|
+
return (...args) => __awaiter$G(this, void 0, void 0, function* () {
|
2330
2374
|
try {
|
2331
2375
|
return yield action(...args);
|
2332
2376
|
}
|
@@ -2746,7 +2790,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
2746
2790
|
|
2747
2791
|
// Copyright (c) Microsoft Corporation.
|
2748
2792
|
// Licensed under the MIT license.
|
2749
|
-
var __awaiter$
|
2793
|
+
var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2750
2794
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
2751
2795
|
return new (P || (P = Promise))(function (resolve, reject) {
|
2752
2796
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2756,7 +2800,7 @@ var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
2756
2800
|
});
|
2757
2801
|
};
|
2758
2802
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
2759
|
-
return __awaiter$
|
2803
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
2760
2804
|
// we can only have 3 types of createView
|
2761
2805
|
let streamEventType;
|
2762
2806
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
@@ -2878,7 +2922,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
2878
2922
|
});
|
2879
2923
|
}
|
2880
2924
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
2881
|
-
return __awaiter$
|
2925
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
2882
2926
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
2883
2927
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
2884
2928
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -3046,7 +3090,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
3046
3090
|
// Render LocalVideoStream that is not part of a Call
|
3047
3091
|
// Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).
|
3048
3092
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
3049
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
3093
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$F(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
3050
3094
|
}
|
3051
3095
|
else {
|
3052
3096
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
@@ -3594,7 +3638,7 @@ class CallSubscriber {
|
|
3594
3638
|
|
3595
3639
|
// Copyright (c) Microsoft Corporation.
|
3596
3640
|
// Licensed under the MIT license.
|
3597
|
-
var __awaiter$
|
3641
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3598
3642
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3599
3643
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3600
3644
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3614,14 +3658,14 @@ class ProxyIncomingCall {
|
|
3614
3658
|
switch (prop) {
|
3615
3659
|
case 'accept': {
|
3616
3660
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3617
|
-
return __awaiter$
|
3661
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3618
3662
|
return yield target.accept(...args);
|
3619
3663
|
});
|
3620
3664
|
}, 'IncomingCall.accept');
|
3621
3665
|
}
|
3622
3666
|
case 'reject': {
|
3623
3667
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3624
|
-
return __awaiter$
|
3668
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3625
3669
|
return yield target.reject(...args);
|
3626
3670
|
});
|
3627
3671
|
}, 'IncomingCall.reject');
|
@@ -3862,7 +3906,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
3862
3906
|
|
3863
3907
|
// Copyright (c) Microsoft Corporation.
|
3864
3908
|
// Licensed under the MIT license.
|
3865
|
-
var __awaiter$
|
3909
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3866
3910
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3867
3911
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3868
3912
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3888,56 +3932,56 @@ class ProxyCallCommon {
|
|
3888
3932
|
switch (prop) {
|
3889
3933
|
case 'mute': {
|
3890
3934
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3891
|
-
return __awaiter$
|
3935
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3892
3936
|
return yield target.mute(...args);
|
3893
3937
|
});
|
3894
3938
|
}, 'Call.mute');
|
3895
3939
|
}
|
3896
3940
|
case 'unmute': {
|
3897
3941
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3898
|
-
return __awaiter$
|
3942
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3899
3943
|
return yield target.unmute(...args);
|
3900
3944
|
});
|
3901
3945
|
}, 'Call.unmute');
|
3902
3946
|
}
|
3903
3947
|
case 'startVideo': {
|
3904
3948
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3905
|
-
return __awaiter$
|
3949
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3906
3950
|
return yield target.startVideo(...args);
|
3907
3951
|
});
|
3908
3952
|
}, 'Call.startVideo');
|
3909
3953
|
}
|
3910
3954
|
case 'stopVideo': {
|
3911
3955
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3912
|
-
return __awaiter$
|
3956
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3913
3957
|
return yield target.stopVideo(...args);
|
3914
3958
|
});
|
3915
3959
|
}, 'Call.stopVideo');
|
3916
3960
|
}
|
3917
3961
|
case 'startScreenSharing': {
|
3918
3962
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3919
|
-
return __awaiter$
|
3963
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3920
3964
|
return yield target.startScreenSharing(...args);
|
3921
3965
|
});
|
3922
3966
|
}, 'Call.startScreenSharing');
|
3923
3967
|
}
|
3924
3968
|
case 'stopScreenSharing': {
|
3925
3969
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3926
|
-
return __awaiter$
|
3970
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3927
3971
|
return yield target.stopScreenSharing(...args);
|
3928
3972
|
});
|
3929
3973
|
}, 'Call.stopScreenSharing');
|
3930
3974
|
}
|
3931
3975
|
case 'hold': {
|
3932
3976
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3933
|
-
return __awaiter$
|
3977
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3934
3978
|
return yield target.hold(...args);
|
3935
3979
|
});
|
3936
3980
|
}, 'Call.hold');
|
3937
3981
|
}
|
3938
3982
|
case 'resume': {
|
3939
3983
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3940
|
-
return __awaiter$
|
3984
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3941
3985
|
return yield target.resume(...args);
|
3942
3986
|
});
|
3943
3987
|
}, 'Call.resume');
|
@@ -3977,7 +4021,7 @@ class ProxyTeamsCaptionsFeature {
|
|
3977
4021
|
get(target, prop) {
|
3978
4022
|
switch (prop) {
|
3979
4023
|
case 'startCaptions':
|
3980
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4024
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
3981
4025
|
var _a, _b;
|
3982
4026
|
this._context.setStartCaptionsInProgress(this._call.id, true);
|
3983
4027
|
const ret = yield target.startCaptions(...args);
|
@@ -3985,20 +4029,20 @@ class ProxyTeamsCaptionsFeature {
|
|
3985
4029
|
return ret;
|
3986
4030
|
}), 'Call.feature');
|
3987
4031
|
case 'stopCaptions':
|
3988
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4032
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
3989
4033
|
const ret = yield target.stopCaptions(...args);
|
3990
4034
|
this._context.setIsCaptionActive(this._call.id, false);
|
3991
4035
|
this._context.setStartCaptionsInProgress(this._call.id, false);
|
3992
4036
|
return ret;
|
3993
4037
|
}), 'Call.feature');
|
3994
4038
|
case 'setSpokenLanguage':
|
3995
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4039
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
3996
4040
|
const ret = yield target.setSpokenLanguage(...args);
|
3997
4041
|
this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
|
3998
4042
|
return ret;
|
3999
4043
|
}), 'Call.feature');
|
4000
4044
|
case 'setCaptionLanguage':
|
4001
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4045
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
4002
4046
|
const ret = yield target.setCaptionLanguage(...args);
|
4003
4047
|
this._context.setSelectedCaptionLanguage(this._call.id, args[0]);
|
4004
4048
|
return ret;
|
@@ -4046,7 +4090,7 @@ class ProxyTransferCallFeature {
|
|
4046
4090
|
|
4047
4091
|
// Copyright (c) Microsoft Corporation.
|
4048
4092
|
// Licensed under the MIT license.
|
4049
|
-
var __awaiter$
|
4093
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4050
4094
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4051
4095
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4052
4096
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4060,7 +4104,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
4060
4104
|
switch (prop) {
|
4061
4105
|
case 'addParticipant': {
|
4062
4106
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4063
|
-
return __awaiter$
|
4107
|
+
return __awaiter$C(this, void 0, void 0, function* () {
|
4064
4108
|
return yield target.addParticipant(...args);
|
4065
4109
|
});
|
4066
4110
|
}, 'Call.addParticipant');
|
@@ -4281,7 +4325,7 @@ class InternalCallContext {
|
|
4281
4325
|
|
4282
4326
|
// Copyright (c) Microsoft Corporation.
|
4283
4327
|
// Licensed under the MIT license.
|
4284
|
-
var __awaiter$
|
4328
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4285
4329
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4286
4330
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4287
4331
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4296,7 +4340,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
4296
4340
|
switch (prop) {
|
4297
4341
|
case 'addParticipant': {
|
4298
4342
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4299
|
-
return __awaiter$
|
4343
|
+
return __awaiter$B(this, void 0, void 0, function* () {
|
4300
4344
|
return yield target.addParticipant(...args);
|
4301
4345
|
});
|
4302
4346
|
}, 'TeamsCall.addParticipant');
|
@@ -4411,7 +4455,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
4411
4455
|
|
4412
4456
|
// Copyright (c) Microsoft Corporation.
|
4413
4457
|
// Licensed under the MIT license.
|
4414
|
-
var __awaiter$
|
4458
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4415
4459
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4416
4460
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4417
4461
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4433,7 +4477,7 @@ class ProxyVideoStreamRendererView {
|
|
4433
4477
|
get(target, prop) {
|
4434
4478
|
switch (prop) {
|
4435
4479
|
case 'updateScalingMode': {
|
4436
|
-
return (...args) => __awaiter$
|
4480
|
+
return (...args) => __awaiter$A(this, void 0, void 0, function* () {
|
4437
4481
|
yield target.updateScalingMode(...args);
|
4438
4482
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
4439
4483
|
});
|
@@ -4454,7 +4498,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
4454
4498
|
|
4455
4499
|
// Copyright (c) Microsoft Corporation.
|
4456
4500
|
// Licensed under the MIT license.
|
4457
|
-
var __awaiter$
|
4501
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4458
4502
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4459
4503
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4460
4504
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4476,7 +4520,7 @@ class ProxyCallClient {
|
|
4476
4520
|
get(target, prop) {
|
4477
4521
|
switch (prop) {
|
4478
4522
|
case 'createCallAgent': {
|
4479
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4523
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$z(this, void 0, void 0, function* () {
|
4480
4524
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4481
4525
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4482
4526
|
// callAgent if the createCallAgent succeeds.
|
@@ -4489,7 +4533,7 @@ class ProxyCallClient {
|
|
4489
4533
|
}), 'CallClient.createCallAgent');
|
4490
4534
|
}
|
4491
4535
|
case 'createTeamsCallAgent': {
|
4492
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4536
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$z(this, void 0, void 0, function* () {
|
4493
4537
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4494
4538
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4495
4539
|
// callAgent if the createCallAgent succeeds.
|
@@ -4502,7 +4546,7 @@ class ProxyCallClient {
|
|
4502
4546
|
}), 'CallClient.createTeamsCallAgent');
|
4503
4547
|
}
|
4504
4548
|
case 'getDeviceManager': {
|
4505
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
4549
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$z(this, void 0, void 0, function* () {
|
4506
4550
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
4507
4551
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
4508
4552
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -4531,7 +4575,7 @@ class ProxyCallClient {
|
|
4531
4575
|
/**
|
4532
4576
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
4533
4577
|
*/
|
4534
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
4578
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$z(this, void 0, void 0, function* () {
|
4535
4579
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
4536
4580
|
this._context.setEnvironmentInfo(environmentInfo);
|
4537
4581
|
return environmentInfo;
|
@@ -4584,7 +4628,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
4584
4628
|
});
|
4585
4629
|
Object.defineProperty(callClient, 'createView', {
|
4586
4630
|
configurable: false,
|
4587
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
4631
|
+
value: (callId, participantId, stream, options) => __awaiter$z(void 0, void 0, void 0, function* () {
|
4588
4632
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
4589
4633
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
4590
4634
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -7286,7 +7330,7 @@ const _MentionPopover = (props) => {
|
|
7286
7330
|
|
7287
7331
|
// Copyright (c) Microsoft Corporation.
|
7288
7332
|
// Licensed under the MIT license.
|
7289
|
-
var __awaiter$
|
7333
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7290
7334
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7291
7335
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7292
7336
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7461,7 +7505,7 @@ const TextFieldWithMention = (props) => {
|
|
7461
7505
|
onSuggestionSelected,
|
7462
7506
|
updateMentionSuggestions
|
7463
7507
|
]);
|
7464
|
-
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$
|
7508
|
+
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$y(void 0, void 0, void 0, function* () {
|
7465
7509
|
var _a;
|
7466
7510
|
let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
|
7467
7511
|
suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
|
@@ -7638,7 +7682,7 @@ const TextFieldWithMention = (props) => {
|
|
7638
7682
|
});
|
7639
7683
|
}
|
7640
7684
|
}, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
|
7641
|
-
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$
|
7685
|
+
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$y(void 0, void 0, void 0, function* () {
|
7642
7686
|
var _b;
|
7643
7687
|
debouncedQueryUpdate.cancel();
|
7644
7688
|
if (event.currentTarget === null) {
|
@@ -9386,7 +9430,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
9386
9430
|
return actionMenuProps;
|
9387
9431
|
};
|
9388
9432
|
|
9389
|
-
var __awaiter$
|
9433
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9390
9434
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9391
9435
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9392
9436
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9429,7 +9473,7 @@ const _FileDownloadCards = (props) => {
|
|
9429
9473
|
fileCount: `${fileMetadata.filter(isFileSharingAttachment).length}`
|
9430
9474
|
});
|
9431
9475
|
}, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);
|
9432
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
9476
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$x(void 0, void 0, void 0, function* () {
|
9433
9477
|
if (!props.downloadHandler) {
|
9434
9478
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
9435
9479
|
}
|
@@ -9599,7 +9643,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
|
|
9599
9643
|
|
9600
9644
|
// Copyright (c) Microsoft Corporation.
|
9601
9645
|
// Licensed under the MIT license.
|
9602
|
-
var __awaiter$
|
9646
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9603
9647
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9604
9648
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9605
9649
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9632,7 +9676,7 @@ const ChatMessageComponent = (props) => {
|
|
9632
9676
|
onSendMessage && onSendMessage(content !== undefined ? content : '');
|
9633
9677
|
}, [clientMessageId, content, onSendMessage, onDeleteMessage]);
|
9634
9678
|
if (isEditing && message.messageType === 'chat') {
|
9635
|
-
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
9679
|
+
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$w(void 0, void 0, void 0, function* () {
|
9636
9680
|
props.onUpdateMessage &&
|
9637
9681
|
message.messageId &&
|
9638
9682
|
(yield props.onUpdateMessage(message.messageId, text, metadata, options));
|
@@ -9821,7 +9865,7 @@ const LiveAnnouncer = (props) => {
|
|
9821
9865
|
|
9822
9866
|
// Copyright (c) Microsoft Corporation.
|
9823
9867
|
// Licensed under the MIT license.
|
9824
|
-
var __awaiter$
|
9868
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9825
9869
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9826
9870
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9827
9871
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10043,7 +10087,7 @@ const MessageThread = (props) => {
|
|
10043
10087
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10044
10088
|
const [inlineAttachments, setInlineAttachments] = React.useState({});
|
10045
10089
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10046
|
-
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$
|
10090
|
+
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$v(void 0, void 0, void 0, function* () {
|
10047
10091
|
if (!onFetchAttachments || attachment.attachmentType !== 'inlineImage' || attachment.id in inlineAttachments) {
|
10048
10092
|
return;
|
10049
10093
|
}
|
@@ -10092,7 +10136,7 @@ const MessageThread = (props) => {
|
|
10092
10136
|
setChatMessagesInitialized(chatMessagesInitialized);
|
10093
10137
|
};
|
10094
10138
|
// we try to only send those message status if user is scrolled to the bottom.
|
10095
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
10139
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$v(void 0, void 0, void 0, function* () {
|
10096
10140
|
if (!isAtBottomOfScrollRef.current ||
|
10097
10141
|
!document.hasFocus() ||
|
10098
10142
|
!messagesRef.current ||
|
@@ -10143,7 +10187,7 @@ const MessageThread = (props) => {
|
|
10143
10187
|
setIsAtBottomOfScrollRef(atBottom);
|
10144
10188
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
10145
10189
|
// Infinite scrolling + threadInitialize function
|
10146
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
10190
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$v(void 0, void 0, void 0, function* () {
|
10147
10191
|
if (!isLoadingChatMessagesRef.current) {
|
10148
10192
|
if (onLoadPreviousChatMessages) {
|
10149
10193
|
isLoadingChatMessagesRef.current = true;
|
@@ -14506,7 +14550,7 @@ const DevicesButton = (props) => {
|
|
14506
14550
|
|
14507
14551
|
// Copyright (c) Microsoft Corporation.
|
14508
14552
|
// Licensed under the MIT license.
|
14509
|
-
var __awaiter$
|
14553
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14510
14554
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14511
14555
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14512
14556
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14544,7 +14588,7 @@ const CameraButton = (props) => {
|
|
14544
14588
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
14545
14589
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
14546
14590
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
14547
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
14591
|
+
const onToggleClick = React.useCallback(() => __awaiter$u(void 0, void 0, void 0, function* () {
|
14548
14592
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
14549
14593
|
if (onToggleCamera) {
|
14550
14594
|
setWaitForCamera(true);
|
@@ -14712,7 +14756,7 @@ const lightThemeCallButtonStyles = {
|
|
14712
14756
|
|
14713
14757
|
// Copyright (c) Microsoft Corporation.
|
14714
14758
|
// Licensed under the MIT license.
|
14715
|
-
var __awaiter$
|
14759
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14716
14760
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14717
14761
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14718
14762
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14753,7 +14797,7 @@ const MicrophoneButton = (props) => {
|
|
14753
14797
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
14754
14798
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
14755
14799
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
14756
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
14800
|
+
const onToggleClick = React.useCallback(() => __awaiter$t(void 0, void 0, void 0, function* () {
|
14757
14801
|
if (onToggleMicrophone) {
|
14758
14802
|
try {
|
14759
14803
|
yield onToggleMicrophone();
|
@@ -15649,7 +15693,7 @@ const formatPhoneNumber = (phoneNumber) => {
|
|
15649
15693
|
|
15650
15694
|
// Copyright (c) Microsoft Corporation.
|
15651
15695
|
// Licensed under the MIT license.
|
15652
|
-
var __awaiter$
|
15696
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15653
15697
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15654
15698
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15655
15699
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15691,10 +15735,10 @@ const DialpadButton = (props) => {
|
|
15691
15735
|
const theme = react.useTheme();
|
15692
15736
|
const { digit, index, onClick, onLongPress, isMobile = false } = props;
|
15693
15737
|
const useLongPressProps = React__default['default'].useMemo(() => ({
|
15694
|
-
onClick: () => __awaiter$
|
15738
|
+
onClick: () => __awaiter$s(void 0, void 0, void 0, function* () {
|
15695
15739
|
onClick(digit, index);
|
15696
15740
|
}),
|
15697
|
-
onLongPress: () => __awaiter$
|
15741
|
+
onLongPress: () => __awaiter$s(void 0, void 0, void 0, function* () {
|
15698
15742
|
onLongPress(digit, index);
|
15699
15743
|
}),
|
15700
15744
|
touchEventsOnly: isMobile
|
@@ -16468,7 +16512,7 @@ const dropdownStyles = {
|
|
16468
16512
|
callout: Object.assign({ height: _pxToRem(300), overflow: 'auto' }, scrollbarStyles)
|
16469
16513
|
};
|
16470
16514
|
|
16471
|
-
var __awaiter$
|
16515
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16472
16516
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16473
16517
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16474
16518
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16503,7 +16547,7 @@ const _CaptionsSettingsModal = (props) => {
|
|
16503
16547
|
setHasSetSpokenLanguage(true);
|
16504
16548
|
}
|
16505
16549
|
}, [isCaptionsFeatureActive, onSetSpokenLanguage, selectedItem.key, hasSetSpokenLanguage]);
|
16506
|
-
const onConfirm = React.useCallback(() => __awaiter$
|
16550
|
+
const onConfirm = React.useCallback(() => __awaiter$r(void 0, void 0, void 0, function* () {
|
16507
16551
|
const languageCode = selectedItem.key.toString();
|
16508
16552
|
if (isCaptionsFeatureActive) {
|
16509
16553
|
onSetSpokenLanguage(languageCode);
|
@@ -17135,7 +17179,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
17135
17179
|
|
17136
17180
|
// Copyright (c) Microsoft Corporation.
|
17137
17181
|
// Licensed under the MIT license.
|
17138
|
-
var __awaiter$
|
17182
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17139
17183
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17140
17184
|
return new (P || (P = Promise))(function (resolve, reject) {
|
17141
17185
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -17158,35 +17202,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
17158
17202
|
let messageIterator = undefined;
|
17159
17203
|
let readReceiptIterator = undefined;
|
17160
17204
|
return {
|
17161
|
-
onSendMessage: (content, options) => __awaiter$
|
17205
|
+
onSendMessage: (content, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17162
17206
|
const sendMessageRequest = {
|
17163
17207
|
content,
|
17164
17208
|
senderDisplayName: chatClient.getState().displayName
|
17165
17209
|
};
|
17166
17210
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
17167
17211
|
}),
|
17168
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
17212
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17169
17213
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
17170
17214
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
17171
17215
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
17172
17216
|
}),
|
17173
|
-
onDeleteMessage: (messageId) => __awaiter$
|
17217
|
+
onDeleteMessage: (messageId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17174
17218
|
yield chatThreadClient.deleteMessage(messageId);
|
17175
17219
|
}),
|
17176
17220
|
// This handler is designed for chatThread to consume
|
17177
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
17221
|
+
onMessageSeen: (chatMessageId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17178
17222
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
17179
17223
|
}),
|
17180
|
-
onTyping: () => __awaiter$
|
17224
|
+
onTyping: () => __awaiter$q(void 0, void 0, void 0, function* () {
|
17181
17225
|
yield chatThreadClient.sendTypingNotification();
|
17182
17226
|
}),
|
17183
|
-
onRemoveParticipant: (userId) => __awaiter$
|
17227
|
+
onRemoveParticipant: (userId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17184
17228
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
17185
17229
|
}),
|
17186
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
17230
|
+
updateThreadTopicName: (topicName) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17187
17231
|
yield chatThreadClient.updateTopic(topicName);
|
17188
17232
|
}),
|
17189
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
17233
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17190
17234
|
var _a, _b, _c;
|
17191
17235
|
if (messageIterator === undefined) {
|
17192
17236
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -18053,7 +18097,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
18053
18097
|
|
18054
18098
|
// Copyright (c) Microsoft Corporation.
|
18055
18099
|
// Licensed under the MIT license.
|
18056
|
-
var __awaiter$
|
18100
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18057
18101
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18058
18102
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18059
18103
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18328,7 +18372,7 @@ class ChatContext$1 {
|
|
18328
18372
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
18329
18373
|
*/
|
18330
18374
|
withAsyncErrorTeedToState(f, target) {
|
18331
|
-
return (...args) => __awaiter$
|
18375
|
+
return (...args) => __awaiter$p(this, void 0, void 0, function* () {
|
18332
18376
|
try {
|
18333
18377
|
return yield f(...args);
|
18334
18378
|
}
|
@@ -18440,7 +18484,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
18440
18484
|
|
18441
18485
|
// Copyright (c) Microsoft Corporation.
|
18442
18486
|
// Licensed under the MIT license.
|
18443
|
-
var __awaiter$
|
18487
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18444
18488
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18445
18489
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18446
18490
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18529,7 +18573,7 @@ class EventSubscriber {
|
|
18529
18573
|
};
|
18530
18574
|
// This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
|
18531
18575
|
// Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
|
18532
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
18576
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$o(this, void 0, void 0, function* () {
|
18533
18577
|
var e_1, _a;
|
18534
18578
|
try {
|
18535
18579
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -18621,7 +18665,7 @@ class EventSubscriber {
|
|
18621
18665
|
|
18622
18666
|
// Copyright (c) Microsoft Corporation.
|
18623
18667
|
// Licensed under the MIT license.
|
18624
|
-
var __awaiter$
|
18668
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18625
18669
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18626
18670
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18627
18671
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18643,7 +18687,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
18643
18687
|
const threadsIterator = iteratorCreator(...args);
|
18644
18688
|
return {
|
18645
18689
|
next() {
|
18646
|
-
return __awaiter$
|
18690
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
18647
18691
|
const result = yield threadsIterator.next();
|
18648
18692
|
if (!result.done && result.value) {
|
18649
18693
|
decorateFn(result.value, context);
|
@@ -18658,7 +18702,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
18658
18702
|
const pages = threadsIterator.byPage(settings);
|
18659
18703
|
return {
|
18660
18704
|
next() {
|
18661
|
-
return __awaiter$
|
18705
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
18662
18706
|
const result = yield pages.next();
|
18663
18707
|
const page = result.value;
|
18664
18708
|
if (!result.done && result.value) {
|
@@ -18742,7 +18786,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
18742
18786
|
|
18743
18787
|
// Copyright (c) Microsoft Corporation.
|
18744
18788
|
// Licensed under the MIT license.
|
18745
|
-
var __awaiter$
|
18789
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18746
18790
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18747
18791
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18748
18792
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18761,14 +18805,14 @@ class ProxyChatThreadClient {
|
|
18761
18805
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
18762
18806
|
}
|
18763
18807
|
case 'getMessage': {
|
18764
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18808
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18765
18809
|
const message = yield chatThreadClient.getMessage(...args);
|
18766
18810
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
18767
18811
|
return message;
|
18768
18812
|
}), 'ChatThreadClient.getMessage');
|
18769
18813
|
}
|
18770
18814
|
case 'sendMessage': {
|
18771
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18815
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18772
18816
|
// Retry logic?
|
18773
18817
|
const [request, options] = args;
|
18774
18818
|
const { content } = request;
|
@@ -18808,7 +18852,7 @@ class ProxyChatThreadClient {
|
|
18808
18852
|
}), 'ChatThreadClient.sendMessage');
|
18809
18853
|
}
|
18810
18854
|
case 'addParticipants': {
|
18811
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18855
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18812
18856
|
const result = yield chatThreadClient.addParticipants(...args);
|
18813
18857
|
const [addRequest] = args;
|
18814
18858
|
const participantsToAdd = addRequest.participants;
|
@@ -18817,7 +18861,7 @@ class ProxyChatThreadClient {
|
|
18817
18861
|
}), 'ChatThreadClient.addParticipants');
|
18818
18862
|
}
|
18819
18863
|
case 'deleteMessage': {
|
18820
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18864
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18821
18865
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
18822
18866
|
const [messageId] = args;
|
18823
18867
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -18835,12 +18879,12 @@ class ProxyChatThreadClient {
|
|
18835
18879
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
18836
18880
|
}
|
18837
18881
|
case 'sendTypingNotification': {
|
18838
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18882
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18839
18883
|
return yield chatThreadClient.sendTypingNotification(...args);
|
18840
18884
|
}), 'ChatThreadClient.sendTypingNotification');
|
18841
18885
|
}
|
18842
18886
|
case 'removeParticipant': {
|
18843
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18887
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18844
18888
|
const result = yield chatThreadClient.removeParticipant(...args);
|
18845
18889
|
const [removeIdentifier] = args;
|
18846
18890
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -18848,7 +18892,7 @@ class ProxyChatThreadClient {
|
|
18848
18892
|
}), 'ChatThreadClient.removeParticipant');
|
18849
18893
|
}
|
18850
18894
|
case 'updateMessage': {
|
18851
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18895
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18852
18896
|
const result = yield chatThreadClient.updateMessage(...args);
|
18853
18897
|
const [messageId, updateOption] = args;
|
18854
18898
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -18856,7 +18900,7 @@ class ProxyChatThreadClient {
|
|
18856
18900
|
}), 'ChatThreadClient.updateMessage');
|
18857
18901
|
}
|
18858
18902
|
case 'updateTopic': {
|
18859
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18903
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18860
18904
|
const result = yield chatThreadClient.updateTopic(...args);
|
18861
18905
|
const [topic] = args;
|
18862
18906
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -18864,7 +18908,7 @@ class ProxyChatThreadClient {
|
|
18864
18908
|
}), 'ChatThreadClient.updateTopic');
|
18865
18909
|
}
|
18866
18910
|
case 'getProperties': {
|
18867
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18911
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18868
18912
|
const result = yield chatThreadClient.getProperties(...args);
|
18869
18913
|
this._context.updateThread(chatThreadClient.threadId, result);
|
18870
18914
|
return result;
|
@@ -18901,7 +18945,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
18901
18945
|
|
18902
18946
|
// Copyright (c) Microsoft Corporation.
|
18903
18947
|
// Licensed under the MIT license.
|
18904
|
-
var __awaiter$
|
18948
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18905
18949
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18906
18950
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18907
18951
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18920,7 +18964,7 @@ const proxyChatClient = {
|
|
18920
18964
|
switch (prop) {
|
18921
18965
|
case 'createChatThread': {
|
18922
18966
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18923
|
-
return __awaiter$
|
18967
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18924
18968
|
const result = yield chatClient.createChatThread(...args);
|
18925
18969
|
const thread = result.chatThread;
|
18926
18970
|
if (thread) {
|
@@ -18933,7 +18977,7 @@ const proxyChatClient = {
|
|
18933
18977
|
}
|
18934
18978
|
case 'deleteChatThread': {
|
18935
18979
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18936
|
-
return __awaiter$
|
18980
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18937
18981
|
const result = yield chatClient.deleteChatThread(...args);
|
18938
18982
|
context.deleteThread(args[0]);
|
18939
18983
|
return result;
|
@@ -18953,7 +18997,7 @@ const proxyChatClient = {
|
|
18953
18997
|
}
|
18954
18998
|
case 'startRealtimeNotifications': {
|
18955
18999
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18956
|
-
return __awaiter$
|
19000
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18957
19001
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
18958
19002
|
if (!receiver.eventSubscriber) {
|
18959
19003
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -18964,7 +19008,7 @@ const proxyChatClient = {
|
|
18964
19008
|
}
|
18965
19009
|
case 'stopRealtimeNotifications': {
|
18966
19010
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18967
|
-
return __awaiter$
|
19011
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18968
19012
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
18969
19013
|
if (receiver.eventSubscriber) {
|
18970
19014
|
receiver.eventSubscriber.unsubscribe();
|
@@ -19114,7 +19158,7 @@ const COMPOSITE_ONLY_ICONS = {
|
|
19114
19158
|
/* @conditional-compile-remove(PSTN-calls) */
|
19115
19159
|
DialpadStartCall: React__default['default'].createElement(reactIcons.Call20Regular, null),
|
19116
19160
|
/* @conditional-compile-remove(rooms) */
|
19117
|
-
|
19161
|
+
NoticePageAccessDeniedRoomsCall: React__default['default'].createElement(reactIcons.Info20Filled, null),
|
19118
19162
|
/* @conditional-compile-remove(video-background-effects) */
|
19119
19163
|
BlurVideoBackground: React__default['default'].createElement(reactIcons.VideoBackgroundEffect20Regular, null),
|
19120
19164
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -19630,7 +19674,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
|
|
19630
19674
|
|
19631
19675
|
// Copyright (c) Microsoft Corporation.
|
19632
19676
|
// Licensed under the MIT license.
|
19633
|
-
var __awaiter$
|
19677
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
19634
19678
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
19635
19679
|
return new (P || (P = Promise))(function (resolve, reject) {
|
19636
19680
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -19765,9 +19809,9 @@ class AzureCommunicationChatAdapter {
|
|
19765
19809
|
this.unsubscribeAllEvents();
|
19766
19810
|
}
|
19767
19811
|
fetchInitialData() {
|
19768
|
-
return __awaiter$
|
19812
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19769
19813
|
// If get properties fails we dont want to try to get the participants after.
|
19770
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19814
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19771
19815
|
var e_1, _a;
|
19772
19816
|
yield this.chatThreadClient.getProperties();
|
19773
19817
|
try {
|
@@ -19801,8 +19845,8 @@ class AzureCommunicationChatAdapter {
|
|
19801
19845
|
this.context.offStateChange(handler);
|
19802
19846
|
}
|
19803
19847
|
sendMessage(content, options = {}) {
|
19804
|
-
return __awaiter$
|
19805
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19848
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19849
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19806
19850
|
/* @conditional-compile-remove(file-sharing) */
|
19807
19851
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
19808
19852
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -19819,51 +19863,51 @@ class AzureCommunicationChatAdapter {
|
|
19819
19863
|
});
|
19820
19864
|
}
|
19821
19865
|
sendReadReceipt(chatMessageId) {
|
19822
|
-
return __awaiter$
|
19823
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19866
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19867
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19824
19868
|
yield this.handlers.onMessageSeen(chatMessageId);
|
19825
19869
|
}));
|
19826
19870
|
});
|
19827
19871
|
}
|
19828
19872
|
sendTypingIndicator() {
|
19829
|
-
return __awaiter$
|
19830
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19873
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19874
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19831
19875
|
yield this.handlers.onTyping();
|
19832
19876
|
}));
|
19833
19877
|
});
|
19834
19878
|
}
|
19835
19879
|
removeParticipant(userId) {
|
19836
|
-
return __awaiter$
|
19837
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19880
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19881
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19838
19882
|
yield this.handlers.onRemoveParticipant(userId);
|
19839
19883
|
}));
|
19840
19884
|
});
|
19841
19885
|
}
|
19842
19886
|
setTopic(topicName) {
|
19843
|
-
return __awaiter$
|
19844
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19887
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19888
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19845
19889
|
yield this.handlers.updateThreadTopicName(topicName);
|
19846
19890
|
}));
|
19847
19891
|
});
|
19848
19892
|
}
|
19849
19893
|
loadPreviousChatMessages(messagesToLoad) {
|
19850
|
-
return __awaiter$
|
19851
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19894
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19895
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19852
19896
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
19853
19897
|
}));
|
19854
19898
|
});
|
19855
19899
|
}
|
19856
19900
|
updateMessage(messageId, content, metadata, options) {
|
19857
|
-
return __awaiter$
|
19858
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19901
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19902
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19859
19903
|
/* @conditional-compile-remove(file-sharing) */
|
19860
19904
|
return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
|
19861
19905
|
}));
|
19862
19906
|
});
|
19863
19907
|
}
|
19864
19908
|
deleteMessage(messageId) {
|
19865
|
-
return __awaiter$
|
19866
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19909
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19910
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19867
19911
|
return yield this.handlers.onDeleteMessage(messageId);
|
19868
19912
|
}));
|
19869
19913
|
});
|
@@ -19898,8 +19942,8 @@ class AzureCommunicationChatAdapter {
|
|
19898
19942
|
}
|
19899
19943
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
19900
19944
|
downloadAttachments(options) {
|
19901
|
-
return __awaiter$
|
19902
|
-
return this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19945
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19946
|
+
return this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19903
19947
|
if (this.credential === undefined) {
|
19904
19948
|
const e = new Error();
|
19905
19949
|
e['target'] = 'ChatThreadClient.getMessage';
|
@@ -19919,9 +19963,9 @@ class AzureCommunicationChatAdapter {
|
|
19919
19963
|
}
|
19920
19964
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
19921
19965
|
downloadAuthenticatedFile(accessToken, options) {
|
19922
|
-
return __awaiter$
|
19966
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19923
19967
|
function fetchWithAuthentication(url, token) {
|
19924
|
-
return __awaiter$
|
19968
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19925
19969
|
const headers = new Headers();
|
19926
19970
|
headers.append('Authorization', `Bearer ${token}`);
|
19927
19971
|
try {
|
@@ -19993,7 +20037,7 @@ class AzureCommunicationChatAdapter {
|
|
19993
20037
|
this.emitter.off(event, listener);
|
19994
20038
|
}
|
19995
20039
|
asyncTeeErrorToEventEmitter(f) {
|
19996
|
-
return __awaiter$
|
20040
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19997
20041
|
try {
|
19998
20042
|
return yield f();
|
19999
20043
|
}
|
@@ -20035,7 +20079,7 @@ const convertEventType = (type) => {
|
|
20035
20079
|
*
|
20036
20080
|
* @public
|
20037
20081
|
*/
|
20038
|
-
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$
|
20082
|
+
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$k(void 0, void 0, void 0, function* () {
|
20039
20083
|
if (!_isValidIdentifier(userId)) {
|
20040
20084
|
throw new Error('Provided userId is invalid. Please provide valid identifier object.');
|
20041
20085
|
}
|
@@ -20104,7 +20148,7 @@ beforeDispose) => {
|
|
20104
20148
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
20105
20149
|
return;
|
20106
20150
|
}
|
20107
|
-
(() => __awaiter$
|
20151
|
+
(() => __awaiter$k(void 0, void 0, void 0, function* () {
|
20108
20152
|
if (adapterRef.current) {
|
20109
20153
|
// Dispose the old adapter when a new one is created.
|
20110
20154
|
//
|
@@ -20136,7 +20180,7 @@ beforeDispose) => {
|
|
20136
20180
|
// Dispose any existing adapter when the component unmounts.
|
20137
20181
|
React.useEffect(() => {
|
20138
20182
|
return () => {
|
20139
|
-
(() => __awaiter$
|
20183
|
+
(() => __awaiter$k(void 0, void 0, void 0, function* () {
|
20140
20184
|
if (adapterRef.current) {
|
20141
20185
|
if (beforeDisposeRef.current) {
|
20142
20186
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -20160,7 +20204,7 @@ beforeDispose) => {
|
|
20160
20204
|
function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
20161
20205
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
20162
20206
|
options) {
|
20163
|
-
return __awaiter$
|
20207
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
20164
20208
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient,
|
20165
20209
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ options);
|
20166
20210
|
});
|
@@ -20373,7 +20417,7 @@ const sendboxContainerStyles = {
|
|
20373
20417
|
|
20374
20418
|
// Copyright (c) Microsoft Corporation.
|
20375
20419
|
// Licensed under the MIT license.
|
20376
|
-
var __awaiter$
|
20420
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20377
20421
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20378
20422
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20379
20423
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20394,7 +20438,7 @@ const AvatarPersona = (props) => {
|
|
20394
20438
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
20395
20439
|
const [data, setData] = React.useState();
|
20396
20440
|
React.useEffect(() => {
|
20397
|
-
(() => __awaiter$
|
20441
|
+
(() => __awaiter$j(void 0, void 0, void 0, function* () {
|
20398
20442
|
if (dataProvider && userId) {
|
20399
20443
|
const newData = yield dataProvider(userId);
|
20400
20444
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
@@ -20775,7 +20819,7 @@ const FileDownloadErrorBar = (props) => {
|
|
20775
20819
|
|
20776
20820
|
// Copyright (c) Microsoft Corporation.
|
20777
20821
|
// Licensed under the MIT license.
|
20778
|
-
var __awaiter$
|
20822
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20779
20823
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20780
20824
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20781
20825
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20796,7 +20840,7 @@ const ChatScreen = (props) => {
|
|
20796
20840
|
const theme = useTheme();
|
20797
20841
|
React.useEffect(() => {
|
20798
20842
|
// Initial data should be always fetched by the composite(or external caller) instead of the adapter
|
20799
|
-
const fetchData = () => __awaiter$
|
20843
|
+
const fetchData = () => __awaiter$i(void 0, void 0, void 0, function* () {
|
20800
20844
|
// Fetch initial data for adapter
|
20801
20845
|
yield adapter.fetchInitialData();
|
20802
20846
|
// Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.
|
@@ -20830,7 +20874,7 @@ const ChatScreen = (props) => {
|
|
20830
20874
|
setDownloadErrorMessage(errorMessage);
|
20831
20875
|
} })), [fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler]);
|
20832
20876
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
20833
|
-
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$
|
20877
|
+
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$i(void 0, void 0, void 0, function* () {
|
20834
20878
|
if (attachment.attachmentType === 'inlineImage' && attachment.previewUrl) {
|
20835
20879
|
const blob = yield adapter.downloadAttachments({ attachmentUrls: [attachment.previewUrl] });
|
20836
20880
|
return blob;
|
@@ -21065,7 +21109,7 @@ const END_CALL_PAGES = [
|
|
21065
21109
|
|
21066
21110
|
// Copyright (c) Microsoft Corporation.
|
21067
21111
|
// Licensed under the MIT license.
|
21068
|
-
var __awaiter$
|
21112
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21069
21113
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21070
21114
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21071
21115
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21295,7 +21339,7 @@ const isDisabled$2 = (option) => {
|
|
21295
21339
|
/**
|
21296
21340
|
* @returns Permissions state for the camera.
|
21297
21341
|
*/
|
21298
|
-
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$
|
21342
|
+
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$h(void 0, void 0, void 0, function* () {
|
21299
21343
|
try {
|
21300
21344
|
return (yield navigator.permissions.query({ name: 'camera' })).state;
|
21301
21345
|
}
|
@@ -21308,7 +21352,7 @@ const queryCameraPermissionFromPermissionsAPI = () => __awaiter$f(void 0, void 0
|
|
21308
21352
|
/**
|
21309
21353
|
* @returns Permissions state for the microphone.
|
21310
21354
|
*/
|
21311
|
-
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$
|
21355
|
+
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$h(void 0, void 0, void 0, function* () {
|
21312
21356
|
try {
|
21313
21357
|
return (yield navigator.permissions.query({ name: 'microphone' })).state;
|
21314
21358
|
}
|
@@ -21325,7 +21369,7 @@ const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$f(void 0, vo
|
|
21325
21369
|
* If permission API is not supported on this browser, permission state is set to unsupported.
|
21326
21370
|
* @private
|
21327
21371
|
*/
|
21328
|
-
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$
|
21372
|
+
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$h(void 0, void 0, void 0, function* () {
|
21329
21373
|
const [cameraResult, microphoneResult] = yield Promise.all([
|
21330
21374
|
queryCameraPermissionFromPermissionsAPI(),
|
21331
21375
|
queryMicrophonePermissionFromPermissionsAPI()
|
@@ -21388,10 +21432,12 @@ const createParticipantModifier = (createModifiedParticipant) => {
|
|
21388
21432
|
};
|
21389
21433
|
/* @conditional-compile-remove(video-background-effects) */
|
21390
21434
|
/** @private */
|
21391
|
-
const getBackgroundEffectFromSelectedEffect = (selectedEffect) => (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'blur'
|
21392
|
-
?
|
21435
|
+
const getBackgroundEffectFromSelectedEffect = (selectedEffect, VideoBackgroundEffectsDependency) => (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'blur'
|
21436
|
+
? VideoBackgroundEffectsDependency.createBackgroundBlurEffect()
|
21393
21437
|
: (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'replacement'
|
21394
|
-
?
|
21438
|
+
? VideoBackgroundEffectsDependency.createBackgroundReplacementEffect({
|
21439
|
+
backgroundImageUrl: selectedEffect.backgroundImageUrl
|
21440
|
+
})
|
21395
21441
|
: undefined;
|
21396
21442
|
/**
|
21397
21443
|
* @remarks this logic should mimic the onToggleCamera in the common call handlers.
|
@@ -21401,7 +21447,7 @@ const getSelectedCameraFromAdapterState = (state) => state.devices.selectedCamer
|
|
21401
21447
|
|
21402
21448
|
// Copyright (c) Microsoft Corporation.
|
21403
21449
|
// Licensed under the MIT license.
|
21404
|
-
var __awaiter$
|
21450
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21405
21451
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21406
21452
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21407
21453
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21420,112 +21466,112 @@ _component) => {
|
|
21420
21466
|
return createCompositeHandlers(useAdapter());
|
21421
21467
|
};
|
21422
21468
|
const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
21423
|
-
onCreateLocalStreamView: (options) => __awaiter$
|
21469
|
+
onCreateLocalStreamView: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21424
21470
|
return yield adapter.createStreamView(undefined, options);
|
21425
21471
|
}),
|
21426
|
-
onCreateRemoteStreamView: (userId, options) => __awaiter$
|
21472
|
+
onCreateRemoteStreamView: (userId, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21427
21473
|
return yield adapter.createStreamView(userId, options);
|
21428
21474
|
}),
|
21429
|
-
onHangUp: (forEveryone) => __awaiter$
|
21475
|
+
onHangUp: (forEveryone) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21430
21476
|
yield adapter.leaveCall(forEveryone);
|
21431
21477
|
}),
|
21432
21478
|
/* @conditional-compile-remove(PSTN-calls) */
|
21433
|
-
onToggleHold: () => __awaiter$
|
21479
|
+
onToggleHold: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21434
21480
|
var _a;
|
21435
21481
|
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
|
21436
21482
|
}),
|
21437
21483
|
/* @conditional-compile-remove(PSTN-calls) */
|
21438
|
-
onAddParticipant: (participant, options) => __awaiter$
|
21484
|
+
onAddParticipant: (participant, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21439
21485
|
return yield adapter.addParticipant(participant, options);
|
21440
21486
|
}),
|
21441
21487
|
/* @conditional-compile-remove(PSTN-calls) */
|
21442
|
-
onSendDtmfTone: (dtmfTone) => __awaiter$
|
21488
|
+
onSendDtmfTone: (dtmfTone) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21443
21489
|
yield adapter.sendDtmfTone(dtmfTone);
|
21444
21490
|
}),
|
21445
|
-
onRemoveParticipant: (userId) => __awaiter$
|
21491
|
+
onRemoveParticipant: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21446
21492
|
yield adapter.removeParticipant(userId);
|
21447
21493
|
}),
|
21448
|
-
onSelectCamera: (deviceInfo, options) => __awaiter$
|
21494
|
+
onSelectCamera: (deviceInfo, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21449
21495
|
yield adapter.setCamera(deviceInfo, options);
|
21450
21496
|
}),
|
21451
|
-
onSelectMicrophone: (deviceInfo) => __awaiter$
|
21497
|
+
onSelectMicrophone: (deviceInfo) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21452
21498
|
yield adapter.setMicrophone(deviceInfo);
|
21453
21499
|
}),
|
21454
|
-
onSelectSpeaker: (deviceInfo) => __awaiter$
|
21500
|
+
onSelectSpeaker: (deviceInfo) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21455
21501
|
yield adapter.setSpeaker(deviceInfo);
|
21456
21502
|
}),
|
21457
21503
|
onStartCall: (participants, options) => {
|
21458
21504
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
21459
21505
|
return adapter.startCall(rawIds, options);
|
21460
21506
|
},
|
21461
|
-
onStartScreenShare: () => __awaiter$
|
21507
|
+
onStartScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21462
21508
|
yield adapter.startScreenShare();
|
21463
21509
|
}),
|
21464
|
-
onStopScreenShare: () => __awaiter$
|
21510
|
+
onStopScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21465
21511
|
yield adapter.stopScreenShare();
|
21466
21512
|
}),
|
21467
|
-
onToggleCamera: (options) => __awaiter$
|
21513
|
+
onToggleCamera: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21468
21514
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
21469
21515
|
}),
|
21470
|
-
onToggleMicrophone: () => __awaiter$
|
21516
|
+
onToggleMicrophone: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21471
21517
|
var _b;
|
21472
21518
|
return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
21473
21519
|
}),
|
21474
|
-
onToggleScreenShare: () => __awaiter$
|
21520
|
+
onToggleScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21475
21521
|
var _c;
|
21476
21522
|
return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isScreenSharingOn)
|
21477
21523
|
? yield adapter.stopScreenShare()
|
21478
21524
|
: yield adapter.startScreenShare();
|
21479
21525
|
}),
|
21480
|
-
onStartLocalVideo: () => __awaiter$
|
21526
|
+
onStartLocalVideo: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21481
21527
|
if (adapter.getState().call) {
|
21482
21528
|
return adapter.startCamera();
|
21483
21529
|
}
|
21484
21530
|
}),
|
21485
|
-
onDisposeLocalStreamView: () => __awaiter$
|
21531
|
+
onDisposeLocalStreamView: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21486
21532
|
return adapter.disposeLocalVideoStreamView();
|
21487
21533
|
}),
|
21488
|
-
onDisposeRemoteStreamView: (userId) => __awaiter$
|
21534
|
+
onDisposeRemoteStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21489
21535
|
return adapter.disposeStreamView(userId);
|
21490
21536
|
}),
|
21491
|
-
onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$
|
21537
|
+
onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21492
21538
|
return adapter.disposeScreenShareStreamView(userId);
|
21493
21539
|
}),
|
21494
|
-
onDisposeRemoteVideoStreamView: (userId) => __awaiter$
|
21540
|
+
onDisposeRemoteVideoStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21495
21541
|
return adapter.disposeRemoteVideoStreamView(userId);
|
21496
21542
|
}),
|
21497
21543
|
/* @conditional-compile-remove(call-readiness) */
|
21498
|
-
askDevicePermission: (constrain) => __awaiter$
|
21544
|
+
askDevicePermission: (constrain) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21499
21545
|
return adapter.askDevicePermission(constrain);
|
21500
21546
|
}),
|
21501
21547
|
/* @conditional-compile-remove(video-background-effects) */
|
21502
|
-
onRemoveVideoBackgroundEffects: () => __awaiter$
|
21548
|
+
onRemoveVideoBackgroundEffects: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21503
21549
|
return yield adapter.stopVideoBackgroundEffects();
|
21504
21550
|
}),
|
21505
21551
|
/* @conditional-compile-remove(video-background-effects) */
|
21506
|
-
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter$
|
21552
|
+
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21507
21553
|
const blurConfig = Object.assign({ effectName: 'blur' }, backgroundBlurConfig);
|
21508
21554
|
return yield adapter.startVideoBackgroundEffect(blurConfig);
|
21509
21555
|
}),
|
21510
21556
|
/* @conditional-compile-remove(video-background-effects) */
|
21511
|
-
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter$
|
21557
|
+
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21512
21558
|
const replacementConfig = Object.assign({ effectName: 'replacement' }, backgroundReplacementConfig);
|
21513
21559
|
return yield adapter.startVideoBackgroundEffect(replacementConfig);
|
21514
21560
|
}),
|
21515
21561
|
/* @conditional-compile-remove(close-captions) */
|
21516
|
-
onStartCaptions: (options) => __awaiter$
|
21562
|
+
onStartCaptions: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21517
21563
|
yield adapter.startCaptions(options);
|
21518
21564
|
}),
|
21519
21565
|
/* @conditional-compile-remove(close-captions) */
|
21520
|
-
onStopCaptions: () => __awaiter$
|
21566
|
+
onStopCaptions: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21521
21567
|
yield adapter.stopCaptions();
|
21522
21568
|
}),
|
21523
21569
|
/* @conditional-compile-remove(close-captions) */
|
21524
|
-
onSetSpokenLanguage: (language) => __awaiter$
|
21570
|
+
onSetSpokenLanguage: (language) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21525
21571
|
yield adapter.setSpokenLanguage(language);
|
21526
21572
|
}),
|
21527
21573
|
/* @conditional-compile-remove(close-captions) */
|
21528
|
-
onSetCaptionLanguage: (language) => __awaiter$
|
21574
|
+
onSetCaptionLanguage: (language) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21529
21575
|
yield adapter.setCaptionLanguage(language);
|
21530
21576
|
})
|
21531
21577
|
}));
|
@@ -21656,7 +21702,7 @@ const MoreButton = (props) => {
|
|
21656
21702
|
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { labelKey: 'optionsButtonLabelKey', showLabel: props.showLabel, onRenderOnIcon: icon$2, onRenderOffIcon: icon$2, onClick: props.onClick, "data-ui-id": props['data-ui-id'] })));
|
21657
21703
|
};
|
21658
21704
|
|
21659
|
-
var __awaiter$
|
21705
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21660
21706
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21661
21707
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21662
21708
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21684,7 +21730,7 @@ const CaptionsBannerMoreButton = (props) => {
|
|
21684
21730
|
/* @conditional-compile-remove(close-captions) */
|
21685
21731
|
const moreButtonContextualMenuItems = [];
|
21686
21732
|
/* @conditional-compile-remove(close-captions) */
|
21687
|
-
const startCaptions = React.useCallback(() => __awaiter$
|
21733
|
+
const startCaptions = React.useCallback(() => __awaiter$f(void 0, void 0, void 0, function* () {
|
21688
21734
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
21689
21735
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
21690
21736
|
});
|
@@ -22551,7 +22597,7 @@ const onFetchCustomButtonPropsTrampoline = (options) => {
|
|
22551
22597
|
|
22552
22598
|
// Copyright (c) Microsoft Corporation.
|
22553
22599
|
// Licensed under the MIT license.
|
22554
|
-
var __awaiter$
|
22600
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
22555
22601
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
22556
22602
|
return new (P || (P = Promise))(function (resolve, reject) {
|
22557
22603
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -22574,7 +22620,7 @@ const DesktopMoreButton = (props) => {
|
|
22574
22620
|
/* @conditional-compile-remove(close-captions) */
|
22575
22621
|
const startCaptionsButtonHandlers = useHandlers();
|
22576
22622
|
/* @conditional-compile-remove(close-captions) */
|
22577
|
-
const startCaptions = React.useCallback(() => __awaiter$
|
22623
|
+
const startCaptions = React.useCallback(() => __awaiter$e(void 0, void 0, void 0, function* () {
|
22578
22624
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
22579
22625
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
22580
22626
|
});
|
@@ -23138,7 +23184,7 @@ const themedToggleButtonStyle = (theme, checked) => {
|
|
23138
23184
|
|
23139
23185
|
// Copyright (c) Microsoft Corporation.
|
23140
23186
|
// Licensed under the MIT license.
|
23141
|
-
var __awaiter$
|
23187
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
23142
23188
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23143
23189
|
return new (P || (P = Promise))(function (resolve, reject) {
|
23144
23190
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -23278,7 +23324,7 @@ const MoreDrawer = (props) => {
|
|
23278
23324
|
/* @conditional-compile-remove(close-captions) */
|
23279
23325
|
const [currentSpokenLanguage, setCurrentSpokenLanguage] = React.useState(startCaptionsButtonProps.currentSpokenLanguage);
|
23280
23326
|
/* @conditional-compile-remove(close-captions) */
|
23281
|
-
const onToggleChange = React.useCallback(() => __awaiter$
|
23327
|
+
const onToggleChange = React.useCallback(() => __awaiter$d(void 0, void 0, void 0, function* () {
|
23282
23328
|
if (!startCaptionsButtonProps.checked) {
|
23283
23329
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
23284
23330
|
spokenLanguage: currentSpokenLanguage
|
@@ -23967,7 +24013,7 @@ const AddPeopleButton = (props) => {
|
|
23967
24013
|
|
23968
24014
|
// Copyright (c) Microsoft Corporation.
|
23969
24015
|
// Licensed under the MIT license.
|
23970
|
-
var __awaiter$
|
24016
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
23971
24017
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23972
24018
|
return new (P || (P = Promise))(function (resolve, reject) {
|
23973
24019
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -23989,11 +24035,11 @@ const PeoplePaneContent = (props) => {
|
|
23989
24035
|
return localeStrings.strings.call;
|
23990
24036
|
};
|
23991
24037
|
const strings = getStrings();
|
23992
|
-
const removeParticipantFromCall = React.useCallback((participantId) => __awaiter$
|
24038
|
+
const removeParticipantFromCall = React.useCallback((participantId) => __awaiter$c(void 0, void 0, void 0, function* () {
|
23993
24039
|
yield adapter.removeParticipant(participantId);
|
23994
24040
|
}), [adapter]);
|
23995
24041
|
/* @conditional-compile-remove(PSTN-calls) */
|
23996
|
-
const addParticipantToCall = React.useCallback((participant, options) => __awaiter$
|
24042
|
+
const addParticipantToCall = React.useCallback((participant, options) => __awaiter$c(void 0, void 0, void 0, function* () {
|
23997
24043
|
yield adapter.addParticipant(participant, options);
|
23998
24044
|
}), [adapter]);
|
23999
24045
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -24020,7 +24066,7 @@ const PeoplePaneContent = (props) => {
|
|
24020
24066
|
setDrawerMenuItems
|
24021
24067
|
]);
|
24022
24068
|
const participantListProps = React.useMemo(() => {
|
24023
|
-
const onRemoveAParticipant = (participantId) => __awaiter$
|
24069
|
+
const onRemoveAParticipant = (participantId) => __awaiter$c(void 0, void 0, void 0, function* () { return removeParticipantFromCall(participantId); });
|
24024
24070
|
return Object.assign(Object.assign({}, participantListDefaultProps), {
|
24025
24071
|
// Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
|
24026
24072
|
onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
|
@@ -24154,7 +24200,7 @@ const localVideoSelector = reselect__namespace.createSelector([callStatusSelecto
|
|
24154
24200
|
};
|
24155
24201
|
});
|
24156
24202
|
|
24157
|
-
var __awaiter$
|
24203
|
+
var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
24158
24204
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
24159
24205
|
return new (P || (P = Promise))(function (resolve, reject) {
|
24160
24206
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -24223,7 +24269,7 @@ const VideoEffectsPaneContent = (props) => {
|
|
24223
24269
|
return videoEffects;
|
24224
24270
|
}, [strings, adapter]);
|
24225
24271
|
/* @conditional-compile-remove(video-background-effects) */
|
24226
|
-
const onEffectChange = React.useCallback((effectKey) => __awaiter$
|
24272
|
+
const onEffectChange = React.useCallback((effectKey) => __awaiter$b(void 0, void 0, void 0, function* () {
|
24227
24273
|
if (effectKey === 'blur') {
|
24228
24274
|
const blurEffect = {
|
24229
24275
|
effectName: effectKey
|
@@ -24704,6 +24750,8 @@ const CallArrangement = (props) => {
|
|
24704
24750
|
placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
|
24705
24751
|
}), [callWithChatStrings]);
|
24706
24752
|
/* @conditional-compile-remove(video-background-effects) */
|
24753
|
+
const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;
|
24754
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24707
24755
|
const { openVideoEffectsPane } = useVideoEffectsPane(props.updateSidePaneRenderer, props.mobileView, props.latestErrors, props.onDismissError);
|
24708
24756
|
const [showDrawer, setShowDrawer] = React.useState(false);
|
24709
24757
|
const onMoreButtonClicked = React.useCallback(() => {
|
@@ -24771,7 +24819,7 @@ const CallArrangement = (props) => {
|
|
24771
24819
|
/* @conditional-compile-remove(close-captions) */
|
24772
24820
|
isCaptionsSupported: isTeamsCall && hasJoinedCall,
|
24773
24821
|
/* @conditional-compile-remove(video-background-effects) */
|
24774
|
-
onShowVideoEffectsPicker: openVideoEffectsPane,
|
24822
|
+
onShowVideoEffectsPicker: onResolveVideoEffectDependency ? openVideoEffectsPane : undefined,
|
24775
24823
|
/* @conditional-compile-remove(PSTN-calls) */
|
24776
24824
|
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined, displayVertical: verticalControlBar }))))),
|
24777
24825
|
((_e = props.callControlProps) === null || _e === void 0 ? void 0 : _e.options) !== false && showDrawer && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStylesValue },
|
@@ -25612,8 +25660,10 @@ const LocalDeviceSettings = (props) => {
|
|
25612
25660
|
var _a, _b;
|
25613
25661
|
const theme = useTheme();
|
25614
25662
|
const locale = useLocale();
|
25615
|
-
/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(rooms) */
|
25663
|
+
/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(rooms) */
|
25616
25664
|
const adapter = useAdapter();
|
25665
|
+
/* @conditional-compile-remove(video-background-effects) */
|
25666
|
+
const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;
|
25617
25667
|
const defaultPlaceHolder = locale.strings.call.defaultPlaceHolder;
|
25618
25668
|
const cameraLabel = locale.strings.call.cameraLabel;
|
25619
25669
|
const soundLabel = locale.strings.call.soundLabel;
|
@@ -25673,7 +25723,7 @@ const LocalDeviceSettings = (props) => {
|
|
25673
25723
|
React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", styles: cameraAndVideoEffectsContainerStyleDesktop },
|
25674
25724
|
React__default['default'].createElement(react.Label, { id: 'call-composite-local-camera-settings-label', className: react.mergeStyles(dropDownStyles(theme).label), disabled: !cameraPermissionGranted }, cameraLabel),
|
25675
25725
|
/* @conditional-compile-remove(video-background-effects) */
|
25676
|
-
React__default['default'].createElement(react.DefaultButton, { iconProps: { iconName: 'ConfigurationScreenVideoEffectsButton' }, styles: effectsButtonStyles(theme), onClick: props.onVideoEffectsClick, "data-ui-id": 'call-config-video-effects-button' }, locale.strings.call.configurationPageVideoEffectsButtonLabel)),
|
25726
|
+
onResolveVideoEffectDependency && (React__default['default'].createElement(react.DefaultButton, { iconProps: { iconName: 'ConfigurationScreenVideoEffectsButton' }, styles: effectsButtonStyles(theme), onClick: props.onVideoEffectsClick, "data-ui-id": 'call-config-video-effects-button' }, locale.strings.call.configurationPageVideoEffectsButtonLabel))),
|
25677
25727
|
React__default['default'].createElement(ConfigurationPageCameraDropdown, { cameraGrantedDropdown: cameraGrantedDropdown, cameraPermissionGranted: cameraPermissionGranted !== null && cameraPermissionGranted !== void 0 ? cameraPermissionGranted : false,
|
25678
25728
|
/* @conditional-compile-remove(call-readiness) */
|
25679
25729
|
dropdownProps: dropdownProps,
|
@@ -25813,7 +25863,7 @@ const localPreviewButtonStyle = {
|
|
25813
25863
|
|
25814
25864
|
// Copyright (c) Microsoft Corporation.
|
25815
25865
|
// Licensed under the MIT license.
|
25816
|
-
var __awaiter$
|
25866
|
+
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
25817
25867
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
25818
25868
|
return new (P || (P = Promise))(function (resolve, reject) {
|
25819
25869
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -25833,7 +25883,7 @@ const LocalPreview = (props) => {
|
|
25833
25883
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
25834
25884
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
25835
25885
|
const adapter = useAdapter();
|
25836
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
25886
|
+
const onToggleMic = React.useCallback(() => __awaiter$a(void 0, void 0, void 0, function* () {
|
25837
25887
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
25838
25888
|
}), [adapter, isLocalMicrophoneEnabled]);
|
25839
25889
|
const hasNoDevices = devicesButtonProps.cameras.length === 0 &&
|
@@ -26101,7 +26151,7 @@ const CallReadinessModalFallBack = (props) => {
|
|
26101
26151
|
|
26102
26152
|
// Copyright (c) Microsoft Corporation.
|
26103
26153
|
// Licensed under the MIT license.
|
26104
|
-
var __awaiter$
|
26154
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26105
26155
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26106
26156
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26107
26157
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26210,7 +26260,7 @@ const ConfigurationPage = (props) => {
|
|
26210
26260
|
const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;
|
26211
26261
|
/* @conditional-compile-remove(video-background-effects) */
|
26212
26262
|
const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(props.updateSidePaneRenderer, mobileView, props.latestErrors, props.onDismissError);
|
26213
|
-
const startCall = React.useCallback(() => __awaiter$
|
26263
|
+
const startCall = React.useCallback(() => __awaiter$9(void 0, void 0, void 0, function* () {
|
26214
26264
|
/* @conditional-compile-remove(video-background-effects) */
|
26215
26265
|
closeVideoEffectsPane();
|
26216
26266
|
startCallHandler();
|
@@ -26696,7 +26746,7 @@ const holdPaneContentStyles = {
|
|
26696
26746
|
|
26697
26747
|
// Copyright (c) Microsoft Corporation.
|
26698
26748
|
// Licensed under the MIT license.
|
26699
|
-
var __awaiter$
|
26749
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26700
26750
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26701
26751
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26702
26752
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26731,7 +26781,7 @@ const HoldPane = () => {
|
|
26731
26781
|
React__default['default'].createElement(react.Stack, { horizontal: true, styles: holdPaneContentStyles },
|
26732
26782
|
React__default['default'].createElement(react.Text, { styles: holdPaneTimerStyles }, elapsedTime),
|
26733
26783
|
React__default['default'].createElement(react.Text, { styles: holdPaneLabelStyles }, strings.holdScreenLabel),
|
26734
|
-
React__default['default'].createElement(react.PrimaryButton, { text: !resumingCall ? strings.resumeCallButtonLabel : strings.resumingCallButtonLabel, ariaLabel: !resumingCall ? strings.resumeCallButtonAriaLabel : strings.resumingCallButtonAriaLabel, styles: resumeButtonStyles, disabled: resumingCall, onClick: () => __awaiter$
|
26784
|
+
React__default['default'].createElement(react.PrimaryButton, { text: !resumingCall ? strings.resumeCallButtonLabel : strings.resumingCallButtonLabel, ariaLabel: !resumingCall ? strings.resumeCallButtonAriaLabel : strings.resumingCallButtonAriaLabel, styles: resumeButtonStyles, disabled: resumingCall, onClick: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
26735
26785
|
setResumingCall(true);
|
26736
26786
|
try {
|
26737
26787
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
@@ -26845,7 +26895,7 @@ const containerStyles = {
|
|
26845
26895
|
|
26846
26896
|
// Copyright (c) Microsoft Corporation.
|
26847
26897
|
// Licensed under the MIT license.
|
26848
|
-
var __awaiter$
|
26898
|
+
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26849
26899
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26850
26900
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26851
26901
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26898,10 +26948,10 @@ const MainScreen = (props) => {
|
|
26898
26948
|
/* @conditional-compile-remove(rooms) */
|
26899
26949
|
switch (page) {
|
26900
26950
|
case 'roomNotFound':
|
26901
|
-
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "
|
26951
|
+
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedRoomsCall", title: locale.strings.call.roomNotFoundTitle, moreDetails: locale.strings.call.roomNotFoundDetails, dataUiId: 'room-not-found-page' }));
|
26902
26952
|
break;
|
26903
26953
|
case 'deniedPermissionToRoom':
|
26904
|
-
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "
|
26954
|
+
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedRoomsCall", title: locale.strings.call.deniedPermissionToRoomTitle, moreDetails: locale.strings.call.deniedPermissionToRoomDetails, dataUiId: 'not-invited-to-room-page' }));
|
26905
26955
|
break;
|
26906
26956
|
}
|
26907
26957
|
switch (page) {
|
@@ -26975,7 +27025,7 @@ const CallComposite = (props) => React__default['default'].createElement(CallCom
|
|
26975
27025
|
const CallCompositeInner = (props) => {
|
26976
27026
|
const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;
|
26977
27027
|
React.useEffect(() => {
|
26978
|
-
(() => __awaiter$
|
27028
|
+
(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
26979
27029
|
var _a;
|
26980
27030
|
const constrain = getQueryOptions({
|
26981
27031
|
/* @conditional-compile-remove(rooms) */ role: (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role
|
@@ -27138,21 +27188,27 @@ class DiagnosticsForwarder {
|
|
27138
27188
|
*
|
27139
27189
|
* This is used to create correct handler for generic agent type
|
27140
27190
|
*/
|
27141
|
-
|
27191
|
+
function createHandlers(callClient, callAgent, deviceManager, call,
|
27192
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27193
|
+
options) {
|
27142
27194
|
// Call can be either undefined or ACS Call
|
27143
27195
|
if (_isACSCallAgent(callAgent) && (!call || (call && _isACSCall(call)))) {
|
27144
|
-
return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call
|
27196
|
+
return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call,
|
27197
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27198
|
+
options);
|
27145
27199
|
}
|
27146
27200
|
/* @conditional-compile-remove(teams-identity-support) */
|
27147
27201
|
if (_isTeamsCallAgent(callAgent) && (!call || (call && _isTeamsCall(call)))) {
|
27148
|
-
return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call
|
27202
|
+
return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call,
|
27203
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27204
|
+
options);
|
27149
27205
|
}
|
27150
27206
|
throw new Error('Unhandled agent type');
|
27151
|
-
}
|
27207
|
+
}
|
27152
27208
|
|
27153
27209
|
// Copyright (c) Microsoft Corporation.
|
27154
27210
|
// Licensed under the MIT license.
|
27155
|
-
var __awaiter$
|
27211
|
+
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
27156
27212
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
27157
27213
|
return new (P || (P = Promise))(function (resolve, reject) {
|
27158
27214
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -27169,7 +27225,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
|
|
27169
27225
|
return (state) => {
|
27170
27226
|
var _a;
|
27171
27227
|
const originalParticipants = (_a = state.call) === null || _a === void 0 ? void 0 : _a.remoteParticipants;
|
27172
|
-
(() => __awaiter$
|
27228
|
+
(() => __awaiter$6(void 0, void 0, void 0, function* () {
|
27173
27229
|
let shouldNotifyUpdates = false;
|
27174
27230
|
for (const key in originalParticipants) {
|
27175
27231
|
if (cachedDisplayName[key]) {
|
@@ -27196,7 +27252,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
|
|
27196
27252
|
|
27197
27253
|
// Copyright (c) Microsoft Corporation.
|
27198
27254
|
// Licensed under the MIT license.
|
27199
|
-
var __awaiter$
|
27255
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
27200
27256
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
27201
27257
|
return new (P || (P = Promise))(function (resolve, reject) {
|
27202
27258
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -27210,7 +27266,7 @@ class CallContext {
|
|
27210
27266
|
constructor(clientState, isTeamsCall,
|
27211
27267
|
/* @conditional-compile-remove(rooms) */
|
27212
27268
|
isRoomsCall, options) {
|
27213
|
-
var _a, _b;
|
27269
|
+
var _a, _b, _c, _d;
|
27214
27270
|
this.emitter = new EventEmitter.EventEmitter();
|
27215
27271
|
this.state = {
|
27216
27272
|
isLocalPreviewMicrophoneEnabled: false,
|
@@ -27225,11 +27281,13 @@ class CallContext {
|
|
27225
27281
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: clientState.alternateCallerId,
|
27226
27282
|
/* @conditional-compile-remove(unsupported-browser) */ environmentInfo: clientState.environmentInfo,
|
27227
27283
|
/* @conditional-compile-remove(unsupported-browser) */ unsupportedBrowserVersionsAllowed: false,
|
27228
|
-
/* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages: options === null || options === void 0 ? void 0 : options.videoBackgroundImages,
|
27284
|
+
/* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages: (_b = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _b === void 0 ? void 0 : _b.videoBackgroundImages,
|
27285
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27286
|
+
onResolveVideoEffectDependency: (_c = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _c === void 0 ? void 0 : _c.onResolveDependency,
|
27229
27287
|
/* @conditional-compile-remove(video-background-effects) */ selectedVideoBackgroundEffect: undefined,
|
27230
27288
|
cameraStatus: undefined
|
27231
27289
|
};
|
27232
|
-
this.emitter.setMaxListeners((
|
27290
|
+
this.emitter.setMaxListeners((_d = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _d !== void 0 ? _d : 50);
|
27233
27291
|
this.bindPublicMethods();
|
27234
27292
|
this.displayNameModifier = (options === null || options === void 0 ? void 0 : options.onFetchProfile)
|
27235
27293
|
? createProfileStateModifier(options.onFetchProfile, () => {
|
@@ -27353,6 +27411,7 @@ const findLatestAcceptedTransfer = (acceptedTransfers) => {
|
|
27353
27411
|
*/
|
27354
27412
|
class AzureCommunicationCallAdapter {
|
27355
27413
|
constructor(callClient, locator, callAgent, deviceManager, options) {
|
27414
|
+
var _a;
|
27356
27415
|
this.participantSubscribers = new Map();
|
27357
27416
|
this.emitter = new EventEmitter.EventEmitter();
|
27358
27417
|
this.isMyMutedChanged = () => {
|
@@ -27370,6 +27429,8 @@ class AzureCommunicationCallAdapter {
|
|
27370
27429
|
const isTeamsMeeting = 'meetingLink' in this.locator;
|
27371
27430
|
/* @conditional-compile-remove(rooms) */
|
27372
27431
|
const isRoomsCall = 'roomId' in this.locator;
|
27432
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27433
|
+
this.onResolveVideoBackgroundEffectsDependency = (_a = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _a === void 0 ? void 0 : _a.onResolveDependency;
|
27373
27434
|
this.context = new CallContext(callClient.getState(), isTeamsMeeting,
|
27374
27435
|
/* @conditional-compile-remove(rooms) */ isRoomsCall,
|
27375
27436
|
/* @conditional-compile-remove(video-background-effects) */ options);
|
@@ -27416,7 +27477,10 @@ class AzureCommunicationCallAdapter {
|
|
27416
27477
|
}
|
27417
27478
|
}
|
27418
27479
|
};
|
27419
|
-
this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined
|
27480
|
+
this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined,
|
27481
|
+
/* @conditional-compile-remove(video-background-effects) */ {
|
27482
|
+
onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency
|
27483
|
+
});
|
27420
27484
|
this.onClientStateChange = onStateChange;
|
27421
27485
|
this.subscribeDeviceManagerEvents();
|
27422
27486
|
this.callClient.onStateChange(onStateChange);
|
@@ -27534,9 +27598,9 @@ class AzureCommunicationCallAdapter {
|
|
27534
27598
|
this.callAgent.dispose();
|
27535
27599
|
}
|
27536
27600
|
queryCameras() {
|
27537
|
-
return __awaiter$
|
27601
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27538
27602
|
const startTime = new Date().getTime();
|
27539
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27603
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27540
27604
|
const cameras = yield this.deviceManager.getCameras();
|
27541
27605
|
const endTime = new Date().getTime();
|
27542
27606
|
compositeLogger.info('time to query cameras', endTime - startTime, 'ms');
|
@@ -27545,9 +27609,9 @@ class AzureCommunicationCallAdapter {
|
|
27545
27609
|
});
|
27546
27610
|
}
|
27547
27611
|
queryMicrophones() {
|
27548
|
-
return __awaiter$
|
27612
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27549
27613
|
const startTime = new Date().getTime();
|
27550
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27614
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27551
27615
|
const microphones = yield this.deviceManager.getMicrophones();
|
27552
27616
|
const endTime = new Date().getTime();
|
27553
27617
|
compositeLogger.info('time to query microphones', endTime - startTime, 'ms');
|
@@ -27556,9 +27620,9 @@ class AzureCommunicationCallAdapter {
|
|
27556
27620
|
});
|
27557
27621
|
}
|
27558
27622
|
querySpeakers() {
|
27559
|
-
return __awaiter$
|
27623
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27560
27624
|
const startTime = new Date().getTime();
|
27561
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27625
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27562
27626
|
const speakers = (yield this.deviceManager.isSpeakerSelectionAvailable) ? this.deviceManager.getSpeakers() : [];
|
27563
27627
|
const endTime = new Date().getTime();
|
27564
27628
|
compositeLogger.info('time to query speakers', endTime - startTime, 'ms');
|
@@ -27567,9 +27631,9 @@ class AzureCommunicationCallAdapter {
|
|
27567
27631
|
});
|
27568
27632
|
}
|
27569
27633
|
askDevicePermission(constrain) {
|
27570
|
-
return __awaiter$
|
27634
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27571
27635
|
const startTime = new Date().getTime();
|
27572
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27636
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27573
27637
|
yield this.deviceManager.askDevicePermission(constrain);
|
27574
27638
|
const endTime = new Date().getTime();
|
27575
27639
|
compositeLogger.info('time to query askDevicePermissions', endTime - startTime, 'ms');
|
@@ -27660,7 +27724,7 @@ class AzureCommunicationCallAdapter {
|
|
27660
27724
|
});
|
27661
27725
|
}
|
27662
27726
|
createStreamView(remoteUserId, options) {
|
27663
|
-
return __awaiter$
|
27727
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27664
27728
|
if (remoteUserId === undefined) {
|
27665
27729
|
return yield this.handlers.onCreateLocalStreamView(options);
|
27666
27730
|
}
|
@@ -27670,7 +27734,7 @@ class AzureCommunicationCallAdapter {
|
|
27670
27734
|
});
|
27671
27735
|
}
|
27672
27736
|
disposeStreamView(remoteUserId) {
|
27673
|
-
return __awaiter$
|
27737
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27674
27738
|
if (remoteUserId === undefined) {
|
27675
27739
|
yield this.handlers.onDisposeLocalStreamView();
|
27676
27740
|
}
|
@@ -27680,25 +27744,28 @@ class AzureCommunicationCallAdapter {
|
|
27680
27744
|
});
|
27681
27745
|
}
|
27682
27746
|
disposeScreenShareStreamView(remoteUserId) {
|
27683
|
-
return __awaiter$
|
27747
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27684
27748
|
yield this.handlers.onDisposeRemoteScreenShareStreamView(remoteUserId);
|
27685
27749
|
});
|
27686
27750
|
}
|
27687
27751
|
disposeRemoteVideoStreamView(remoteUserId) {
|
27688
|
-
return __awaiter$
|
27752
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27689
27753
|
yield this.handlers.onDisposeRemoteVideoStreamView(remoteUserId);
|
27690
27754
|
});
|
27691
27755
|
}
|
27692
27756
|
disposeLocalVideoStreamView() {
|
27693
|
-
return __awaiter$
|
27757
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27694
27758
|
yield this.handlers.onDisposeLocalStreamView();
|
27695
27759
|
});
|
27696
27760
|
}
|
27697
27761
|
leaveCall(forEveryone) {
|
27698
|
-
return __awaiter$
|
27762
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27699
27763
|
yield this.handlers.onHangUp(forEveryone);
|
27700
27764
|
this.unsubscribeCallEvents();
|
27701
|
-
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined
|
27765
|
+
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined,
|
27766
|
+
/* @conditional-compile-remove(video-background-effects) */ {
|
27767
|
+
onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency
|
27768
|
+
});
|
27702
27769
|
// We set the adapter.call object to undefined immediately when a call is ended.
|
27703
27770
|
// We do not set the context.callId to undefined because it is a part of the immutable data flow loop.
|
27704
27771
|
this.call = undefined;
|
@@ -27707,29 +27774,29 @@ class AzureCommunicationCallAdapter {
|
|
27707
27774
|
});
|
27708
27775
|
}
|
27709
27776
|
setCamera(device, options) {
|
27710
|
-
return __awaiter$
|
27711
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27777
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27778
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27712
27779
|
yield this.handlers.onSelectCamera(device, options);
|
27713
27780
|
}));
|
27714
27781
|
});
|
27715
27782
|
}
|
27716
27783
|
setMicrophone(device) {
|
27717
|
-
return __awaiter$
|
27718
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27784
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27785
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27719
27786
|
yield this.handlers.onSelectMicrophone(device);
|
27720
27787
|
}));
|
27721
27788
|
});
|
27722
27789
|
}
|
27723
27790
|
setSpeaker(device) {
|
27724
|
-
return __awaiter$
|
27725
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27791
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27792
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27726
27793
|
yield this.handlers.onSelectSpeaker(device);
|
27727
27794
|
}));
|
27728
27795
|
});
|
27729
27796
|
}
|
27730
27797
|
startCamera(options) {
|
27731
|
-
return __awaiter$
|
27732
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27798
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27799
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27733
27800
|
if (!isCameraOn(this.getState())) {
|
27734
27801
|
// First kick off the effect on the local device before starting the camera in the call.
|
27735
27802
|
// This prevents the effect not being applied for a brief moment when the camera is started.
|
@@ -27737,9 +27804,9 @@ class AzureCommunicationCallAdapter {
|
|
27737
27804
|
{
|
27738
27805
|
const selectedEffect = this.getState().selectedVideoBackgroundEffect;
|
27739
27806
|
const selectedCamera = getSelectedCameraFromAdapterState(this.getState());
|
27740
|
-
if (selectedEffect && selectedCamera) {
|
27807
|
+
if (selectedEffect && selectedCamera && this.onResolveVideoBackgroundEffectsDependency) {
|
27741
27808
|
const stream = new communicationCalling.LocalVideoStream(selectedCamera);
|
27742
|
-
const effect = getBackgroundEffectFromSelectedEffect(selectedEffect);
|
27809
|
+
const effect = getBackgroundEffectFromSelectedEffect(selectedEffect, yield this.onResolveVideoBackgroundEffectsDependency());
|
27743
27810
|
if (effect) {
|
27744
27811
|
yield stream.feature(communicationCalling.Features.VideoEffects).startEffects(effect);
|
27745
27812
|
}
|
@@ -27754,8 +27821,8 @@ class AzureCommunicationCallAdapter {
|
|
27754
27821
|
});
|
27755
27822
|
}
|
27756
27823
|
stopCamera() {
|
27757
|
-
return __awaiter$
|
27758
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27824
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27825
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27759
27826
|
if (isCameraOn(this.getState())) {
|
27760
27827
|
yield this.handlers.onToggleCamera();
|
27761
27828
|
}
|
@@ -27763,8 +27830,8 @@ class AzureCommunicationCallAdapter {
|
|
27763
27830
|
});
|
27764
27831
|
}
|
27765
27832
|
mute() {
|
27766
|
-
return __awaiter$
|
27767
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27833
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27834
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27768
27835
|
var _a, _b;
|
27769
27836
|
this.context.setIsLocalMicrophoneEnabled(false);
|
27770
27837
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && !((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -27774,8 +27841,8 @@ class AzureCommunicationCallAdapter {
|
|
27774
27841
|
});
|
27775
27842
|
}
|
27776
27843
|
unmute() {
|
27777
|
-
return __awaiter$
|
27778
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27844
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27845
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27779
27846
|
var _a, _b;
|
27780
27847
|
this.context.setIsLocalMicrophoneEnabled(true);
|
27781
27848
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -27785,8 +27852,8 @@ class AzureCommunicationCallAdapter {
|
|
27785
27852
|
});
|
27786
27853
|
}
|
27787
27854
|
startScreenShare() {
|
27788
|
-
return __awaiter$
|
27789
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27855
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27856
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27790
27857
|
var _a;
|
27791
27858
|
if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {
|
27792
27859
|
yield this.handlers.onToggleScreenShare();
|
@@ -27795,8 +27862,8 @@ class AzureCommunicationCallAdapter {
|
|
27795
27862
|
});
|
27796
27863
|
}
|
27797
27864
|
stopScreenShare() {
|
27798
|
-
return __awaiter$
|
27799
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27865
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27866
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27800
27867
|
var _a;
|
27801
27868
|
if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {
|
27802
27869
|
yield this.handlers.onToggleScreenShare();
|
@@ -27811,7 +27878,7 @@ class AzureCommunicationCallAdapter {
|
|
27811
27878
|
}
|
27812
27879
|
/* @conditional-compile-remove(video-background-effects) */
|
27813
27880
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
27814
|
-
return __awaiter$
|
27881
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27815
27882
|
if (this.isBlurEffect(videoBackgroundEffect)) {
|
27816
27883
|
const blurConfig = videoBackgroundEffect;
|
27817
27884
|
yield this.handlers.onBlurVideoBackground(blurConfig);
|
@@ -27824,7 +27891,7 @@ class AzureCommunicationCallAdapter {
|
|
27824
27891
|
}
|
27825
27892
|
/* @conditional-compile-remove(video-background-effects) */
|
27826
27893
|
stopVideoBackgroundEffects() {
|
27827
|
-
return __awaiter$
|
27894
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27828
27895
|
yield this.handlers.onRemoveVideoBackgroundEffects();
|
27829
27896
|
});
|
27830
27897
|
}
|
@@ -27868,7 +27935,10 @@ class AzureCommunicationCallAdapter {
|
|
27868
27935
|
this.context.setCurrentCallId(call.id);
|
27869
27936
|
// Resync state after callId is set
|
27870
27937
|
this.context.updateClientState(this.callClient.getState());
|
27871
|
-
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, this.call
|
27938
|
+
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, this.call,
|
27939
|
+
/* @conditional-compile-remove(video-background-effects) */ {
|
27940
|
+
onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency
|
27941
|
+
});
|
27872
27942
|
this.subscribeCallEvents();
|
27873
27943
|
}
|
27874
27944
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -27880,7 +27950,7 @@ class AzureCommunicationCallAdapter {
|
|
27880
27950
|
return effect.effectName === 'replacement';
|
27881
27951
|
}
|
27882
27952
|
removeParticipant(userId) {
|
27883
|
-
return __awaiter$
|
27953
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27884
27954
|
let participant = userId;
|
27885
27955
|
/* @conditional-compile-remove(PSTN-calls) */
|
27886
27956
|
participant = _toCommunicationIdentifier(userId);
|
@@ -27889,7 +27959,7 @@ class AzureCommunicationCallAdapter {
|
|
27889
27959
|
}
|
27890
27960
|
/* @conditional-compile-remove(PSTN-calls) */
|
27891
27961
|
addParticipant(participant, options) {
|
27892
|
-
return __awaiter$
|
27962
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27893
27963
|
if (communicationCommon.isPhoneNumberIdentifier(participant) && options) {
|
27894
27964
|
this.handlers.onAddParticipant(participant, options);
|
27895
27965
|
}
|
@@ -27901,7 +27971,7 @@ class AzureCommunicationCallAdapter {
|
|
27901
27971
|
/* @conditional-compile-remove(PSTN-calls) */
|
27902
27972
|
holdCall() {
|
27903
27973
|
var _a;
|
27904
|
-
return __awaiter$
|
27974
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27905
27975
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) !== 'LocalHold') {
|
27906
27976
|
this.handlers.onToggleHold();
|
27907
27977
|
}
|
@@ -27910,7 +27980,7 @@ class AzureCommunicationCallAdapter {
|
|
27910
27980
|
/* @conditional-compile-remove(PSTN-calls) */
|
27911
27981
|
resumeCall() {
|
27912
27982
|
var _a;
|
27913
|
-
return __awaiter$
|
27983
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27914
27984
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
|
27915
27985
|
this.handlers.onToggleHold();
|
27916
27986
|
}
|
@@ -27918,31 +27988,31 @@ class AzureCommunicationCallAdapter {
|
|
27918
27988
|
}
|
27919
27989
|
/* @conditional-compile-remove(PSTN-calls) */
|
27920
27990
|
sendDtmfTone(dtmfTone) {
|
27921
|
-
return __awaiter$
|
27991
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27922
27992
|
this.handlers.onSendDtmfTone(dtmfTone);
|
27923
27993
|
});
|
27924
27994
|
}
|
27925
27995
|
/* @conditional-compile-remove(close-captions) */
|
27926
27996
|
startCaptions(options) {
|
27927
|
-
return __awaiter$
|
27997
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27928
27998
|
this.handlers.onStartCaptions(options);
|
27929
27999
|
});
|
27930
28000
|
}
|
27931
28001
|
/* @conditional-compile-remove(close-captions) */
|
27932
28002
|
stopCaptions() {
|
27933
|
-
return __awaiter$
|
28003
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27934
28004
|
this.handlers.onStopCaptions();
|
27935
28005
|
});
|
27936
28006
|
}
|
27937
28007
|
/* @conditional-compile-remove(close-captions) */
|
27938
28008
|
setCaptionLanguage(language) {
|
27939
|
-
return __awaiter$
|
28009
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27940
28010
|
this.handlers.onSetCaptionLanguage(language);
|
27941
28011
|
});
|
27942
28012
|
}
|
27943
28013
|
/* @conditional-compile-remove(close-captions) */
|
27944
28014
|
setSpokenLanguage(language) {
|
27945
|
-
return __awaiter$
|
28015
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27946
28016
|
this.handlers.onSetSpokenLanguage(language);
|
27947
28017
|
});
|
27948
28018
|
}
|
@@ -28065,7 +28135,7 @@ class AzureCommunicationCallAdapter {
|
|
28065
28135
|
this.emitter.off(event, listener);
|
28066
28136
|
}
|
28067
28137
|
asyncTeeErrorToEventEmitter(f) {
|
28068
|
-
return __awaiter$
|
28138
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
28069
28139
|
try {
|
28070
28140
|
return yield f();
|
28071
28141
|
}
|
@@ -28100,7 +28170,7 @@ class AzureCommunicationCallAdapter {
|
|
28100
28170
|
*/
|
28101
28171
|
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
|
28102
28172
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
28103
|
-
/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter$
|
28173
|
+
/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28104
28174
|
if (!_isValidIdentifier(userId)) {
|
28105
28175
|
throw new Error('Invalid identifier. Please provide valid identifier object.');
|
28106
28176
|
}
|
@@ -28119,7 +28189,7 @@ const createAzureCommunicationCallAdapter = ({ userId, displayName, credential,
|
|
28119
28189
|
/**
|
28120
28190
|
* @beta
|
28121
28191
|
*/
|
28122
|
-
const createTeamsCallAdapter = ({ userId, credential, locator, options }) => __awaiter$
|
28192
|
+
const createTeamsCallAdapter = ({ userId, credential, locator, options }) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28123
28193
|
const callClient = createStatefulCallClient({
|
28124
28194
|
userId
|
28125
28195
|
});
|
@@ -28159,7 +28229,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
28159
28229
|
if (adapterKind === 'AzureCommunication' && !displayName) {
|
28160
28230
|
return;
|
28161
28231
|
}
|
28162
|
-
(() => __awaiter$
|
28232
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
28163
28233
|
if (adapterRef.current) {
|
28164
28234
|
// Dispose the old adapter when a new one is created.
|
28165
28235
|
//
|
@@ -28238,7 +28308,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
28238
28308
|
// Dispose any existing adapter when the component unmounts.
|
28239
28309
|
React.useEffect(() => {
|
28240
28310
|
return () => {
|
28241
|
-
(() => __awaiter$
|
28311
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
28242
28312
|
if (adapterRef.current) {
|
28243
28313
|
if (beforeDisposeRef.current) {
|
28244
28314
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -28332,7 +28402,7 @@ beforeDispose) => {
|
|
28332
28402
|
*
|
28333
28403
|
* @public
|
28334
28404
|
*/
|
28335
|
-
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$
|
28405
|
+
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28336
28406
|
const deviceManager = (yield callClient.getDeviceManager());
|
28337
28407
|
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);
|
28338
28408
|
if (deviceManager.isSpeakerSelectionAvailable) {
|
@@ -28352,7 +28422,7 @@ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, lo
|
|
28352
28422
|
*
|
28353
28423
|
* @beta
|
28354
28424
|
*/
|
28355
|
-
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$
|
28425
|
+
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28356
28426
|
const deviceManager = (yield callClient.getDeviceManager());
|
28357
28427
|
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);
|
28358
28428
|
if (deviceManager.isSpeakerSelectionAvailable) {
|
@@ -28395,7 +28465,7 @@ const callCompositeContainerStyles = (isMobile) => ({
|
|
28395
28465
|
|
28396
28466
|
// Copyright (c) Microsoft Corporation.
|
28397
28467
|
// Licensed under the MIT license.
|
28398
|
-
var __awaiter$
|
28468
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
28399
28469
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28400
28470
|
return new (P || (P = Promise))(function (resolve, reject) {
|
28401
28471
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -28461,44 +28531,44 @@ class CallWithChatBackedCallAdapter {
|
|
28461
28531
|
return this.callWithChatAdapter.joinCall(options);
|
28462
28532
|
}
|
28463
28533
|
};
|
28464
|
-
this.leaveCall = (forEveryone) => __awaiter$
|
28534
|
+
this.leaveCall = (forEveryone) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(forEveryone); });
|
28465
28535
|
this.startCall = (participants, options) => {
|
28466
28536
|
let communicationParticipants = participants;
|
28467
28537
|
/* @conditional-compile-remove(PSTN-calls) */
|
28468
28538
|
communicationParticipants = participants.map(_toCommunicationIdentifier);
|
28469
28539
|
return this.callWithChatAdapter.startCall(communicationParticipants, options);
|
28470
28540
|
};
|
28471
|
-
this.setCamera = (sourceId, options) => __awaiter$
|
28472
|
-
this.setMicrophone = (sourceId) => __awaiter$
|
28473
|
-
this.setSpeaker = (sourceId) => __awaiter$
|
28474
|
-
this.askDevicePermission = (constraints) => __awaiter$
|
28475
|
-
this.queryCameras = () => __awaiter$
|
28476
|
-
this.queryMicrophones = () => __awaiter$
|
28477
|
-
this.querySpeakers = () => __awaiter$
|
28478
|
-
this.startCamera = (options) => __awaiter$
|
28479
|
-
this.stopCamera = () => __awaiter$
|
28480
|
-
this.mute = () => __awaiter$
|
28481
|
-
this.unmute = () => __awaiter$
|
28482
|
-
this.startScreenShare = () => __awaiter$
|
28483
|
-
this.stopScreenShare = () => __awaiter$
|
28484
|
-
this.removeParticipant = (userId) => __awaiter$
|
28541
|
+
this.setCamera = (sourceId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
|
28542
|
+
this.setMicrophone = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
|
28543
|
+
this.setSpeaker = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setSpeaker(sourceId); });
|
28544
|
+
this.askDevicePermission = (constraints) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.askDevicePermission(constraints); });
|
28545
|
+
this.queryCameras = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryCameras(); });
|
28546
|
+
this.queryMicrophones = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryMicrophones(); });
|
28547
|
+
this.querySpeakers = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.querySpeakers(); });
|
28548
|
+
this.startCamera = (options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startCamera(options); });
|
28549
|
+
this.stopCamera = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopCamera(); });
|
28550
|
+
this.mute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.mute(); });
|
28551
|
+
this.unmute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
|
28552
|
+
this.startScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
|
28553
|
+
this.stopScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
|
28554
|
+
this.removeParticipant = (userId) => __awaiter$4(this, void 0, void 0, function* () {
|
28485
28555
|
let participant = userId;
|
28486
28556
|
/* @conditional-compile-remove(PSTN-calls) */
|
28487
28557
|
participant = _toCommunicationIdentifier(userId);
|
28488
28558
|
yield this.callWithChatAdapter.removeParticipant(participant);
|
28489
28559
|
});
|
28490
|
-
this.createStreamView = (remoteUserId, options) => __awaiter$
|
28491
|
-
this.disposeStreamView = (remoteUserId, options) => __awaiter$
|
28560
|
+
this.createStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.createStreamView(remoteUserId, options); });
|
28561
|
+
this.disposeStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.disposeStreamView(remoteUserId, options); });
|
28492
28562
|
/* @conditional-compile-remove(PSTN-calls) */
|
28493
|
-
this.holdCall = () => __awaiter$
|
28563
|
+
this.holdCall = () => __awaiter$4(this, void 0, void 0, function* () {
|
28494
28564
|
yield this.callWithChatAdapter.holdCall();
|
28495
28565
|
});
|
28496
28566
|
/* @conditional-compile-remove(PSTN-calls) */
|
28497
|
-
this.resumeCall = () => __awaiter$
|
28567
|
+
this.resumeCall = () => __awaiter$4(this, void 0, void 0, function* () {
|
28498
28568
|
yield this.callWithChatAdapter.resumeCall();
|
28499
28569
|
});
|
28500
28570
|
/* @conditional-compile-remove(PSTN-calls) */
|
28501
|
-
this.sendDtmfTone = (dtmfTone) => __awaiter$
|
28571
|
+
this.sendDtmfTone = (dtmfTone) => __awaiter$4(this, void 0, void 0, function* () {
|
28502
28572
|
yield this.callWithChatAdapter.sendDtmfTone(dtmfTone);
|
28503
28573
|
});
|
28504
28574
|
this.callWithChatAdapter = callWithChatAdapter;
|
@@ -28514,7 +28584,7 @@ class CallWithChatBackedCallAdapter {
|
|
28514
28584
|
}
|
28515
28585
|
/* @conditional-compile-remove(PSTN-calls) */
|
28516
28586
|
addParticipant(participant, options) {
|
28517
|
-
return __awaiter$
|
28587
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28518
28588
|
if (communicationCommon.isPhoneNumberIdentifier(participant) && options) {
|
28519
28589
|
return this.callWithChatAdapter.addParticipant(participant, options);
|
28520
28590
|
}
|
@@ -28529,37 +28599,37 @@ class CallWithChatBackedCallAdapter {
|
|
28529
28599
|
}
|
28530
28600
|
/* @conditional-compile-remove(close-captions) */
|
28531
28601
|
startCaptions(options) {
|
28532
|
-
return __awaiter$
|
28602
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28533
28603
|
this.callWithChatAdapter.startCaptions(options);
|
28534
28604
|
});
|
28535
28605
|
}
|
28536
28606
|
/* @conditional-compile-remove(close-captions) */
|
28537
28607
|
stopCaptions() {
|
28538
|
-
return __awaiter$
|
28608
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28539
28609
|
this.callWithChatAdapter.stopCaptions();
|
28540
28610
|
});
|
28541
28611
|
}
|
28542
28612
|
/* @conditional-compile-remove(close-captions) */
|
28543
28613
|
setCaptionLanguage(language) {
|
28544
|
-
return __awaiter$
|
28614
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28545
28615
|
this.callWithChatAdapter.setCaptionLanguage(language);
|
28546
28616
|
});
|
28547
28617
|
}
|
28548
28618
|
/* @conditional-compile-remove(close-captions) */
|
28549
28619
|
setSpokenLanguage(language) {
|
28550
|
-
return __awaiter$
|
28620
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28551
28621
|
this.callWithChatAdapter.setSpokenLanguage(language);
|
28552
28622
|
});
|
28553
28623
|
}
|
28554
28624
|
/* @conditional-compile-remove(video-background-effects) */
|
28555
28625
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
28556
|
-
return __awaiter$
|
28626
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28557
28627
|
yield this.callWithChatAdapter.startVideoBackgroundEffect(videoBackgroundEffect);
|
28558
28628
|
});
|
28559
28629
|
}
|
28560
28630
|
/* @conditional-compile-remove(video-background-effects) */
|
28561
28631
|
stopVideoBackgroundEffects() {
|
28562
|
-
return __awaiter$
|
28632
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28563
28633
|
yield this.callWithChatAdapter.stopVideoBackgroundEffects();
|
28564
28634
|
});
|
28565
28635
|
}
|
@@ -28591,13 +28661,15 @@ function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
|
|
28591
28661
|
/* @conditional-compile-remove(video-background-effects) */
|
28592
28662
|
videoBackgroundImages: callWithChatAdapterState.videoBackgroundImages,
|
28593
28663
|
/* @conditional-compile-remove(video-background-effects) */
|
28664
|
+
onResolveVideoEffectDependency: callWithChatAdapterState.onResolveVideoEffectDependency,
|
28665
|
+
/* @conditional-compile-remove(video-background-effects) */
|
28594
28666
|
selectedVideoBackgroundEffect: callWithChatAdapterState.selectedVideoBackgroundEffect
|
28595
28667
|
};
|
28596
28668
|
}
|
28597
28669
|
|
28598
28670
|
// Copyright (c) Microsoft Corporation.
|
28599
28671
|
// Licensed under the MIT license.
|
28600
|
-
var __awaiter$
|
28672
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
28601
28673
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28602
28674
|
return new (P || (P = Promise))(function (resolve, reject) {
|
28603
28675
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -28618,12 +28690,12 @@ class CallWithChatBackedChatAdapter {
|
|
28618
28690
|
// For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.
|
28619
28691
|
// In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.
|
28620
28692
|
this.eventStore = new Map();
|
28621
|
-
this.fetchInitialData = () => __awaiter$
|
28622
|
-
this.sendMessage = (content) => __awaiter$
|
28623
|
-
this.sendReadReceipt = (chatMessageId) => __awaiter$
|
28624
|
-
this.sendTypingIndicator = () => __awaiter$
|
28625
|
-
this.removeParticipant = (userId) => __awaiter$
|
28626
|
-
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$
|
28693
|
+
this.fetchInitialData = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.fetchInitialData(); });
|
28694
|
+
this.sendMessage = (content) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendMessage(content); });
|
28695
|
+
this.sendReadReceipt = (chatMessageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendReadReceipt(chatMessageId); });
|
28696
|
+
this.sendTypingIndicator = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendTypingIndicator(); });
|
28697
|
+
this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
|
28698
|
+
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.loadPreviousChatMessages(messagesToLoad); });
|
28627
28699
|
this.dispose = () => this.callWithChatAdapter.dispose();
|
28628
28700
|
this.onStateChange = (handler) => {
|
28629
28701
|
const convertedHandler = (state) => {
|
@@ -28662,12 +28734,12 @@ class CallWithChatBackedChatAdapter {
|
|
28662
28734
|
return this.callWithChatAdapter.off(event, listener);
|
28663
28735
|
}
|
28664
28736
|
};
|
28665
|
-
this.updateMessage = (messageId, content, metadata) => __awaiter$
|
28666
|
-
this.deleteMessage = (messageId) => __awaiter$
|
28737
|
+
this.updateMessage = (messageId, content, metadata) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.updateMessage(messageId, content, metadata); });
|
28738
|
+
this.deleteMessage = (messageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.deleteMessage(messageId); });
|
28667
28739
|
this.clearErrors = (errorTypes) => {
|
28668
28740
|
throw new Error(`Method not supported in CallWithChatComposite.`);
|
28669
28741
|
};
|
28670
|
-
this.setTopic = (topicName) => __awaiter$
|
28742
|
+
this.setTopic = (topicName) => __awaiter$3(this, void 0, void 0, function* () {
|
28671
28743
|
throw new Error(`Chat Topics are not supported in CallWithChatComposite.`);
|
28672
28744
|
});
|
28673
28745
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -28702,7 +28774,7 @@ class CallWithChatBackedChatAdapter {
|
|
28702
28774
|
}
|
28703
28775
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
28704
28776
|
downloadAttachments(options) {
|
28705
|
-
return __awaiter$
|
28777
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
28706
28778
|
return yield this.callWithChatAdapter.downloadAttachments(options);
|
28707
28779
|
});
|
28708
28780
|
}
|
@@ -29086,6 +29158,8 @@ function callWithChatAdapterStateFromBackingStates(callAdapter, chatAdapter) {
|
|
29086
29158
|
/* @conditional-compile-remove(video-background-effects) */
|
29087
29159
|
videoBackgroundImages: callAdapterState.videoBackgroundImages,
|
29088
29160
|
/* @conditional-compile-remove(video-background-effects) */
|
29161
|
+
onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,
|
29162
|
+
/* @conditional-compile-remove(video-background-effects) */
|
29089
29163
|
selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect
|
29090
29164
|
};
|
29091
29165
|
}
|
@@ -29105,6 +29179,8 @@ function mergeCallAdapterStateIntoCallWithChatAdapterState(existingCallWithChatA
|
|
29105
29179
|
/* @conditional-compile-remove(video-background-effects) */
|
29106
29180
|
videoBackgroundImages: callAdapterState.videoBackgroundImages,
|
29107
29181
|
/* @conditional-compile-remove(video-background-effects) */
|
29182
|
+
onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,
|
29183
|
+
/* @conditional-compile-remove(video-background-effects) */
|
29108
29184
|
selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect });
|
29109
29185
|
}
|
29110
29186
|
|
@@ -29144,7 +29220,7 @@ const getChatThreadFromTeamsLink = (teamsMeetingLink) => {
|
|
29144
29220
|
|
29145
29221
|
// Copyright (c) Microsoft Corporation.
|
29146
29222
|
// Licensed under the MIT license.
|
29147
|
-
var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29223
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29148
29224
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29149
29225
|
return new (P || (P = Promise))(function (resolve, reject) {
|
29150
29226
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -29316,7 +29392,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29316
29392
|
}
|
29317
29393
|
/** Leave current Call. */
|
29318
29394
|
leaveCall(forEveryone) {
|
29319
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29395
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29320
29396
|
// Only remove self from the GroupCall. Contoso must manage access to Chat.
|
29321
29397
|
yield this.callAdapter.leaveCall(forEveryone);
|
29322
29398
|
});
|
@@ -29355,7 +29431,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29355
29431
|
}
|
29356
29432
|
/** Remove a participant from the Call only. */
|
29357
29433
|
removeParticipant(userId) {
|
29358
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29434
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29359
29435
|
let participant = userId;
|
29360
29436
|
/* @conditional-compile-remove(PSTN-calls) */
|
29361
29437
|
participant = _toCommunicationIdentifier(userId);
|
@@ -29363,174 +29439,174 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29363
29439
|
});
|
29364
29440
|
}
|
29365
29441
|
setCamera(device, options) {
|
29366
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29442
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29367
29443
|
yield this.callAdapter.setCamera(device, options);
|
29368
29444
|
});
|
29369
29445
|
}
|
29370
29446
|
/** Set the microphone to be used in the Call. */
|
29371
29447
|
setMicrophone(device) {
|
29372
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29448
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29373
29449
|
yield this.callAdapter.setMicrophone(device);
|
29374
29450
|
});
|
29375
29451
|
}
|
29376
29452
|
/** Set the speaker to be used in the Call. */
|
29377
29453
|
setSpeaker(device) {
|
29378
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29454
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29379
29455
|
yield this.callAdapter.setSpeaker(device);
|
29380
29456
|
});
|
29381
29457
|
}
|
29382
29458
|
askDevicePermission(constraints) {
|
29383
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29459
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29384
29460
|
yield this.callAdapter.askDevicePermission(constraints);
|
29385
29461
|
});
|
29386
29462
|
}
|
29387
29463
|
/** Query for available cameras. */
|
29388
29464
|
queryCameras() {
|
29389
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29465
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29390
29466
|
return yield this.callAdapter.queryCameras();
|
29391
29467
|
});
|
29392
29468
|
}
|
29393
29469
|
/** Query for available microphones. */
|
29394
29470
|
queryMicrophones() {
|
29395
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29471
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29396
29472
|
return yield this.callAdapter.queryMicrophones();
|
29397
29473
|
});
|
29398
29474
|
}
|
29399
29475
|
/** Query for available speakers. */
|
29400
29476
|
querySpeakers() {
|
29401
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29477
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29402
29478
|
return yield this.callAdapter.querySpeakers();
|
29403
29479
|
});
|
29404
29480
|
}
|
29405
29481
|
/** Start the camera for the user in the Call. */
|
29406
29482
|
startCamera(options) {
|
29407
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29483
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29408
29484
|
yield this.callAdapter.startCamera(options);
|
29409
29485
|
});
|
29410
29486
|
}
|
29411
29487
|
/** Stop the camera for the user in the Call. */
|
29412
29488
|
stopCamera() {
|
29413
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29489
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29414
29490
|
yield this.callAdapter.stopCamera();
|
29415
29491
|
});
|
29416
29492
|
}
|
29417
29493
|
/** Mute the user in the Call. */
|
29418
29494
|
mute() {
|
29419
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29495
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29420
29496
|
yield this.callAdapter.mute();
|
29421
29497
|
});
|
29422
29498
|
}
|
29423
29499
|
/** Unmute the user in the Call. */
|
29424
29500
|
unmute() {
|
29425
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29501
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29426
29502
|
yield this.callAdapter.unmute();
|
29427
29503
|
});
|
29428
29504
|
}
|
29429
29505
|
/** Trigger the user to start screen share. */
|
29430
29506
|
startScreenShare() {
|
29431
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29507
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29432
29508
|
yield this.callAdapter.startScreenShare();
|
29433
29509
|
});
|
29434
29510
|
}
|
29435
29511
|
/** Stop the current active screen share. */
|
29436
29512
|
stopScreenShare() {
|
29437
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29513
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29438
29514
|
yield this.callAdapter.stopScreenShare();
|
29439
29515
|
});
|
29440
29516
|
}
|
29441
29517
|
/** Create a stream view for a remote participants video feed. */
|
29442
29518
|
createStreamView(remoteUserId, options) {
|
29443
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29519
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29444
29520
|
return yield this.callAdapter.createStreamView(remoteUserId, options);
|
29445
29521
|
});
|
29446
29522
|
}
|
29447
29523
|
/** Dispose of a created stream view of a remote participants video feed. */
|
29448
29524
|
disposeStreamView(remoteUserId, options) {
|
29449
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29525
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29450
29526
|
yield this.callAdapter.disposeStreamView(remoteUserId, options);
|
29451
29527
|
});
|
29452
29528
|
}
|
29453
29529
|
/** Dispose of a remote screen share */
|
29454
29530
|
disposeScreenShareStreamView(remoteUserId) {
|
29455
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29531
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29456
29532
|
yield this.callAdapter.disposeScreenShareStreamView(remoteUserId);
|
29457
29533
|
});
|
29458
29534
|
}
|
29459
29535
|
/** Dispose of a remote video stream */
|
29460
29536
|
disposeRemoteVideoStreamView(remoteUserId) {
|
29461
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29537
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29462
29538
|
yield this.callAdapter.disposeRemoteVideoStreamView(remoteUserId);
|
29463
29539
|
});
|
29464
29540
|
}
|
29465
29541
|
/** Dispose of the local video stream */
|
29466
29542
|
disposeLocalVideoStreamView() {
|
29467
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29543
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29468
29544
|
yield this.callAdapter.disposeLocalVideoStreamView();
|
29469
29545
|
});
|
29470
29546
|
}
|
29471
29547
|
/** Fetch initial Call and Chat data such as chat messages. */
|
29472
29548
|
fetchInitialData() {
|
29473
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29549
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29474
29550
|
yield this.chatAdapter.fetchInitialData();
|
29475
29551
|
});
|
29476
29552
|
}
|
29477
29553
|
/** Send a chat message. */
|
29478
29554
|
sendMessage(content) {
|
29479
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29555
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29480
29556
|
yield this.chatAdapter.sendMessage(content);
|
29481
29557
|
});
|
29482
29558
|
}
|
29483
29559
|
/** Send a chat read receipt. */
|
29484
29560
|
sendReadReceipt(chatMessageId) {
|
29485
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29561
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29486
29562
|
yield this.chatAdapter.sendReadReceipt(chatMessageId);
|
29487
29563
|
});
|
29488
29564
|
}
|
29489
29565
|
/** Send an isTyping indicator. */
|
29490
29566
|
sendTypingIndicator() {
|
29491
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29567
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29492
29568
|
yield this.chatAdapter.sendTypingIndicator();
|
29493
29569
|
});
|
29494
29570
|
}
|
29495
29571
|
/** Load previous Chat messages. */
|
29496
29572
|
loadPreviousChatMessages(messagesToLoad) {
|
29497
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29573
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29498
29574
|
return yield this.chatAdapter.loadPreviousChatMessages(messagesToLoad);
|
29499
29575
|
});
|
29500
29576
|
}
|
29501
29577
|
/** Update an existing message. */
|
29502
29578
|
updateMessage(messageId, content, metadata) {
|
29503
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29579
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29504
29580
|
return yield this.chatAdapter.updateMessage(messageId, content, metadata);
|
29505
29581
|
});
|
29506
29582
|
}
|
29507
29583
|
/** Delete an existing message. */
|
29508
29584
|
deleteMessage(messageId) {
|
29509
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29585
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29510
29586
|
return yield this.chatAdapter.deleteMessage(messageId);
|
29511
29587
|
});
|
29512
29588
|
}
|
29513
29589
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
29514
29590
|
downloadAttachments(options) {
|
29515
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29591
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29516
29592
|
return yield this.chatAdapter.downloadAttachments(options);
|
29517
29593
|
});
|
29518
29594
|
}
|
29519
29595
|
/* @conditional-compile-remove(PSTN-calls) */
|
29520
29596
|
holdCall() {
|
29521
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29597
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29522
29598
|
return yield this.callAdapter.holdCall();
|
29523
29599
|
});
|
29524
29600
|
}
|
29525
29601
|
/* @conditional-compile-remove(PSTN-calls) */
|
29526
29602
|
resumeCall() {
|
29527
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29603
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29528
29604
|
return yield this.callAdapter.resumeCall();
|
29529
29605
|
});
|
29530
29606
|
}
|
29531
29607
|
/* @conditional-compile-remove(PSTN-calls) */
|
29532
29608
|
addParticipant(participant, options) {
|
29533
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29609
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29534
29610
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
29535
29611
|
return yield this.callAdapter.addParticipant(participant);
|
29536
29612
|
}
|
@@ -29541,7 +29617,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29541
29617
|
}
|
29542
29618
|
/* @conditional-compile-remove(PSTN-calls) */
|
29543
29619
|
sendDtmfTone(dtmfTone) {
|
29544
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29620
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29545
29621
|
return yield this.callAdapter.sendDtmfTone(dtmfTone);
|
29546
29622
|
});
|
29547
29623
|
}
|
@@ -29551,37 +29627,37 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29551
29627
|
}
|
29552
29628
|
/* @conditional-compile-remove(close-captions) */
|
29553
29629
|
startCaptions(options) {
|
29554
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29630
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29555
29631
|
yield this.callAdapter.startCaptions(options);
|
29556
29632
|
});
|
29557
29633
|
}
|
29558
29634
|
/* @conditional-compile-remove(close-captions) */
|
29559
29635
|
stopCaptions() {
|
29560
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29636
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29561
29637
|
yield this.callAdapter.stopCaptions();
|
29562
29638
|
});
|
29563
29639
|
}
|
29564
29640
|
/* @conditional-compile-remove(close-captions) */
|
29565
29641
|
setCaptionLanguage(language) {
|
29566
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29642
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29567
29643
|
yield this.callAdapter.setCaptionLanguage(language);
|
29568
29644
|
});
|
29569
29645
|
}
|
29570
29646
|
/* @conditional-compile-remove(close-captions) */
|
29571
29647
|
setSpokenLanguage(language) {
|
29572
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29648
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29573
29649
|
yield this.callAdapter.setSpokenLanguage(language);
|
29574
29650
|
});
|
29575
29651
|
}
|
29576
29652
|
/* @conditional-compile-remove(video-background-effects) */
|
29577
29653
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
29578
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29654
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29579
29655
|
yield this.callAdapter.startVideoBackgroundEffect(videoBackgroundEffect);
|
29580
29656
|
});
|
29581
29657
|
}
|
29582
29658
|
/* @conditional-compile-remove(video-background-effects) */
|
29583
29659
|
stopVideoBackgroundEffects() {
|
29584
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29660
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29585
29661
|
return yield this.callAdapter.stopVideoBackgroundEffects();
|
29586
29662
|
});
|
29587
29663
|
}
|
@@ -29734,7 +29810,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29734
29810
|
*/
|
29735
29811
|
const createAzureCommunicationCallWithChatAdapter = ({ userId, displayName, credential, endpoint, locator,
|
29736
29812
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
29737
|
-
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions }) => __awaiter(void 0, void 0, void 0, function* () {
|
29813
|
+
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions }) => __awaiter$2(void 0, void 0, void 0, function* () {
|
29738
29814
|
const callAdapterLocator = isTeamsMeetingLinkLocator(locator) ? locator : locator.callLocator;
|
29739
29815
|
const createCallAdapterPromise = createAzureCommunicationCallAdapter({
|
29740
29816
|
userId,
|
@@ -29810,7 +29886,7 @@ beforeDispose) => {
|
|
29810
29886
|
if (!credential || !displayName || !endpoint || !locator || !userId) {
|
29811
29887
|
return;
|
29812
29888
|
}
|
29813
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
29889
|
+
(() => __awaiter$2(void 0, void 0, void 0, function* () {
|
29814
29890
|
if (adapterRef.current) {
|
29815
29891
|
// Dispose the old adapter when a new one is created.
|
29816
29892
|
//
|
@@ -29855,7 +29931,7 @@ beforeDispose) => {
|
|
29855
29931
|
// Dispose any existing adapter when the component unmounts.
|
29856
29932
|
React.useEffect(() => {
|
29857
29933
|
return () => {
|
29858
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
29934
|
+
(() => __awaiter$2(void 0, void 0, void 0, function* () {
|
29859
29935
|
if (adapterRef.current) {
|
29860
29936
|
if (beforeDisposeRef.current) {
|
29861
29937
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -29878,7 +29954,7 @@ beforeDispose) => {
|
|
29878
29954
|
*/
|
29879
29955
|
const createAzureCommunicationCallWithChatAdapterFromClients = ({ callClient, callAgent, callLocator, chatClient, chatThreadClient,
|
29880
29956
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
29881
|
-
options }) => __awaiter(void 0, void 0, void 0, function* () {
|
29957
|
+
options }) => __awaiter$2(void 0, void 0, void 0, function* () {
|
29882
29958
|
const createCallAdapterPromise = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, callLocator);
|
29883
29959
|
const createChatAdapterPromise = createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
29884
29960
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
@@ -29890,6 +29966,67 @@ const isTeamsMeetingLinkLocator = (locator) => {
|
|
29890
29966
|
return 'meetingLink' in locator;
|
29891
29967
|
};
|
29892
29968
|
|
29969
|
+
// Copyright (c) Microsoft Corporation.
|
29970
|
+
// Licensed under the MIT license.
|
29971
|
+
var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29972
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29973
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
29974
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
29975
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
29976
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
29977
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
29978
|
+
});
|
29979
|
+
};
|
29980
|
+
/* @conditional-compile-remove(video-background-effects) */
|
29981
|
+
/**
|
29982
|
+
*
|
29983
|
+
* Dependency resolution for video background effects using lazy loading.
|
29984
|
+
* @beta
|
29985
|
+
*/
|
29986
|
+
const onResolveVideoEffectDependencyLazy = () => __awaiter$1(void 0, void 0, void 0, function* () {
|
29987
|
+
const module = yield Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@azure/communication-calling-effects')); });
|
29988
|
+
const createBackgroundBlurEffect = (config) => {
|
29989
|
+
return new module.BackgroundBlurEffect(config);
|
29990
|
+
};
|
29991
|
+
const createBackgroundReplacementEffect = (config) => {
|
29992
|
+
return new module.BackgroundReplacementEffect(config);
|
29993
|
+
};
|
29994
|
+
const VideoBackgroundEffectsDependency = {
|
29995
|
+
createBackgroundBlurEffect,
|
29996
|
+
createBackgroundReplacementEffect
|
29997
|
+
};
|
29998
|
+
return VideoBackgroundEffectsDependency;
|
29999
|
+
});
|
30000
|
+
|
30001
|
+
var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
30002
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30003
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
30004
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
30005
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
30006
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
30007
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
30008
|
+
});
|
30009
|
+
};
|
30010
|
+
/* @conditional-compile-remove(video-background-effects) */
|
30011
|
+
/**
|
30012
|
+
* Dependency resolution for video background effects.
|
30013
|
+
*
|
30014
|
+
* @beta
|
30015
|
+
*/
|
30016
|
+
const onResolveVideoEffectDependency = () => __awaiter(void 0, void 0, void 0, function* () {
|
30017
|
+
const createBackgroundBlurEffect = (config) => {
|
30018
|
+
return new communicationCallingEffects.BackgroundBlurEffect(config);
|
30019
|
+
};
|
30020
|
+
const createBackgroundReplacementEffect = (config) => {
|
30021
|
+
return new communicationCallingEffects.BackgroundReplacementEffect(config);
|
30022
|
+
};
|
30023
|
+
const VideoBackgroundEffectsDependency = {
|
30024
|
+
createBackgroundBlurEffect,
|
30025
|
+
createBackgroundReplacementEffect
|
30026
|
+
};
|
30027
|
+
return VideoBackgroundEffectsDependency;
|
30028
|
+
});
|
30029
|
+
|
29893
30030
|
// Copyright (c) Microsoft Corporation.
|
29894
30031
|
/**
|
29895
30032
|
* Hook to obtain a selector for a specified component.
|
@@ -30061,6 +30198,8 @@ exports.fromFlatCommunicationIdentifier = fromFlatCommunicationIdentifier;
|
|
30061
30198
|
exports.getCallingSelector = getSelector$1;
|
30062
30199
|
exports.getChatSelector = getSelector;
|
30063
30200
|
exports.lightTheme = lightTheme;
|
30201
|
+
exports.onResolveVideoEffectDependency = onResolveVideoEffectDependency;
|
30202
|
+
exports.onResolveVideoEffectDependencyLazy = onResolveVideoEffectDependencyLazy;
|
30064
30203
|
exports.toFlatCommunicationIdentifier = toFlatCommunicationIdentifier;
|
30065
30204
|
exports.useAzureCommunicationCallAdapter = useAzureCommunicationCallAdapter;
|
30066
30205
|
exports.useAzureCommunicationCallWithChatAdapter = useAzureCommunicationCallWithChatAdapter;
|