@azure/communication-react 1.9.0-alpha-202310201708 → 1.9.0-alpha-202310250012
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 +1 -60
- package/dist/dist-cjs/communication-react/index.js +291 -545
- 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/handlers/createCommonHandlers.d.ts +2 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +6 -5
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +7 -12
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +5 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/package.json +2 -70
- package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.d.ts +0 -61
- package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.js +0 -255
- package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.js.map +0 -1
|
@@ -177,7 +177,7 @@ const _isValidIdentifier = (identifier) => {
|
|
|
177
177
|
// Copyright (c) Microsoft Corporation.
|
|
178
178
|
// Licensed under the MIT License.
|
|
179
179
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
|
180
|
-
var telemetryVersion = '1.9.0-alpha-
|
|
180
|
+
var telemetryVersion = '1.9.0-alpha-202310250012';
|
|
181
181
|
|
|
182
182
|
// Copyright (c) Microsoft Corporation.
|
|
183
183
|
/**
|
|
@@ -467,7 +467,7 @@ const getSupportedSpokenLanguages = (state, props) => {
|
|
|
467
467
|
|
|
468
468
|
// Copyright (c) Microsoft Corporation.
|
|
469
469
|
// Licensed under the MIT License.
|
|
470
|
-
var __awaiter$
|
|
470
|
+
var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
471
471
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
472
472
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
473
473
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -506,7 +506,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
|
506
506
|
*
|
|
507
507
|
* @private
|
|
508
508
|
*/
|
|
509
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
|
509
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$M(void 0, void 0, void 0, function* () {
|
|
510
510
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
|
511
511
|
for (const view of unparentedViews) {
|
|
512
512
|
yield callClient.disposeView(undefined, undefined, view);
|
|
@@ -684,7 +684,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
|
684
684
|
|
|
685
685
|
// Copyright (c) Microsoft Corporation.
|
|
686
686
|
// Licensed under the MIT License.
|
|
687
|
-
var __awaiter$
|
|
687
|
+
var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
688
688
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
689
689
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
690
690
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -705,7 +705,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
|
705
705
|
* @private
|
|
706
706
|
*/
|
|
707
707
|
const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callClient, deviceManager, call, options) => {
|
|
708
|
-
const onStartLocalVideo = () => __awaiter$
|
|
708
|
+
const onStartLocalVideo = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
709
709
|
// Before the call object creates a stream, dispose of any local preview streams.
|
|
710
710
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
|
711
711
|
// of disposing and creating a new stream?
|
|
@@ -725,7 +725,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
725
725
|
yield call.startVideo(stream);
|
|
726
726
|
}
|
|
727
727
|
});
|
|
728
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
|
728
|
+
const onStopLocalVideo = (stream) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
729
729
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
|
730
730
|
if (!callId) {
|
|
731
731
|
return;
|
|
@@ -734,7 +734,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
734
734
|
yield call.stopVideo(stream);
|
|
735
735
|
}
|
|
736
736
|
});
|
|
737
|
-
const onToggleCamera = (options) => __awaiter$
|
|
737
|
+
const onToggleCamera = (options) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
738
738
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
|
739
739
|
if (previewOn && call && call.state === 'Connecting') {
|
|
740
740
|
// This is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
|
@@ -782,19 +782,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
});
|
|
785
|
-
const onSelectMicrophone = (device) => __awaiter$
|
|
785
|
+
const onSelectMicrophone = (device) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
786
786
|
if (!deviceManager) {
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
789
|
return deviceManager.selectMicrophone(device);
|
|
790
790
|
});
|
|
791
|
-
const onSelectSpeaker = (device) => __awaiter$
|
|
791
|
+
const onSelectSpeaker = (device) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
792
792
|
if (!deviceManager) {
|
|
793
793
|
return;
|
|
794
794
|
}
|
|
795
795
|
return deviceManager.selectSpeaker(device);
|
|
796
796
|
});
|
|
797
|
-
const onSelectCamera = (device, options) => __awaiter$
|
|
797
|
+
const onSelectCamera = (device, options) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
798
798
|
if (!deviceManager) {
|
|
799
799
|
return;
|
|
800
800
|
}
|
|
@@ -818,11 +818,11 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
818
818
|
}
|
|
819
819
|
});
|
|
820
820
|
/* @conditional-compile-remove(raise-hand) */
|
|
821
|
-
const onRaiseHand = () => __awaiter$
|
|
821
|
+
const onRaiseHand = () => __awaiter$L(void 0, void 0, void 0, function* () { var _a; return yield ((_a = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand)) === null || _a === void 0 ? void 0 : _a.raiseHand()); });
|
|
822
822
|
/* @conditional-compile-remove(raise-hand) */
|
|
823
|
-
const onLowerHand = () => __awaiter$
|
|
823
|
+
const onLowerHand = () => __awaiter$L(void 0, void 0, void 0, function* () { var _b; return yield ((_b = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand)) === null || _b === void 0 ? void 0 : _b.lowerHand()); });
|
|
824
824
|
/* @conditional-compile-remove(raise-hand) */
|
|
825
|
-
const onToggleRaiseHand = () => __awaiter$
|
|
825
|
+
const onToggleRaiseHand = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
826
826
|
const raiseHandFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand);
|
|
827
827
|
const localUserId = callClient.getState().userId;
|
|
828
828
|
const isLocalRaisedHand = raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.getRaisedHands().find((publishedState) => toFlatCommunicationIdentifier(publishedState.identifier) === toFlatCommunicationIdentifier(localUserId));
|
|
@@ -833,19 +833,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
833
833
|
yield (raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.raiseHand());
|
|
834
834
|
}
|
|
835
835
|
});
|
|
836
|
-
const onToggleMicrophone = () => __awaiter$
|
|
836
|
+
const onToggleMicrophone = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
837
837
|
if (!call || !_isInCall(call.state)) {
|
|
838
838
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
|
839
839
|
}
|
|
840
840
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
|
841
841
|
});
|
|
842
|
-
const onStartScreenShare = () => __awaiter$
|
|
843
|
-
const onStopScreenShare = () => __awaiter$
|
|
844
|
-
const onToggleScreenShare = () => __awaiter$
|
|
845
|
-
const onHangUp = (forEveryone) => __awaiter$
|
|
842
|
+
const onStartScreenShare = () => __awaiter$L(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
|
843
|
+
const onStopScreenShare = () => __awaiter$L(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
|
844
|
+
const onToggleScreenShare = () => __awaiter$L(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
|
845
|
+
const onHangUp = (forEveryone) => __awaiter$L(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
|
846
846
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
847
|
-
const onToggleHold = () => __awaiter$
|
|
848
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
|
847
|
+
const onToggleHold = () => __awaiter$L(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()); });
|
|
848
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
849
849
|
var _c;
|
|
850
850
|
if (!call || call.localVideoStreams.length === 0) {
|
|
851
851
|
return;
|
|
@@ -861,7 +861,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
861
861
|
const { view } = (_c = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _c !== void 0 ? _c : {};
|
|
862
862
|
return view ? { view } : undefined;
|
|
863
863
|
});
|
|
864
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
|
864
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
865
865
|
if (!call) {
|
|
866
866
|
return;
|
|
867
867
|
}
|
|
@@ -892,7 +892,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
892
892
|
}
|
|
893
893
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
|
894
894
|
});
|
|
895
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
|
895
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
896
896
|
if (!call) {
|
|
897
897
|
return;
|
|
898
898
|
}
|
|
@@ -913,7 +913,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
913
913
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
|
914
914
|
}
|
|
915
915
|
});
|
|
916
|
-
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$
|
|
916
|
+
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
917
917
|
if (!call) {
|
|
918
918
|
return;
|
|
919
919
|
}
|
|
@@ -930,7 +930,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
930
930
|
callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
|
|
931
931
|
}
|
|
932
932
|
});
|
|
933
|
-
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$
|
|
933
|
+
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
934
934
|
if (!call) {
|
|
935
935
|
return;
|
|
936
936
|
}
|
|
@@ -947,7 +947,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
947
947
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
|
948
948
|
}
|
|
949
949
|
});
|
|
950
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
|
950
|
+
const onDisposeLocalStreamView = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
951
951
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
|
952
952
|
const callState = call && callClient.getState().calls[call.id];
|
|
953
953
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
|
@@ -960,18 +960,18 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
960
960
|
yield disposeAllLocalPreviewViews(callClient);
|
|
961
961
|
});
|
|
962
962
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
|
963
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
|
963
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$L(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
|
964
964
|
const notImplemented = () => {
|
|
965
965
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
|
966
966
|
};
|
|
967
967
|
/* @conditional-compile-remove(call-readiness) */
|
|
968
|
-
const askDevicePermission = (constrain) => __awaiter$
|
|
968
|
+
const askDevicePermission = (constrain) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
969
969
|
if (deviceManager) {
|
|
970
970
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
|
971
971
|
}
|
|
972
972
|
});
|
|
973
973
|
/* @conditional-compile-remove(video-background-effects) */
|
|
974
|
-
const onRemoveVideoBackgroundEffects = () => __awaiter$
|
|
974
|
+
const onRemoveVideoBackgroundEffects = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
975
975
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
|
976
976
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
|
977
977
|
if (stream) {
|
|
@@ -984,7 +984,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
984
984
|
}
|
|
985
985
|
});
|
|
986
986
|
/* @conditional-compile-remove(video-background-effects) */
|
|
987
|
-
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$
|
|
987
|
+
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
988
988
|
var _d;
|
|
989
989
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
|
990
990
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
|
@@ -998,7 +998,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
998
998
|
}
|
|
999
999
|
});
|
|
1000
1000
|
/* @conditional-compile-remove(video-background-effects) */
|
|
1001
|
-
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$
|
|
1001
|
+
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
1002
1002
|
var _e;
|
|
1003
1003
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
|
1004
1004
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
|
@@ -1012,22 +1012,22 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
1012
1012
|
}
|
|
1013
1013
|
});
|
|
1014
1014
|
/* @conditional-compile-remove(close-captions) */
|
|
1015
|
-
const onStartCaptions = (options) => __awaiter$
|
|
1015
|
+
const onStartCaptions = (options) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
1016
1016
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
|
1017
1017
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.startCaptions(options));
|
|
1018
1018
|
});
|
|
1019
1019
|
/* @conditional-compile-remove(close-captions) */
|
|
1020
|
-
const onStopCaptions = () => __awaiter$
|
|
1020
|
+
const onStopCaptions = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
1021
1021
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
|
1022
1022
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.stopCaptions());
|
|
1023
1023
|
});
|
|
1024
1024
|
/* @conditional-compile-remove(close-captions) */
|
|
1025
|
-
const onSetSpokenLanguage = (language) => __awaiter$
|
|
1025
|
+
const onSetSpokenLanguage = (language) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
1026
1026
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
|
1027
1027
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.setSpokenLanguage(language));
|
|
1028
1028
|
});
|
|
1029
1029
|
/* @conditional-compile-remove(close-captions) */
|
|
1030
|
-
const onSetCaptionLanguage = (language) => __awaiter$
|
|
1030
|
+
const onSetCaptionLanguage = (language) => __awaiter$L(void 0, void 0, void 0, function* () {
|
|
1031
1031
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
|
1032
1032
|
yield captionsFeature.setCaptionLanguage(language);
|
|
1033
1033
|
});
|
|
@@ -1082,7 +1082,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default["default"]((callC
|
|
|
1082
1082
|
|
|
1083
1083
|
// Copyright (c) Microsoft Corporation.
|
|
1084
1084
|
// Licensed under the MIT License.
|
|
1085
|
-
var __awaiter$
|
|
1085
|
+
var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1086
1086
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1087
1087
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1088
1088
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -1110,7 +1110,7 @@ const createDefaultCallingHandlers = memoizeOne__default["default"]((...args) =>
|
|
|
1110
1110
|
return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);
|
|
1111
1111
|
},
|
|
1112
1112
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
1113
|
-
onAddParticipant: (userId, options) => __awaiter$
|
|
1113
|
+
onAddParticipant: (userId, options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
|
1114
1114
|
const participant = _toCommunicationIdentifier(userId);
|
|
1115
1115
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
|
1116
1116
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
|
@@ -1118,7 +1118,7 @@ const createDefaultCallingHandlers = memoizeOne__default["default"]((...args) =>
|
|
|
1118
1118
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
|
1119
1119
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
|
1120
1120
|
}
|
|
1121
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
|
1121
|
+
}), onRemoveParticipant: (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
|
1122
1122
|
const participant = _toCommunicationIdentifier(userId);
|
|
1123
1123
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
|
1124
1124
|
}) });
|
|
@@ -1126,7 +1126,7 @@ const createDefaultCallingHandlers = memoizeOne__default["default"]((...args) =>
|
|
|
1126
1126
|
|
|
1127
1127
|
// Copyright (c) Microsoft Corporation.
|
|
1128
1128
|
// Licensed under the MIT License.
|
|
1129
|
-
var __awaiter$
|
|
1129
|
+
var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1130
1130
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1131
1131
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1132
1132
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -1158,7 +1158,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default["default"]((callCl
|
|
|
1158
1158
|
},
|
|
1159
1159
|
/* @conditional-compile-remove(teams-identity-support) */
|
|
1160
1160
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
1161
|
-
onAddParticipant: (userId, options) => __awaiter$
|
|
1161
|
+
onAddParticipant: (userId, options) => __awaiter$J(void 0, void 0, void 0, function* () {
|
|
1162
1162
|
const participant = _toCommunicationIdentifier(userId);
|
|
1163
1163
|
/* @conditional-compile-remove(teams-identity-support) */
|
|
1164
1164
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
|
@@ -1174,7 +1174,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default["default"]((callCl
|
|
|
1174
1174
|
}
|
|
1175
1175
|
/* @conditional-compile-remove(teams-identity-support) */
|
|
1176
1176
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
|
1177
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
|
1177
|
+
}), onRemoveParticipant: (userId) => __awaiter$J(void 0, void 0, void 0, function* () {
|
|
1178
1178
|
const participant = _toCommunicationIdentifier(userId);
|
|
1179
1179
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
|
1180
1180
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
|
@@ -1263,7 +1263,7 @@ const getCaptionsSpeakerIdentifier = (captions) => {
|
|
|
1263
1263
|
|
|
1264
1264
|
// Copyright (c) Microsoft Corporation.
|
|
1265
1265
|
// Licensed under the MIT License.
|
|
1266
|
-
var __awaiter$
|
|
1266
|
+
var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1267
1267
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1268
1268
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1269
1269
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -1312,13 +1312,13 @@ class ProxyDeviceManager {
|
|
|
1312
1312
|
this.selectCamera = (videoDeviceInfo) => {
|
|
1313
1313
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
|
1314
1314
|
};
|
|
1315
|
-
this.videoDevicesUpdated = () => __awaiter$
|
|
1315
|
+
this.videoDevicesUpdated = () => __awaiter$I(this, void 0, void 0, function* () {
|
|
1316
1316
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
|
1317
1317
|
// We don't want to show that in the UI.
|
|
1318
1318
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
|
1319
1319
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
|
1320
1320
|
});
|
|
1321
|
-
this.audioDevicesUpdated = () => __awaiter$
|
|
1321
|
+
this.audioDevicesUpdated = () => __awaiter$I(this, void 0, void 0, function* () {
|
|
1322
1322
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
|
1323
1323
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
|
1324
1324
|
});
|
|
@@ -1708,7 +1708,7 @@ function convertFromSDKToRaisedHandState(raisedHand) {
|
|
|
1708
1708
|
|
|
1709
1709
|
// Copyright (c) Microsoft Corporation.
|
|
1710
1710
|
// Licensed under the MIT License.
|
|
1711
|
-
var __awaiter$
|
|
1711
|
+
var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1712
1712
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1713
1713
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1714
1714
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -2464,7 +2464,7 @@ class CallContext$2 {
|
|
|
2464
2464
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
|
2465
2465
|
*/
|
|
2466
2466
|
withAsyncErrorTeedToState(action, target) {
|
|
2467
|
-
return (...args) => __awaiter$
|
|
2467
|
+
return (...args) => __awaiter$H(this, void 0, void 0, function* () {
|
|
2468
2468
|
try {
|
|
2469
2469
|
return yield action(...args);
|
|
2470
2470
|
}
|
|
@@ -2911,7 +2911,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
|
2911
2911
|
|
|
2912
2912
|
// Copyright (c) Microsoft Corporation.
|
|
2913
2913
|
// Licensed under the MIT License.
|
|
2914
|
-
var __awaiter$
|
|
2914
|
+
var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2915
2915
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2916
2916
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2917
2917
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -2921,7 +2921,7 @@ var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
|
2921
2921
|
});
|
|
2922
2922
|
};
|
|
2923
2923
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
|
2924
|
-
return __awaiter$
|
|
2924
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
|
2925
2925
|
// we can only have 3 types of createView
|
|
2926
2926
|
let streamEventType;
|
|
2927
2927
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
|
@@ -3043,7 +3043,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
|
3043
3043
|
});
|
|
3044
3044
|
}
|
|
3045
3045
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
|
3046
|
-
return __awaiter$
|
|
3046
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
|
3047
3047
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
|
3048
3048
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
|
3049
3049
|
console.warn('Unparented LocalVideoStream is already rendered');
|
|
@@ -3211,7 +3211,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
|
3211
3211
|
// Render LocalVideoStream that is not part of a Call
|
|
3212
3212
|
// 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).
|
|
3213
3213
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
|
3214
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
|
3214
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$G(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
|
3215
3215
|
}
|
|
3216
3216
|
else {
|
|
3217
3217
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
|
@@ -3771,7 +3771,7 @@ class CallSubscriber {
|
|
|
3771
3771
|
|
|
3772
3772
|
// Copyright (c) Microsoft Corporation.
|
|
3773
3773
|
// Licensed under the MIT License.
|
|
3774
|
-
var __awaiter$
|
|
3774
|
+
var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3775
3775
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3776
3776
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3777
3777
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -3791,14 +3791,14 @@ class ProxyIncomingCall {
|
|
|
3791
3791
|
switch (prop) {
|
|
3792
3792
|
case 'accept': {
|
|
3793
3793
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
3794
|
-
return __awaiter$
|
|
3794
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
|
3795
3795
|
return yield target.accept(...args);
|
|
3796
3796
|
});
|
|
3797
3797
|
}, 'IncomingCall.accept');
|
|
3798
3798
|
}
|
|
3799
3799
|
case 'reject': {
|
|
3800
3800
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
3801
|
-
return __awaiter$
|
|
3801
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
|
3802
3802
|
return yield target.reject(...args);
|
|
3803
3803
|
});
|
|
3804
3804
|
}, 'IncomingCall.reject');
|
|
@@ -4039,7 +4039,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
|
4039
4039
|
|
|
4040
4040
|
// Copyright (c) Microsoft Corporation.
|
|
4041
4041
|
// Licensed under the MIT License.
|
|
4042
|
-
var __awaiter$
|
|
4042
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4043
4043
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4044
4044
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4045
4045
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -4065,56 +4065,56 @@ class ProxyCallCommon {
|
|
|
4065
4065
|
switch (prop) {
|
|
4066
4066
|
case 'mute': {
|
|
4067
4067
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
4068
|
-
return __awaiter$
|
|
4068
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
|
4069
4069
|
return yield target.mute(...args);
|
|
4070
4070
|
});
|
|
4071
4071
|
}, 'Call.mute');
|
|
4072
4072
|
}
|
|
4073
4073
|
case 'unmute': {
|
|
4074
4074
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
4075
|
-
return __awaiter$
|
|
4075
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
|
4076
4076
|
return yield target.unmute(...args);
|
|
4077
4077
|
});
|
|
4078
4078
|
}, 'Call.unmute');
|
|
4079
4079
|
}
|
|
4080
4080
|
case 'startVideo': {
|
|
4081
4081
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
4082
|
-
return __awaiter$
|
|
4082
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
|
4083
4083
|
return yield target.startVideo(...args);
|
|
4084
4084
|
});
|
|
4085
4085
|
}, 'Call.startVideo');
|
|
4086
4086
|
}
|
|
4087
4087
|
case 'stopVideo': {
|
|
4088
4088
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
4089
|
-
return __awaiter$
|
|
4089
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
|
4090
4090
|
return yield target.stopVideo(...args);
|
|
4091
4091
|
});
|
|
4092
4092
|
}, 'Call.stopVideo');
|
|
4093
4093
|
}
|
|
4094
4094
|
case 'startScreenSharing': {
|
|
4095
4095
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
4096
|
-
return __awaiter$
|
|
4096
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
|
4097
4097
|
return yield target.startScreenSharing(...args);
|
|
4098
4098
|
});
|
|
4099
4099
|
}, 'Call.startScreenSharing');
|
|
4100
4100
|
}
|
|
4101
4101
|
case 'stopScreenSharing': {
|
|
4102
4102
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
4103
|
-
return __awaiter$
|
|
4103
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
|
4104
4104
|
return yield target.stopScreenSharing(...args);
|
|
4105
4105
|
});
|
|
4106
4106
|
}, 'Call.stopScreenSharing');
|
|
4107
4107
|
}
|
|
4108
4108
|
case 'hold': {
|
|
4109
4109
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
4110
|
-
return __awaiter$
|
|
4110
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
|
4111
4111
|
return yield target.hold(...args);
|
|
4112
4112
|
});
|
|
4113
4113
|
}, 'Call.hold');
|
|
4114
4114
|
}
|
|
4115
4115
|
case 'resume': {
|
|
4116
4116
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
4117
|
-
return __awaiter$
|
|
4117
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
|
4118
4118
|
return yield target.resume(...args);
|
|
4119
4119
|
});
|
|
4120
4120
|
}, 'Call.resume');
|
|
@@ -4154,7 +4154,7 @@ class ProxyTeamsCaptions {
|
|
|
4154
4154
|
get(target, prop) {
|
|
4155
4155
|
switch (prop) {
|
|
4156
4156
|
case 'startCaptions':
|
|
4157
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
4157
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$E(this, void 0, void 0, function* () {
|
|
4158
4158
|
var _a, _b;
|
|
4159
4159
|
this._context.setStartCaptionsInProgress(this._call.id, true);
|
|
4160
4160
|
const ret = yield target.startCaptions(...args);
|
|
@@ -4162,7 +4162,7 @@ class ProxyTeamsCaptions {
|
|
|
4162
4162
|
return ret;
|
|
4163
4163
|
}), 'Call.feature');
|
|
4164
4164
|
case 'stopCaptions':
|
|
4165
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
4165
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$E(this, void 0, void 0, function* () {
|
|
4166
4166
|
const ret = yield target.stopCaptions(...args);
|
|
4167
4167
|
this._context.setIsCaptionActive(this._call.id, false);
|
|
4168
4168
|
this._context.setStartCaptionsInProgress(this._call.id, false);
|
|
@@ -4170,13 +4170,13 @@ class ProxyTeamsCaptions {
|
|
|
4170
4170
|
return ret;
|
|
4171
4171
|
}), 'Call.feature');
|
|
4172
4172
|
case 'setSpokenLanguage':
|
|
4173
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
4173
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$E(this, void 0, void 0, function* () {
|
|
4174
4174
|
const ret = yield target.setSpokenLanguage(...args);
|
|
4175
4175
|
this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
|
|
4176
4176
|
return ret;
|
|
4177
4177
|
}), 'Call.feature');
|
|
4178
4178
|
case 'setCaptionLanguage':
|
|
4179
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
4179
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$E(this, void 0, void 0, function* () {
|
|
4180
4180
|
const ret = yield target.setCaptionLanguage(...args);
|
|
4181
4181
|
this._context.setSelectedCaptionLanguage(this._call.id, args[0]);
|
|
4182
4182
|
return ret;
|
|
@@ -4224,7 +4224,7 @@ class ProxyTransferCallFeature {
|
|
|
4224
4224
|
|
|
4225
4225
|
// Copyright (c) Microsoft Corporation.
|
|
4226
4226
|
// Licensed under the MIT License.
|
|
4227
|
-
var __awaiter$
|
|
4227
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4228
4228
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4229
4229
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4230
4230
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -4238,7 +4238,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
|
4238
4238
|
switch (prop) {
|
|
4239
4239
|
case 'addParticipant': {
|
|
4240
4240
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
|
4241
|
-
return __awaiter$
|
|
4241
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
|
4242
4242
|
return yield target.addParticipant(...args);
|
|
4243
4243
|
});
|
|
4244
4244
|
}, 'Call.addParticipant');
|
|
@@ -4459,7 +4459,7 @@ class InternalCallContext {
|
|
|
4459
4459
|
|
|
4460
4460
|
// Copyright (c) Microsoft Corporation.
|
|
4461
4461
|
// Licensed under the MIT License.
|
|
4462
|
-
var __awaiter$
|
|
4462
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4463
4463
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4464
4464
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4465
4465
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -4474,7 +4474,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
|
4474
4474
|
switch (prop) {
|
|
4475
4475
|
case 'addParticipant': {
|
|
4476
4476
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
|
4477
|
-
return __awaiter$
|
|
4477
|
+
return __awaiter$C(this, void 0, void 0, function* () {
|
|
4478
4478
|
return yield target.addParticipant(...args);
|
|
4479
4479
|
});
|
|
4480
4480
|
}, 'TeamsCall.addParticipant');
|
|
@@ -4590,7 +4590,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
|
4590
4590
|
|
|
4591
4591
|
// Copyright (c) Microsoft Corporation.
|
|
4592
4592
|
// Licensed under the MIT License.
|
|
4593
|
-
var __awaiter$
|
|
4593
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4594
4594
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4595
4595
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4596
4596
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -4612,7 +4612,7 @@ class ProxyVideoStreamRendererView {
|
|
|
4612
4612
|
get(target, prop) {
|
|
4613
4613
|
switch (prop) {
|
|
4614
4614
|
case 'updateScalingMode': {
|
|
4615
|
-
return (...args) => __awaiter$
|
|
4615
|
+
return (...args) => __awaiter$B(this, void 0, void 0, function* () {
|
|
4616
4616
|
yield target.updateScalingMode(...args);
|
|
4617
4617
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
|
4618
4618
|
});
|
|
@@ -4633,7 +4633,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
|
4633
4633
|
|
|
4634
4634
|
// Copyright (c) Microsoft Corporation.
|
|
4635
4635
|
// Licensed under the MIT License.
|
|
4636
|
-
var __awaiter$
|
|
4636
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4637
4637
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4638
4638
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4639
4639
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -4655,7 +4655,7 @@ class ProxyCallClient {
|
|
|
4655
4655
|
get(target, prop) {
|
|
4656
4656
|
switch (prop) {
|
|
4657
4657
|
case 'createCallAgent': {
|
|
4658
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
4658
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$A(this, void 0, void 0, function* () {
|
|
4659
4659
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
|
4660
4660
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
|
4661
4661
|
// callAgent if the createCallAgent succeeds.
|
|
@@ -4668,7 +4668,7 @@ class ProxyCallClient {
|
|
|
4668
4668
|
}), 'CallClient.createCallAgent');
|
|
4669
4669
|
}
|
|
4670
4670
|
case 'createTeamsCallAgent': {
|
|
4671
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
4671
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$A(this, void 0, void 0, function* () {
|
|
4672
4672
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
|
4673
4673
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
|
4674
4674
|
// callAgent if the createCallAgent succeeds.
|
|
@@ -4681,7 +4681,7 @@ class ProxyCallClient {
|
|
|
4681
4681
|
}), 'CallClient.createTeamsCallAgent');
|
|
4682
4682
|
}
|
|
4683
4683
|
case 'getDeviceManager': {
|
|
4684
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
|
4684
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$A(this, void 0, void 0, function* () {
|
|
4685
4685
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
|
4686
4686
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
|
4687
4687
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
|
@@ -4710,7 +4710,7 @@ class ProxyCallClient {
|
|
|
4710
4710
|
/**
|
|
4711
4711
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
|
4712
4712
|
*/
|
|
4713
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
|
4713
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$A(this, void 0, void 0, function* () {
|
|
4714
4714
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
|
4715
4715
|
this._context.setEnvironmentInfo(environmentInfo);
|
|
4716
4716
|
return environmentInfo;
|
|
@@ -4763,7 +4763,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
|
4763
4763
|
});
|
|
4764
4764
|
Object.defineProperty(callClient, 'createView', {
|
|
4765
4765
|
configurable: false,
|
|
4766
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
|
4766
|
+
value: (callId, participantId, stream, options) => __awaiter$A(void 0, void 0, void 0, function* () {
|
|
4767
4767
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
|
4768
4768
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
|
4769
4769
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
|
@@ -7306,7 +7306,7 @@ const _MentionPopover = (props) => {
|
|
|
7306
7306
|
|
|
7307
7307
|
// Copyright (c) Microsoft Corporation.
|
|
7308
7308
|
// Licensed under the MIT License.
|
|
7309
|
-
var __awaiter$
|
|
7309
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7310
7310
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7311
7311
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7312
7312
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -7481,7 +7481,7 @@ const TextFieldWithMention = (props) => {
|
|
|
7481
7481
|
onSuggestionSelected,
|
|
7482
7482
|
updateMentionSuggestions
|
|
7483
7483
|
]);
|
|
7484
|
-
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$
|
|
7484
|
+
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$z(void 0, void 0, void 0, function* () {
|
|
7485
7485
|
var _a;
|
|
7486
7486
|
let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
|
|
7487
7487
|
suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
|
|
@@ -7658,7 +7658,7 @@ const TextFieldWithMention = (props) => {
|
|
|
7658
7658
|
});
|
|
7659
7659
|
}
|
|
7660
7660
|
}, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
|
|
7661
|
-
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$
|
|
7661
|
+
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$z(void 0, void 0, void 0, function* () {
|
|
7662
7662
|
var _b;
|
|
7663
7663
|
debouncedQueryUpdate.cancel();
|
|
7664
7664
|
if (event.currentTarget === null) {
|
|
@@ -9675,7 +9675,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
|
9675
9675
|
|
|
9676
9676
|
// Copyright (c) Microsoft Corporation.
|
|
9677
9677
|
// Licensed under the MIT License.
|
|
9678
|
-
var __awaiter$
|
|
9678
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9679
9679
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9680
9680
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
9681
9681
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -9718,7 +9718,7 @@ const _FileDownloadCards = (props) => {
|
|
|
9718
9718
|
fileCount: `${fileMetadata.filter(isFileSharingAttachment).length}`
|
|
9719
9719
|
});
|
|
9720
9720
|
}, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);
|
|
9721
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
|
9721
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$y(void 0, void 0, void 0, function* () {
|
|
9722
9722
|
if (!props.downloadHandler) {
|
|
9723
9723
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
|
9724
9724
|
}
|
|
@@ -9751,9 +9751,10 @@ const _FileDownloadCards = (props) => {
|
|
|
9751
9751
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
|
9752
9752
|
return isFileSharingAttachment(attachment);
|
|
9753
9753
|
})
|
|
9754
|
-
.map((file) => (React__default["default"].createElement(
|
|
9755
|
-
|
|
9756
|
-
|
|
9754
|
+
.map((file) => (React__default["default"].createElement(react.TooltipHost, { content: downloadFileButtonString(), key: file.name },
|
|
9755
|
+
React__default["default"].createElement(_FileCard, { fileName: file.name, key: file.name, fileExtension: file.extension, actionIcon: showSpinner ? (React__default["default"].createElement(react.Spinner, { size: react.SpinnerSize.medium, "aria-live": 'polite', role: 'status' })) : /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
|
9756
|
+
isShowDownloadIcon(file) ? (React__default["default"].createElement(react.IconButton, { className: iconButtonClassName, ariaLabel: downloadFileButtonString() },
|
|
9757
|
+
React__default["default"].createElement(DownloadIconTrampoline, null))) : undefined, actionHandler: () => fileDownloadHandler(userId, file) })))))));
|
|
9757
9758
|
};
|
|
9758
9759
|
/**
|
|
9759
9760
|
* @private
|
|
@@ -9806,7 +9807,7 @@ function createStyleFromV8Style(v8Style) {
|
|
|
9806
9807
|
|
|
9807
9808
|
// Copyright (c) Microsoft Corporation.
|
|
9808
9809
|
// Licensed under the MIT License.
|
|
9809
|
-
var __awaiter$
|
|
9810
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9810
9811
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9811
9812
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
9812
9813
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -9898,7 +9899,7 @@ const MessageBubble = (props) => {
|
|
|
9898
9899
|
return undefined;
|
|
9899
9900
|
}, [editedOn, message.messageType, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
|
9900
9901
|
/* @conditional-compile-remove(image-gallery) */
|
|
9901
|
-
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$
|
|
9902
|
+
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$x(void 0, void 0, void 0, function* () {
|
|
9902
9903
|
if (onInlineImageClicked === undefined) {
|
|
9903
9904
|
return;
|
|
9904
9905
|
}
|
|
@@ -10011,7 +10012,7 @@ const ChatMessageComponentAsMessageBubble = React__default["default"].memo(Messa
|
|
|
10011
10012
|
|
|
10012
10013
|
// Copyright (c) Microsoft Corporation.
|
|
10013
10014
|
// Licensed under the MIT License.
|
|
10014
|
-
var __awaiter$
|
|
10015
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
10015
10016
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10016
10017
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10017
10018
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -10044,7 +10045,7 @@ const ChatMessageComponent = (props) => {
|
|
|
10044
10045
|
onSendMessage && onSendMessage(content !== undefined ? content : '');
|
|
10045
10046
|
}, [clientMessageId, content, onSendMessage, onDeleteMessage]);
|
|
10046
10047
|
if (isEditing && message.messageType === 'chat') {
|
|
10047
|
-
return (React__default["default"].createElement(ChatMessageComponentAsEditBox, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
|
10048
|
+
return (React__default["default"].createElement(ChatMessageComponentAsEditBox, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$w(void 0, void 0, void 0, function* () {
|
|
10048
10049
|
props.onUpdateMessage &&
|
|
10049
10050
|
message.messageId &&
|
|
10050
10051
|
(yield props.onUpdateMessage(message.messageId, text, metadata, options));
|
|
@@ -10585,7 +10586,7 @@ const LiveAnnouncer = (props) => {
|
|
|
10585
10586
|
|
|
10586
10587
|
// Copyright (c) Microsoft Corporation.
|
|
10587
10588
|
// Licensed under the MIT License.
|
|
10588
|
-
var __awaiter$
|
|
10589
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
10589
10590
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10590
10591
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10591
10592
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -10839,7 +10840,7 @@ const MessageThreadWrapper = (props) => {
|
|
|
10839
10840
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
|
10840
10841
|
const [inlineAttachments, setInlineAttachments] = React.useState({});
|
|
10841
10842
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
|
10842
|
-
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$
|
|
10843
|
+
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$v(void 0, void 0, void 0, function* () {
|
|
10843
10844
|
if (!onFetchAttachments || attachment.attachmentType !== 'inlineImage' || attachment.id in inlineAttachments) {
|
|
10844
10845
|
return;
|
|
10845
10846
|
}
|
|
@@ -10894,7 +10895,7 @@ const MessageThreadWrapper = (props) => {
|
|
|
10894
10895
|
*/
|
|
10895
10896
|
const clientHeight = (_a = chatThreadRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
|
10896
10897
|
// we try to only send those message status if user is scrolled to the bottom.
|
|
10897
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
|
10898
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$v(void 0, void 0, void 0, function* () {
|
|
10898
10899
|
if (!isAtBottomOfScrollRef.current ||
|
|
10899
10900
|
!document.hasFocus() ||
|
|
10900
10901
|
!messagesRef.current ||
|
|
@@ -10945,7 +10946,7 @@ const MessageThreadWrapper = (props) => {
|
|
|
10945
10946
|
setIsAtBottomOfScrollRef(atBottom);
|
|
10946
10947
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
|
10947
10948
|
// Infinite scrolling + threadInitialize function
|
|
10948
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
|
10949
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$v(void 0, void 0, void 0, function* () {
|
|
10949
10950
|
if (!isLoadingChatMessagesRef.current) {
|
|
10950
10951
|
if (onLoadPreviousChatMessages) {
|
|
10951
10952
|
isLoadingChatMessagesRef.current = true;
|
|
@@ -15980,7 +15981,7 @@ const DevicesButton = (props) => {
|
|
|
15980
15981
|
|
|
15981
15982
|
// Copyright (c) Microsoft Corporation.
|
|
15982
15983
|
// Licensed under the MIT License.
|
|
15983
|
-
var __awaiter$
|
|
15984
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15984
15985
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15985
15986
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15986
15987
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -16018,7 +16019,7 @@ const CameraButton = (props) => {
|
|
|
16018
16019
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
|
16019
16020
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
|
16020
16021
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
|
16021
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
|
16022
|
+
const onToggleClick = React.useCallback(() => __awaiter$u(void 0, void 0, void 0, function* () {
|
|
16022
16023
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
|
16023
16024
|
if (onToggleCamera) {
|
|
16024
16025
|
setWaitForCamera(true);
|
|
@@ -16186,7 +16187,7 @@ const lightThemeCallButtonStyles = {
|
|
|
16186
16187
|
|
|
16187
16188
|
// Copyright (c) Microsoft Corporation.
|
|
16188
16189
|
// Licensed under the MIT License.
|
|
16189
|
-
var __awaiter$
|
|
16190
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16190
16191
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16191
16192
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16192
16193
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -16227,7 +16228,7 @@ const MicrophoneButton = (props) => {
|
|
|
16227
16228
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
|
16228
16229
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
|
16229
16230
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
|
16230
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
|
16231
|
+
const onToggleClick = React.useCallback(() => __awaiter$t(void 0, void 0, void 0, function* () {
|
|
16231
16232
|
if (onToggleMicrophone) {
|
|
16232
16233
|
try {
|
|
16233
16234
|
yield onToggleMicrophone();
|
|
@@ -17157,7 +17158,7 @@ const formatPhoneNumber = (phoneNumber) => {
|
|
|
17157
17158
|
|
|
17158
17159
|
// Copyright (c) Microsoft Corporation.
|
|
17159
17160
|
// Licensed under the MIT License.
|
|
17160
|
-
var __awaiter$
|
|
17161
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17161
17162
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17162
17163
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17163
17164
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -17199,10 +17200,10 @@ const DialpadButton = (props) => {
|
|
|
17199
17200
|
const theme = react.useTheme();
|
|
17200
17201
|
const { digit, index, onClick, onLongPress, isMobile = false } = props;
|
|
17201
17202
|
const useLongPressProps = React__default["default"].useMemo(() => ({
|
|
17202
|
-
onClick: () => __awaiter$
|
|
17203
|
+
onClick: () => __awaiter$s(void 0, void 0, void 0, function* () {
|
|
17203
17204
|
onClick(digit, index);
|
|
17204
17205
|
}),
|
|
17205
|
-
onLongPress: () => __awaiter$
|
|
17206
|
+
onLongPress: () => __awaiter$s(void 0, void 0, void 0, function* () {
|
|
17206
17207
|
onLongPress(digit, index);
|
|
17207
17208
|
}),
|
|
17208
17209
|
touchEventsOnly: isMobile
|
|
@@ -18043,7 +18044,7 @@ const _spokenLanguageToCaptionLanguage = {
|
|
|
18043
18044
|
|
|
18044
18045
|
// Copyright (c) Microsoft Corporation.
|
|
18045
18046
|
// Licensed under the MIT License.
|
|
18046
|
-
var __awaiter$
|
|
18047
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18047
18048
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18048
18049
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18049
18050
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -18086,7 +18087,7 @@ const _CaptionsSettingsModal = (props) => {
|
|
|
18086
18087
|
onDismissCaptionsSettings();
|
|
18087
18088
|
}
|
|
18088
18089
|
}, [onDismissCaptionsSettings]);
|
|
18089
|
-
const onConfirm = React.useCallback(() => __awaiter$
|
|
18090
|
+
const onConfirm = React.useCallback(() => __awaiter$r(void 0, void 0, void 0, function* () {
|
|
18090
18091
|
const spokenLanguageCode = selectedSpokenLanguage.key.toString();
|
|
18091
18092
|
const captionLanguageCode = selectedCaptionLanguage.key.toString();
|
|
18092
18093
|
if (isCaptionsFeatureActive) {
|
|
@@ -19016,7 +19017,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
|
19016
19017
|
|
|
19017
19018
|
// Copyright (c) Microsoft Corporation.
|
|
19018
19019
|
// Licensed under the MIT License.
|
|
19019
|
-
var __awaiter$
|
|
19020
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
19020
19021
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19021
19022
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19022
19023
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -19039,35 +19040,35 @@ const createDefaultChatHandlers = memoizeOne__default["default"]((chatClient, ch
|
|
|
19039
19040
|
let messageIterator = undefined;
|
|
19040
19041
|
let readReceiptIterator = undefined;
|
|
19041
19042
|
return {
|
|
19042
|
-
onSendMessage: (content, options) => __awaiter$
|
|
19043
|
+
onSendMessage: (content, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
|
19043
19044
|
const sendMessageRequest = {
|
|
19044
19045
|
content,
|
|
19045
19046
|
senderDisplayName: chatClient.getState().displayName
|
|
19046
19047
|
};
|
|
19047
19048
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
|
19048
19049
|
}),
|
|
19049
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
|
19050
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
|
19050
19051
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
|
19051
19052
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
|
19052
19053
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
|
19053
19054
|
}),
|
|
19054
|
-
onDeleteMessage: (messageId) => __awaiter$
|
|
19055
|
+
onDeleteMessage: (messageId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
|
19055
19056
|
yield chatThreadClient.deleteMessage(messageId);
|
|
19056
19057
|
}),
|
|
19057
19058
|
// This handler is designed for chatThread to consume
|
|
19058
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
|
19059
|
+
onMessageSeen: (chatMessageId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
|
19059
19060
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
|
19060
19061
|
}),
|
|
19061
|
-
onTyping: () => __awaiter$
|
|
19062
|
+
onTyping: () => __awaiter$q(void 0, void 0, void 0, function* () {
|
|
19062
19063
|
yield chatThreadClient.sendTypingNotification();
|
|
19063
19064
|
}),
|
|
19064
|
-
onRemoveParticipant: (userId) => __awaiter$
|
|
19065
|
+
onRemoveParticipant: (userId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
|
19065
19066
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
|
19066
19067
|
}),
|
|
19067
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
|
19068
|
+
updateThreadTopicName: (topicName) => __awaiter$q(void 0, void 0, void 0, function* () {
|
|
19068
19069
|
yield chatThreadClient.updateTopic(topicName);
|
|
19069
19070
|
}),
|
|
19070
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
|
19071
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$q(void 0, void 0, void 0, function* () {
|
|
19071
19072
|
var _a, _b, _c;
|
|
19072
19073
|
if (messageIterator === undefined) {
|
|
19073
19074
|
// Lazy definition so that errors in the method call are reported correctly.
|
|
@@ -19934,7 +19935,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
|
19934
19935
|
|
|
19935
19936
|
// Copyright (c) Microsoft Corporation.
|
|
19936
19937
|
// Licensed under the MIT License.
|
|
19937
|
-
var __awaiter$
|
|
19938
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
19938
19939
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19939
19940
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19940
19941
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -20209,7 +20210,7 @@ class ChatContext$1 {
|
|
|
20209
20210
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
|
20210
20211
|
*/
|
|
20211
20212
|
withAsyncErrorTeedToState(f, target) {
|
|
20212
|
-
return (...args) => __awaiter$
|
|
20213
|
+
return (...args) => __awaiter$p(this, void 0, void 0, function* () {
|
|
20213
20214
|
try {
|
|
20214
20215
|
return yield f(...args);
|
|
20215
20216
|
}
|
|
@@ -20321,7 +20322,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
|
20321
20322
|
|
|
20322
20323
|
// Copyright (c) Microsoft Corporation.
|
|
20323
20324
|
// Licensed under the MIT License.
|
|
20324
|
-
var __awaiter$
|
|
20325
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20325
20326
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
20326
20327
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20327
20328
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -20410,7 +20411,7 @@ class EventSubscriber {
|
|
|
20410
20411
|
};
|
|
20411
20412
|
// This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
|
|
20412
20413
|
// Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
|
|
20413
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
|
20414
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$o(this, void 0, void 0, function* () {
|
|
20414
20415
|
var e_1, _a;
|
|
20415
20416
|
try {
|
|
20416
20417
|
for (var _b = __asyncValues$1(this.chatClient
|
|
@@ -20502,7 +20503,7 @@ class EventSubscriber {
|
|
|
20502
20503
|
|
|
20503
20504
|
// Copyright (c) Microsoft Corporation.
|
|
20504
20505
|
// Licensed under the MIT License.
|
|
20505
|
-
var __awaiter$
|
|
20506
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20506
20507
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
20507
20508
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20508
20509
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -20524,7 +20525,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
|
20524
20525
|
const threadsIterator = iteratorCreator(...args);
|
|
20525
20526
|
return {
|
|
20526
20527
|
next() {
|
|
20527
|
-
return __awaiter$
|
|
20528
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
|
20528
20529
|
const result = yield threadsIterator.next();
|
|
20529
20530
|
if (!result.done && result.value) {
|
|
20530
20531
|
decorateFn(result.value, context);
|
|
@@ -20539,7 +20540,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
|
20539
20540
|
const pages = threadsIterator.byPage(settings);
|
|
20540
20541
|
return {
|
|
20541
20542
|
next() {
|
|
20542
|
-
return __awaiter$
|
|
20543
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
|
20543
20544
|
const result = yield pages.next();
|
|
20544
20545
|
const page = result.value;
|
|
20545
20546
|
if (!result.done && result.value) {
|
|
@@ -20623,7 +20624,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
|
20623
20624
|
|
|
20624
20625
|
// Copyright (c) Microsoft Corporation.
|
|
20625
20626
|
// Licensed under the MIT License.
|
|
20626
|
-
var __awaiter$
|
|
20627
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20627
20628
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
20628
20629
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20629
20630
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -20642,14 +20643,14 @@ class ProxyChatThreadClient {
|
|
|
20642
20643
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
|
20643
20644
|
}
|
|
20644
20645
|
case 'getMessage': {
|
|
20645
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
20646
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
|
20646
20647
|
const message = yield chatThreadClient.getMessage(...args);
|
|
20647
20648
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
|
20648
20649
|
return message;
|
|
20649
20650
|
}), 'ChatThreadClient.getMessage');
|
|
20650
20651
|
}
|
|
20651
20652
|
case 'sendMessage': {
|
|
20652
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
20653
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
|
20653
20654
|
var _a;
|
|
20654
20655
|
// Retry logic?
|
|
20655
20656
|
const [request, options] = args;
|
|
@@ -20690,7 +20691,7 @@ class ProxyChatThreadClient {
|
|
|
20690
20691
|
}), 'ChatThreadClient.sendMessage');
|
|
20691
20692
|
}
|
|
20692
20693
|
case 'addParticipants': {
|
|
20693
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
20694
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
|
20694
20695
|
const result = yield chatThreadClient.addParticipants(...args);
|
|
20695
20696
|
const [addRequest] = args;
|
|
20696
20697
|
const participantsToAdd = addRequest.participants;
|
|
@@ -20699,7 +20700,7 @@ class ProxyChatThreadClient {
|
|
|
20699
20700
|
}), 'ChatThreadClient.addParticipants');
|
|
20700
20701
|
}
|
|
20701
20702
|
case 'deleteMessage': {
|
|
20702
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
20703
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
|
20703
20704
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
|
20704
20705
|
const [messageId] = args;
|
|
20705
20706
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
|
@@ -20717,12 +20718,12 @@ class ProxyChatThreadClient {
|
|
|
20717
20718
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
|
20718
20719
|
}
|
|
20719
20720
|
case 'sendTypingNotification': {
|
|
20720
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
20721
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
|
20721
20722
|
return yield chatThreadClient.sendTypingNotification(...args);
|
|
20722
20723
|
}), 'ChatThreadClient.sendTypingNotification');
|
|
20723
20724
|
}
|
|
20724
20725
|
case 'removeParticipant': {
|
|
20725
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
20726
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
|
20726
20727
|
const result = yield chatThreadClient.removeParticipant(...args);
|
|
20727
20728
|
const [removeIdentifier] = args;
|
|
20728
20729
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
|
@@ -20730,7 +20731,7 @@ class ProxyChatThreadClient {
|
|
|
20730
20731
|
}), 'ChatThreadClient.removeParticipant');
|
|
20731
20732
|
}
|
|
20732
20733
|
case 'updateMessage': {
|
|
20733
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
20734
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
|
20734
20735
|
const result = yield chatThreadClient.updateMessage(...args);
|
|
20735
20736
|
const [messageId, updateOption] = args;
|
|
20736
20737
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
|
@@ -20738,7 +20739,7 @@ class ProxyChatThreadClient {
|
|
|
20738
20739
|
}), 'ChatThreadClient.updateMessage');
|
|
20739
20740
|
}
|
|
20740
20741
|
case 'updateTopic': {
|
|
20741
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
20742
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
|
20742
20743
|
const result = yield chatThreadClient.updateTopic(...args);
|
|
20743
20744
|
const [topic] = args;
|
|
20744
20745
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
|
@@ -20746,7 +20747,7 @@ class ProxyChatThreadClient {
|
|
|
20746
20747
|
}), 'ChatThreadClient.updateTopic');
|
|
20747
20748
|
}
|
|
20748
20749
|
case 'getProperties': {
|
|
20749
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
20750
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
|
20750
20751
|
const result = yield chatThreadClient.getProperties(...args);
|
|
20751
20752
|
this._context.updateThread(chatThreadClient.threadId, result);
|
|
20752
20753
|
return result;
|
|
@@ -20783,7 +20784,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
|
20783
20784
|
|
|
20784
20785
|
// Copyright (c) Microsoft Corporation.
|
|
20785
20786
|
// Licensed under the MIT License.
|
|
20786
|
-
var __awaiter$
|
|
20787
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20787
20788
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
20788
20789
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20789
20790
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -20802,7 +20803,7 @@ const proxyChatClient = {
|
|
|
20802
20803
|
switch (prop) {
|
|
20803
20804
|
case 'createChatThread': {
|
|
20804
20805
|
return context.withAsyncErrorTeedToState(function (...args) {
|
|
20805
|
-
return __awaiter$
|
|
20806
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
|
20806
20807
|
const result = yield chatClient.createChatThread(...args);
|
|
20807
20808
|
const thread = result.chatThread;
|
|
20808
20809
|
if (thread) {
|
|
@@ -20815,7 +20816,7 @@ const proxyChatClient = {
|
|
|
20815
20816
|
}
|
|
20816
20817
|
case 'deleteChatThread': {
|
|
20817
20818
|
return context.withAsyncErrorTeedToState(function (...args) {
|
|
20818
|
-
return __awaiter$
|
|
20819
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
|
20819
20820
|
const result = yield chatClient.deleteChatThread(...args);
|
|
20820
20821
|
context.deleteThread(args[0]);
|
|
20821
20822
|
return result;
|
|
@@ -20835,7 +20836,7 @@ const proxyChatClient = {
|
|
|
20835
20836
|
}
|
|
20836
20837
|
case 'startRealtimeNotifications': {
|
|
20837
20838
|
return context.withAsyncErrorTeedToState(function (...args) {
|
|
20838
|
-
return __awaiter$
|
|
20839
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
|
20839
20840
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
|
20840
20841
|
if (!receiver.eventSubscriber) {
|
|
20841
20842
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
|
@@ -20846,7 +20847,7 @@ const proxyChatClient = {
|
|
|
20846
20847
|
}
|
|
20847
20848
|
case 'stopRealtimeNotifications': {
|
|
20848
20849
|
return context.withAsyncErrorTeedToState(function (...args) {
|
|
20849
|
-
return __awaiter$
|
|
20850
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
|
20850
20851
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
|
20851
20852
|
if (receiver.eventSubscriber) {
|
|
20852
20853
|
receiver.eventSubscriber.unsubscribe();
|
|
@@ -21305,7 +21306,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
|
|
|
21305
21306
|
|
|
21306
21307
|
// Copyright (c) Microsoft Corporation.
|
|
21307
21308
|
// Licensed under the MIT License.
|
|
21308
|
-
var __awaiter$
|
|
21309
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21309
21310
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21310
21311
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
21311
21312
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -21440,9 +21441,9 @@ class AzureCommunicationChatAdapter {
|
|
|
21440
21441
|
this.unsubscribeAllEvents();
|
|
21441
21442
|
}
|
|
21442
21443
|
fetchInitialData() {
|
|
21443
|
-
return __awaiter$
|
|
21444
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21444
21445
|
// If get properties fails we dont want to try to get the participants after.
|
|
21445
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
21446
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
|
21446
21447
|
var e_1, _a;
|
|
21447
21448
|
yield this.chatThreadClient.getProperties();
|
|
21448
21449
|
try {
|
|
@@ -21476,8 +21477,8 @@ class AzureCommunicationChatAdapter {
|
|
|
21476
21477
|
this.context.offStateChange(handler);
|
|
21477
21478
|
}
|
|
21478
21479
|
sendMessage(content, options = {}) {
|
|
21479
|
-
return __awaiter$
|
|
21480
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
21480
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21481
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
|
21481
21482
|
/* @conditional-compile-remove(file-sharing) */
|
|
21482
21483
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
|
21483
21484
|
/* @conditional-compile-remove(file-sharing) */
|
|
@@ -21494,51 +21495,51 @@ class AzureCommunicationChatAdapter {
|
|
|
21494
21495
|
});
|
|
21495
21496
|
}
|
|
21496
21497
|
sendReadReceipt(chatMessageId) {
|
|
21497
|
-
return __awaiter$
|
|
21498
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
21498
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21499
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
|
21499
21500
|
yield this.handlers.onMessageSeen(chatMessageId);
|
|
21500
21501
|
}));
|
|
21501
21502
|
});
|
|
21502
21503
|
}
|
|
21503
21504
|
sendTypingIndicator() {
|
|
21504
|
-
return __awaiter$
|
|
21505
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
21505
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21506
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
|
21506
21507
|
yield this.handlers.onTyping();
|
|
21507
21508
|
}));
|
|
21508
21509
|
});
|
|
21509
21510
|
}
|
|
21510
21511
|
removeParticipant(userId) {
|
|
21511
|
-
return __awaiter$
|
|
21512
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
21512
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21513
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
|
21513
21514
|
yield this.handlers.onRemoveParticipant(userId);
|
|
21514
21515
|
}));
|
|
21515
21516
|
});
|
|
21516
21517
|
}
|
|
21517
21518
|
setTopic(topicName) {
|
|
21518
|
-
return __awaiter$
|
|
21519
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
21519
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21520
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
|
21520
21521
|
yield this.handlers.updateThreadTopicName(topicName);
|
|
21521
21522
|
}));
|
|
21522
21523
|
});
|
|
21523
21524
|
}
|
|
21524
21525
|
loadPreviousChatMessages(messagesToLoad) {
|
|
21525
|
-
return __awaiter$
|
|
21526
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
21526
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21527
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
|
21527
21528
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
|
21528
21529
|
}));
|
|
21529
21530
|
});
|
|
21530
21531
|
}
|
|
21531
21532
|
updateMessage(messageId, content, metadata, options) {
|
|
21532
|
-
return __awaiter$
|
|
21533
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
21533
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21534
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
|
21534
21535
|
/* @conditional-compile-remove(file-sharing) */
|
|
21535
21536
|
return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
|
|
21536
21537
|
}));
|
|
21537
21538
|
});
|
|
21538
21539
|
}
|
|
21539
21540
|
deleteMessage(messageId) {
|
|
21540
|
-
return __awaiter$
|
|
21541
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
21541
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21542
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
|
21542
21543
|
return yield this.handlers.onDeleteMessage(messageId);
|
|
21543
21544
|
}));
|
|
21544
21545
|
});
|
|
@@ -21573,8 +21574,8 @@ class AzureCommunicationChatAdapter {
|
|
|
21573
21574
|
}
|
|
21574
21575
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
|
21575
21576
|
downloadAttachments(options) {
|
|
21576
|
-
return __awaiter$
|
|
21577
|
-
return this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
21577
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21578
|
+
return this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
|
21578
21579
|
if (this.credential === undefined) {
|
|
21579
21580
|
const e = new Error();
|
|
21580
21581
|
e['target'] = 'ChatThreadClient.getMessage';
|
|
@@ -21594,9 +21595,9 @@ class AzureCommunicationChatAdapter {
|
|
|
21594
21595
|
}
|
|
21595
21596
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
|
21596
21597
|
downloadAuthenticatedFile(accessToken, options) {
|
|
21597
|
-
return __awaiter$
|
|
21598
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21598
21599
|
function fetchWithAuthentication(url, token) {
|
|
21599
|
-
return __awaiter$
|
|
21600
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21600
21601
|
const headers = new Headers();
|
|
21601
21602
|
headers.append('Authorization', `Bearer ${token}`);
|
|
21602
21603
|
try {
|
|
@@ -21668,7 +21669,7 @@ class AzureCommunicationChatAdapter {
|
|
|
21668
21669
|
this.emitter.off(event, listener);
|
|
21669
21670
|
}
|
|
21670
21671
|
asyncTeeErrorToEventEmitter(f) {
|
|
21671
|
-
return __awaiter$
|
|
21672
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21672
21673
|
try {
|
|
21673
21674
|
return yield f();
|
|
21674
21675
|
}
|
|
@@ -21710,7 +21711,7 @@ const convertEventType = (type) => {
|
|
|
21710
21711
|
*
|
|
21711
21712
|
* @public
|
|
21712
21713
|
*/
|
|
21713
|
-
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$
|
|
21714
|
+
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
21714
21715
|
if (!_isValidIdentifier(userId)) {
|
|
21715
21716
|
throw new Error('Provided userId is invalid. Please provide valid identifier object.');
|
|
21716
21717
|
}
|
|
@@ -21779,7 +21780,7 @@ beforeDispose) => {
|
|
|
21779
21780
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
|
21780
21781
|
return;
|
|
21781
21782
|
}
|
|
21782
|
-
(() => __awaiter$
|
|
21783
|
+
(() => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
21783
21784
|
if (adapterRef.current) {
|
|
21784
21785
|
// Dispose the old adapter when a new one is created.
|
|
21785
21786
|
//
|
|
@@ -21811,7 +21812,7 @@ beforeDispose) => {
|
|
|
21811
21812
|
// Dispose any existing adapter when the component unmounts.
|
|
21812
21813
|
React.useEffect(() => {
|
|
21813
21814
|
return () => {
|
|
21814
|
-
(() => __awaiter$
|
|
21815
|
+
(() => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
21815
21816
|
if (adapterRef.current) {
|
|
21816
21817
|
if (beforeDisposeRef.current) {
|
|
21817
21818
|
yield beforeDisposeRef.current(adapterRef.current);
|
|
@@ -21835,7 +21836,7 @@ beforeDispose) => {
|
|
|
21835
21836
|
function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
|
21836
21837
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
|
21837
21838
|
options) {
|
|
21838
|
-
return __awaiter$
|
|
21839
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
|
21839
21840
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient,
|
|
21840
21841
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ options);
|
|
21841
21842
|
});
|
|
@@ -22048,7 +22049,7 @@ const sendboxContainerStyles = {
|
|
|
22048
22049
|
|
|
22049
22050
|
// Copyright (c) Microsoft Corporation.
|
|
22050
22051
|
// Licensed under the MIT License.
|
|
22051
|
-
var __awaiter$
|
|
22052
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22052
22053
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22053
22054
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22054
22055
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -22069,7 +22070,7 @@ const AvatarPersona = (props) => {
|
|
|
22069
22070
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
|
22070
22071
|
const [data, setData] = React.useState();
|
|
22071
22072
|
React.useEffect(() => {
|
|
22072
|
-
(() => __awaiter$
|
|
22073
|
+
(() => __awaiter$j(void 0, void 0, void 0, function* () {
|
|
22073
22074
|
if (dataProvider && userId) {
|
|
22074
22075
|
const newData = yield dataProvider(userId);
|
|
22075
22076
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
|
@@ -22446,7 +22447,7 @@ const FileDownloadErrorBar = (props) => {
|
|
|
22446
22447
|
|
|
22447
22448
|
// Copyright (c) Microsoft Corporation.
|
|
22448
22449
|
// Licensed under the MIT License.
|
|
22449
|
-
var __awaiter$
|
|
22450
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22450
22451
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22451
22452
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22452
22453
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -22473,7 +22474,7 @@ const ChatScreen = (props) => {
|
|
|
22473
22474
|
const theme = useTheme();
|
|
22474
22475
|
React.useEffect(() => {
|
|
22475
22476
|
// Initial data should be always fetched by the composite(or external caller) instead of the adapter
|
|
22476
|
-
const fetchData = () => __awaiter$
|
|
22477
|
+
const fetchData = () => __awaiter$i(void 0, void 0, void 0, function* () {
|
|
22477
22478
|
// Fetch initial data for adapter
|
|
22478
22479
|
yield adapter.fetchInitialData();
|
|
22479
22480
|
// Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.
|
|
@@ -22507,7 +22508,7 @@ const ChatScreen = (props) => {
|
|
|
22507
22508
|
setDownloadErrorMessage(errorMessage);
|
|
22508
22509
|
} })), [fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler]);
|
|
22509
22510
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
|
22510
|
-
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$
|
|
22511
|
+
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$i(void 0, void 0, void 0, function* () {
|
|
22511
22512
|
if (attachment.attachmentType === 'inlineImage' && attachment.previewUrl) {
|
|
22512
22513
|
const blob = yield adapter.downloadAttachments({ attachmentUrls: [attachment.previewUrl] });
|
|
22513
22514
|
return blob;
|
|
@@ -22515,7 +22516,7 @@ const ChatScreen = (props) => {
|
|
|
22515
22516
|
return [{ blobUrl: '' }];
|
|
22516
22517
|
}), [adapter]);
|
|
22517
22518
|
/* @conditional-compile-remove(image-gallery) */
|
|
22518
|
-
const onInlineImageClicked = React.useCallback((attachmentId, messageId) => __awaiter$
|
|
22519
|
+
const onInlineImageClicked = React.useCallback((attachmentId, messageId) => __awaiter$i(void 0, void 0, void 0, function* () {
|
|
22519
22520
|
var _a, _b;
|
|
22520
22521
|
const messages = (_a = messageThreadProps.messages) === null || _a === void 0 ? void 0 : _a.filter((message) => {
|
|
22521
22522
|
return message.messageId === messageId;
|
|
@@ -22820,7 +22821,7 @@ const END_CALL_PAGES = [
|
|
|
22820
22821
|
|
|
22821
22822
|
// Copyright (c) Microsoft Corporation.
|
|
22822
22823
|
// Licensed under the MIT License.
|
|
22823
|
-
var __awaiter$
|
|
22824
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22824
22825
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22825
22826
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22826
22827
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -23050,7 +23051,7 @@ const isDisabled$3 = (option) => {
|
|
|
23050
23051
|
/**
|
|
23051
23052
|
* @returns Permissions state for the camera.
|
|
23052
23053
|
*/
|
|
23053
|
-
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$
|
|
23054
|
+
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$h(void 0, void 0, void 0, function* () {
|
|
23054
23055
|
try {
|
|
23055
23056
|
return (yield navigator.permissions.query({ name: 'camera' })).state;
|
|
23056
23057
|
}
|
|
@@ -23063,7 +23064,7 @@ const queryCameraPermissionFromPermissionsAPI = () => __awaiter$i(void 0, void 0
|
|
|
23063
23064
|
/**
|
|
23064
23065
|
* @returns Permissions state for the microphone.
|
|
23065
23066
|
*/
|
|
23066
|
-
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$
|
|
23067
|
+
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$h(void 0, void 0, void 0, function* () {
|
|
23067
23068
|
try {
|
|
23068
23069
|
return (yield navigator.permissions.query({ name: 'microphone' })).state;
|
|
23069
23070
|
}
|
|
@@ -23080,7 +23081,7 @@ const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$i(void 0, vo
|
|
|
23080
23081
|
* If permission API is not supported on this browser, permission state is set to unsupported.
|
|
23081
23082
|
* @private
|
|
23082
23083
|
*/
|
|
23083
|
-
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$
|
|
23084
|
+
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$h(void 0, void 0, void 0, function* () {
|
|
23084
23085
|
const [cameraResult, microphoneResult] = yield Promise.all([
|
|
23085
23086
|
queryCameraPermissionFromPermissionsAPI(),
|
|
23086
23087
|
queryMicrophonePermissionFromPermissionsAPI()
|
|
@@ -23158,7 +23159,7 @@ const getSelectedCameraFromAdapterState = (state) => state.devices.selectedCamer
|
|
|
23158
23159
|
|
|
23159
23160
|
// Copyright (c) Microsoft Corporation.
|
|
23160
23161
|
// Licensed under the MIT License.
|
|
23161
|
-
var __awaiter$
|
|
23162
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
23162
23163
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23163
23164
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23164
23165
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -23177,127 +23178,127 @@ _component) => {
|
|
|
23177
23178
|
return createCompositeHandlers(useAdapter());
|
|
23178
23179
|
};
|
|
23179
23180
|
const createCompositeHandlers = memoizeOne__default["default"]((adapter) => ({
|
|
23180
|
-
onCreateLocalStreamView: (options) => __awaiter$
|
|
23181
|
+
onCreateLocalStreamView: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23181
23182
|
return yield adapter.createStreamView(undefined, options);
|
|
23182
23183
|
}),
|
|
23183
|
-
onCreateRemoteStreamView: (userId, options) => __awaiter$
|
|
23184
|
+
onCreateRemoteStreamView: (userId, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23184
23185
|
return yield adapter.createStreamView(userId, options);
|
|
23185
23186
|
}),
|
|
23186
|
-
onHangUp: (forEveryone) => __awaiter$
|
|
23187
|
+
onHangUp: (forEveryone) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23187
23188
|
yield adapter.leaveCall(forEveryone);
|
|
23188
23189
|
}),
|
|
23189
23190
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
23190
|
-
onToggleHold: () => __awaiter$
|
|
23191
|
+
onToggleHold: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23191
23192
|
var _a;
|
|
23192
23193
|
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
|
|
23193
23194
|
}),
|
|
23194
23195
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
23195
|
-
onAddParticipant: (participant, options) => __awaiter$
|
|
23196
|
+
onAddParticipant: (participant, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23196
23197
|
return yield adapter.addParticipant(participant, options);
|
|
23197
23198
|
}),
|
|
23198
23199
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
23199
|
-
onSendDtmfTone: (dtmfTone) => __awaiter$
|
|
23200
|
+
onSendDtmfTone: (dtmfTone) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23200
23201
|
yield adapter.sendDtmfTone(dtmfTone);
|
|
23201
23202
|
}),
|
|
23202
|
-
onRemoveParticipant: (userId) => __awaiter$
|
|
23203
|
+
onRemoveParticipant: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23203
23204
|
yield adapter.removeParticipant(userId);
|
|
23204
23205
|
}),
|
|
23205
23206
|
/* @conditional-compile-remove(raise-hand) */
|
|
23206
|
-
onRaiseHand: () => __awaiter$
|
|
23207
|
+
onRaiseHand: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23207
23208
|
yield adapter.raiseHand();
|
|
23208
23209
|
}),
|
|
23209
23210
|
/* @conditional-compile-remove(raise-hand) */
|
|
23210
|
-
onLowerHand: () => __awaiter$
|
|
23211
|
+
onLowerHand: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23211
23212
|
yield adapter.lowerHand();
|
|
23212
23213
|
}),
|
|
23213
23214
|
/* @conditional-compile-remove(raise-hand) */
|
|
23214
|
-
onToggleRaiseHand: () => __awaiter$
|
|
23215
|
+
onToggleRaiseHand: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23215
23216
|
var _b;
|
|
23216
23217
|
((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.raiseHand.localParticipantRaisedHand)
|
|
23217
23218
|
? yield adapter.lowerHand()
|
|
23218
23219
|
: yield adapter.raiseHand();
|
|
23219
23220
|
}),
|
|
23220
|
-
onSelectCamera: (deviceInfo, options) => __awaiter$
|
|
23221
|
+
onSelectCamera: (deviceInfo, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23221
23222
|
yield adapter.setCamera(deviceInfo, options);
|
|
23222
23223
|
}),
|
|
23223
|
-
onSelectMicrophone: (deviceInfo) => __awaiter$
|
|
23224
|
+
onSelectMicrophone: (deviceInfo) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23224
23225
|
yield adapter.setMicrophone(deviceInfo);
|
|
23225
23226
|
}),
|
|
23226
|
-
onSelectSpeaker: (deviceInfo) => __awaiter$
|
|
23227
|
+
onSelectSpeaker: (deviceInfo) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23227
23228
|
yield adapter.setSpeaker(deviceInfo);
|
|
23228
23229
|
}),
|
|
23229
23230
|
onStartCall: (participants, options) => {
|
|
23230
23231
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
|
23231
23232
|
return adapter.startCall(rawIds, options);
|
|
23232
23233
|
},
|
|
23233
|
-
onStartScreenShare: () => __awaiter$
|
|
23234
|
+
onStartScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23234
23235
|
yield adapter.startScreenShare();
|
|
23235
23236
|
}),
|
|
23236
|
-
onStopScreenShare: () => __awaiter$
|
|
23237
|
+
onStopScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23237
23238
|
yield adapter.stopScreenShare();
|
|
23238
23239
|
}),
|
|
23239
|
-
onToggleCamera: (options) => __awaiter$
|
|
23240
|
+
onToggleCamera: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23240
23241
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
|
23241
23242
|
}),
|
|
23242
|
-
onToggleMicrophone: () => __awaiter$
|
|
23243
|
+
onToggleMicrophone: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23243
23244
|
var _c;
|
|
23244
23245
|
return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
|
23245
23246
|
}),
|
|
23246
|
-
onToggleScreenShare: () => __awaiter$
|
|
23247
|
+
onToggleScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23247
23248
|
var _d;
|
|
23248
23249
|
return ((_d = adapter.getState().call) === null || _d === void 0 ? void 0 : _d.isScreenSharingOn)
|
|
23249
23250
|
? yield adapter.stopScreenShare()
|
|
23250
23251
|
: yield adapter.startScreenShare();
|
|
23251
23252
|
}),
|
|
23252
|
-
onStartLocalVideo: () => __awaiter$
|
|
23253
|
+
onStartLocalVideo: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23253
23254
|
if (adapter.getState().call) {
|
|
23254
23255
|
return adapter.startCamera();
|
|
23255
23256
|
}
|
|
23256
23257
|
}),
|
|
23257
|
-
onDisposeLocalStreamView: () => __awaiter$
|
|
23258
|
+
onDisposeLocalStreamView: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23258
23259
|
return adapter.disposeLocalVideoStreamView();
|
|
23259
23260
|
}),
|
|
23260
|
-
onDisposeRemoteStreamView: (userId) => __awaiter$
|
|
23261
|
+
onDisposeRemoteStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23261
23262
|
return adapter.disposeStreamView(userId);
|
|
23262
23263
|
}),
|
|
23263
|
-
onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$
|
|
23264
|
+
onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23264
23265
|
return adapter.disposeScreenShareStreamView(userId);
|
|
23265
23266
|
}),
|
|
23266
|
-
onDisposeRemoteVideoStreamView: (userId) => __awaiter$
|
|
23267
|
+
onDisposeRemoteVideoStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23267
23268
|
return adapter.disposeRemoteVideoStreamView(userId);
|
|
23268
23269
|
}),
|
|
23269
23270
|
/* @conditional-compile-remove(call-readiness) */
|
|
23270
|
-
askDevicePermission: (constrain) => __awaiter$
|
|
23271
|
+
askDevicePermission: (constrain) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23271
23272
|
return adapter.askDevicePermission(constrain);
|
|
23272
23273
|
}),
|
|
23273
23274
|
/* @conditional-compile-remove(video-background-effects) */
|
|
23274
|
-
onRemoveVideoBackgroundEffects: () => __awaiter$
|
|
23275
|
+
onRemoveVideoBackgroundEffects: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23275
23276
|
return yield adapter.stopVideoBackgroundEffects();
|
|
23276
23277
|
}),
|
|
23277
23278
|
/* @conditional-compile-remove(video-background-effects) */
|
|
23278
|
-
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter$
|
|
23279
|
+
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23279
23280
|
const blurConfig = Object.assign({ effectName: 'blur' }, backgroundBlurConfig);
|
|
23280
23281
|
return yield adapter.startVideoBackgroundEffect(blurConfig);
|
|
23281
23282
|
}),
|
|
23282
23283
|
/* @conditional-compile-remove(video-background-effects) */
|
|
23283
|
-
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter$
|
|
23284
|
+
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23284
23285
|
const replacementConfig = Object.assign({ effectName: 'replacement' }, backgroundReplacementConfig);
|
|
23285
23286
|
return yield adapter.startVideoBackgroundEffect(replacementConfig);
|
|
23286
23287
|
}),
|
|
23287
23288
|
/* @conditional-compile-remove(close-captions) */
|
|
23288
|
-
onStartCaptions: (options) => __awaiter$
|
|
23289
|
+
onStartCaptions: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23289
23290
|
yield adapter.startCaptions(options);
|
|
23290
23291
|
}),
|
|
23291
23292
|
/* @conditional-compile-remove(close-captions) */
|
|
23292
|
-
onStopCaptions: () => __awaiter$
|
|
23293
|
+
onStopCaptions: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23293
23294
|
yield adapter.stopCaptions();
|
|
23294
23295
|
}),
|
|
23295
23296
|
/* @conditional-compile-remove(close-captions) */
|
|
23296
|
-
onSetSpokenLanguage: (language) => __awaiter$
|
|
23297
|
+
onSetSpokenLanguage: (language) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23297
23298
|
yield adapter.setSpokenLanguage(language);
|
|
23298
23299
|
}),
|
|
23299
23300
|
/* @conditional-compile-remove(close-captions) */
|
|
23300
|
-
onSetCaptionLanguage: (language) => __awaiter$
|
|
23301
|
+
onSetCaptionLanguage: (language) => __awaiter$g(void 0, void 0, void 0, function* () {
|
|
23301
23302
|
yield adapter.setCaptionLanguage(language);
|
|
23302
23303
|
})
|
|
23303
23304
|
}));
|
|
@@ -23438,7 +23439,7 @@ const MoreButton = (props) => {
|
|
|
23438
23439
|
|
|
23439
23440
|
// Copyright (c) Microsoft Corporation.
|
|
23440
23441
|
// Licensed under the MIT License.
|
|
23441
|
-
var __awaiter$
|
|
23442
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
23442
23443
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23443
23444
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23444
23445
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -23466,7 +23467,7 @@ const CaptionsBannerMoreButton = (props) => {
|
|
|
23466
23467
|
/* @conditional-compile-remove(close-captions) */
|
|
23467
23468
|
const moreButtonContextualMenuItems = [];
|
|
23468
23469
|
/* @conditional-compile-remove(close-captions) */
|
|
23469
|
-
const startCaptions = React.useCallback(() => __awaiter$
|
|
23470
|
+
const startCaptions = React.useCallback(() => __awaiter$f(void 0, void 0, void 0, function* () {
|
|
23470
23471
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
|
23471
23472
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
|
23472
23473
|
});
|
|
@@ -24496,7 +24497,7 @@ const useCallWithChatCompositeStrings = () => {
|
|
|
24496
24497
|
|
|
24497
24498
|
// Copyright (c) Microsoft Corporation.
|
|
24498
24499
|
// Licensed under the MIT License.
|
|
24499
|
-
var __awaiter$
|
|
24500
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
24500
24501
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
24501
24502
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24502
24503
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -24520,7 +24521,7 @@ const DesktopMoreButton = (props) => {
|
|
|
24520
24521
|
/* @conditional-compile-remove(close-captions) */
|
|
24521
24522
|
const startCaptionsButtonHandlers = useHandlers();
|
|
24522
24523
|
/* @conditional-compile-remove(close-captions) */
|
|
24523
|
-
const startCaptions = React.useCallback(() => __awaiter$
|
|
24524
|
+
const startCaptions = React.useCallback(() => __awaiter$e(void 0, void 0, void 0, function* () {
|
|
24524
24525
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
|
24525
24526
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
|
24526
24527
|
});
|
|
@@ -25260,7 +25261,7 @@ const themedToggleButtonStyle = (theme, checked) => {
|
|
|
25260
25261
|
|
|
25261
25262
|
// Copyright (c) Microsoft Corporation.
|
|
25262
25263
|
// Licensed under the MIT License.
|
|
25263
|
-
var __awaiter$
|
|
25264
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
25264
25265
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
25265
25266
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
25266
25267
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -25490,7 +25491,7 @@ const MoreDrawer = (props) => {
|
|
|
25490
25491
|
? captionSettingsProp.currentCaptionLanguage
|
|
25491
25492
|
: _spokenLanguageToCaptionLanguage[currentSpokenLanguage]);
|
|
25492
25493
|
/* @conditional-compile-remove(close-captions) */
|
|
25493
|
-
const onToggleChange = React.useCallback(() => __awaiter$
|
|
25494
|
+
const onToggleChange = React.useCallback(() => __awaiter$d(void 0, void 0, void 0, function* () {
|
|
25494
25495
|
if (!captionSettingsProp.isCaptionsFeatureActive) {
|
|
25495
25496
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
|
25496
25497
|
spokenLanguage: currentSpokenLanguage
|
|
@@ -26209,7 +26210,7 @@ const AddPeopleButton = (props) => {
|
|
|
26209
26210
|
|
|
26210
26211
|
// Copyright (c) Microsoft Corporation.
|
|
26211
26212
|
// Licensed under the MIT License.
|
|
26212
|
-
var __awaiter$
|
|
26213
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26213
26214
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
26214
26215
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26215
26216
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -26231,11 +26232,11 @@ const PeoplePaneContent = (props) => {
|
|
|
26231
26232
|
return localeStrings.strings.call;
|
|
26232
26233
|
};
|
|
26233
26234
|
const strings = getStrings();
|
|
26234
|
-
const removeParticipantFromCall = React.useCallback((participantId) => __awaiter$
|
|
26235
|
+
const removeParticipantFromCall = React.useCallback((participantId) => __awaiter$c(void 0, void 0, void 0, function* () {
|
|
26235
26236
|
yield adapter.removeParticipant(participantId);
|
|
26236
26237
|
}), [adapter]);
|
|
26237
26238
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
26238
|
-
const addParticipantToCall = React.useCallback((participant, options) => __awaiter$
|
|
26239
|
+
const addParticipantToCall = React.useCallback((participant, options) => __awaiter$c(void 0, void 0, void 0, function* () {
|
|
26239
26240
|
yield adapter.addParticipant(participant, options);
|
|
26240
26241
|
}), [adapter]);
|
|
26241
26242
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
@@ -26262,7 +26263,7 @@ const PeoplePaneContent = (props) => {
|
|
|
26262
26263
|
setDrawerMenuItems
|
|
26263
26264
|
]);
|
|
26264
26265
|
const participantListProps = React.useMemo(() => {
|
|
26265
|
-
const onRemoveAParticipant = (participantId) => __awaiter$
|
|
26266
|
+
const onRemoveAParticipant = (participantId) => __awaiter$c(void 0, void 0, void 0, function* () { return removeParticipantFromCall(participantId); });
|
|
26266
26267
|
return Object.assign(Object.assign({}, participantListDefaultProps), {
|
|
26267
26268
|
// Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
|
|
26268
26269
|
onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
|
|
@@ -26317,7 +26318,11 @@ const createDefaultContextualMenuItems = (participant, strings, onRemoveParticip
|
|
|
26317
26318
|
const hasRemoveParticipantsPermissionTrampoline = (adapter) => {
|
|
26318
26319
|
var _a;
|
|
26319
26320
|
/* @conditional-compile-remove(rooms) */
|
|
26320
|
-
|
|
26321
|
+
const role = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
|
|
26322
|
+
/* @conditional-compile-remove(rooms) */
|
|
26323
|
+
const canRemove = role === 'Presenter' || role === 'Unknown' || role === undefined;
|
|
26324
|
+
/* @conditional-compile-remove(rooms) */
|
|
26325
|
+
return canRemove;
|
|
26321
26326
|
};
|
|
26322
26327
|
|
|
26323
26328
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -26395,7 +26400,7 @@ const localVideoSelector = reselect__namespace.createSelector([callStatusSelecto
|
|
|
26395
26400
|
|
|
26396
26401
|
// Copyright (c) Microsoft Corporation.
|
|
26397
26402
|
// Licensed under the MIT License.
|
|
26398
|
-
var __awaiter$
|
|
26403
|
+
var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26399
26404
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
26400
26405
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26401
26406
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -26464,7 +26469,7 @@ const VideoEffectsPaneContent = (props) => {
|
|
|
26464
26469
|
return videoEffects;
|
|
26465
26470
|
}, [strings, adapter]);
|
|
26466
26471
|
/* @conditional-compile-remove(video-background-effects) */
|
|
26467
|
-
const onEffectChange = React.useCallback((effectKey) => __awaiter$
|
|
26472
|
+
const onEffectChange = React.useCallback((effectKey) => __awaiter$b(void 0, void 0, void 0, function* () {
|
|
26468
26473
|
if (effectKey === 'blur') {
|
|
26469
26474
|
const blurEffect = {
|
|
26470
26475
|
effectName: effectKey
|
|
@@ -28230,7 +28235,7 @@ const localPreviewButtonStyle = {
|
|
|
28230
28235
|
|
|
28231
28236
|
// Copyright (c) Microsoft Corporation.
|
|
28232
28237
|
// Licensed under the MIT License.
|
|
28233
|
-
var __awaiter$
|
|
28238
|
+
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28234
28239
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28235
28240
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28236
28241
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -28250,7 +28255,7 @@ const LocalPreview = (props) => {
|
|
|
28250
28255
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
|
28251
28256
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
|
28252
28257
|
const adapter = useAdapter();
|
|
28253
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
|
28258
|
+
const onToggleMic = React.useCallback(() => __awaiter$a(void 0, void 0, void 0, function* () {
|
|
28254
28259
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
|
28255
28260
|
}), [adapter, isLocalMicrophoneEnabled]);
|
|
28256
28261
|
const hasNoDevices = devicesButtonProps.cameras.length === 0 &&
|
|
@@ -28518,7 +28523,7 @@ const CallReadinessModalFallBack = (props) => {
|
|
|
28518
28523
|
|
|
28519
28524
|
// Copyright (c) Microsoft Corporation.
|
|
28520
28525
|
// Licensed under the MIT License.
|
|
28521
|
-
var __awaiter$
|
|
28526
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28522
28527
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28523
28528
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28524
28529
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -28627,7 +28632,7 @@ const ConfigurationPage = (props) => {
|
|
|
28627
28632
|
const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;
|
|
28628
28633
|
/* @conditional-compile-remove(video-background-effects) */
|
|
28629
28634
|
const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(props.updateSidePaneRenderer, mobileView, props.latestErrors, props.onDismissError);
|
|
28630
|
-
const startCall = React.useCallback(() => __awaiter$
|
|
28635
|
+
const startCall = React.useCallback(() => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
28631
28636
|
/* @conditional-compile-remove(video-background-effects) */
|
|
28632
28637
|
closeVideoEffectsPane();
|
|
28633
28638
|
startCallHandler();
|
|
@@ -29114,7 +29119,7 @@ const holdPaneContentStyles = {
|
|
|
29114
29119
|
|
|
29115
29120
|
// Copyright (c) Microsoft Corporation.
|
|
29116
29121
|
// Licensed under the MIT License.
|
|
29117
|
-
var __awaiter$
|
|
29122
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29118
29123
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29119
29124
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29120
29125
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -29149,7 +29154,7 @@ const HoldPane = () => {
|
|
|
29149
29154
|
React__default["default"].createElement(react.Stack, { horizontal: true, styles: holdPaneContentStyles },
|
|
29150
29155
|
React__default["default"].createElement(react.Text, { styles: holdPaneTimerStyles }, elapsedTime),
|
|
29151
29156
|
React__default["default"].createElement(react.Text, { styles: holdPaneLabelStyles }, strings.holdScreenLabel),
|
|
29152
|
-
React__default["default"].createElement(react.PrimaryButton, { text: !resumingCall ? strings.resumeCallButtonLabel : strings.resumingCallButtonLabel, ariaLabel: !resumingCall ? strings.resumeCallButtonAriaLabel : strings.resumingCallButtonAriaLabel, styles: resumeButtonStyles, disabled: resumingCall, onClick: () => __awaiter$
|
|
29157
|
+
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* () {
|
|
29153
29158
|
setResumingCall(true);
|
|
29154
29159
|
try {
|
|
29155
29160
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
|
@@ -29381,7 +29386,7 @@ const updateLatestCapabilityChangedNotificationMap = (capabilitiesChangedInfoAnd
|
|
|
29381
29386
|
|
|
29382
29387
|
// Copyright (c) Microsoft Corporation.
|
|
29383
29388
|
// Licensed under the MIT License.
|
|
29384
|
-
var __awaiter$
|
|
29389
|
+
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29385
29390
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29386
29391
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29387
29392
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -29400,7 +29405,7 @@ const MainScreen = (props) => {
|
|
|
29400
29405
|
const hasCameras = camerasCount > 0;
|
|
29401
29406
|
const hasMicrophones = microphonesCount > 0;
|
|
29402
29407
|
React.useEffect(() => {
|
|
29403
|
-
(() => __awaiter$
|
|
29408
|
+
(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
29404
29409
|
var _a;
|
|
29405
29410
|
const constrain = getQueryOptions({
|
|
29406
29411
|
/* @conditional-compile-remove(rooms) */ role: (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role
|
|
@@ -29731,7 +29736,7 @@ options) {
|
|
|
29731
29736
|
|
|
29732
29737
|
// Copyright (c) Microsoft Corporation.
|
|
29733
29738
|
// Licensed under the MIT License.
|
|
29734
|
-
var __awaiter$
|
|
29739
|
+
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29735
29740
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29736
29741
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29737
29742
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -29748,7 +29753,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
|
|
|
29748
29753
|
return (state) => {
|
|
29749
29754
|
var _a;
|
|
29750
29755
|
const originalParticipants = (_a = state.call) === null || _a === void 0 ? void 0 : _a.remoteParticipants;
|
|
29751
|
-
(() => __awaiter$
|
|
29756
|
+
(() => __awaiter$6(void 0, void 0, void 0, function* () {
|
|
29752
29757
|
let shouldNotifyUpdates = false;
|
|
29753
29758
|
for (const key in originalParticipants) {
|
|
29754
29759
|
if (cachedDisplayName[key]) {
|
|
@@ -29775,7 +29780,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
|
|
|
29775
29780
|
|
|
29776
29781
|
// Copyright (c) Microsoft Corporation.
|
|
29777
29782
|
// Licensed under the MIT License.
|
|
29778
|
-
var __awaiter$
|
|
29783
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29779
29784
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29780
29785
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29781
29786
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -30125,9 +30130,9 @@ class AzureCommunicationCallAdapter {
|
|
|
30125
30130
|
this.callAgent.dispose();
|
|
30126
30131
|
}
|
|
30127
30132
|
queryCameras() {
|
|
30128
|
-
return __awaiter$
|
|
30133
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30129
30134
|
const startTime = new Date().getTime();
|
|
30130
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30135
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30131
30136
|
const cameras = yield this.deviceManager.getCameras();
|
|
30132
30137
|
const endTime = new Date().getTime();
|
|
30133
30138
|
compositeLogger.info('time to query cameras', endTime - startTime, 'ms');
|
|
@@ -30136,9 +30141,9 @@ class AzureCommunicationCallAdapter {
|
|
|
30136
30141
|
});
|
|
30137
30142
|
}
|
|
30138
30143
|
queryMicrophones() {
|
|
30139
|
-
return __awaiter$
|
|
30144
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30140
30145
|
const startTime = new Date().getTime();
|
|
30141
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30146
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30142
30147
|
const microphones = yield this.deviceManager.getMicrophones();
|
|
30143
30148
|
const endTime = new Date().getTime();
|
|
30144
30149
|
compositeLogger.info('time to query microphones', endTime - startTime, 'ms');
|
|
@@ -30147,9 +30152,9 @@ class AzureCommunicationCallAdapter {
|
|
|
30147
30152
|
});
|
|
30148
30153
|
}
|
|
30149
30154
|
querySpeakers() {
|
|
30150
|
-
return __awaiter$
|
|
30155
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30151
30156
|
const startTime = new Date().getTime();
|
|
30152
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30157
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30153
30158
|
const speakers = (yield this.deviceManager.isSpeakerSelectionAvailable) ? this.deviceManager.getSpeakers() : [];
|
|
30154
30159
|
const endTime = new Date().getTime();
|
|
30155
30160
|
compositeLogger.info('time to query speakers', endTime - startTime, 'ms');
|
|
@@ -30158,9 +30163,9 @@ class AzureCommunicationCallAdapter {
|
|
|
30158
30163
|
});
|
|
30159
30164
|
}
|
|
30160
30165
|
askDevicePermission(constrain) {
|
|
30161
|
-
return __awaiter$
|
|
30166
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30162
30167
|
const startTime = new Date().getTime();
|
|
30163
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30168
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30164
30169
|
yield this.deviceManager.askDevicePermission(constrain);
|
|
30165
30170
|
const endTime = new Date().getTime();
|
|
30166
30171
|
compositeLogger.info('time to query askDevicePermissions', endTime - startTime, 'ms');
|
|
@@ -30251,7 +30256,7 @@ class AzureCommunicationCallAdapter {
|
|
|
30251
30256
|
});
|
|
30252
30257
|
}
|
|
30253
30258
|
createStreamView(remoteUserId, options) {
|
|
30254
|
-
return __awaiter$
|
|
30259
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30255
30260
|
if (remoteUserId === undefined) {
|
|
30256
30261
|
return yield this.handlers.onCreateLocalStreamView(options);
|
|
30257
30262
|
}
|
|
@@ -30261,7 +30266,7 @@ class AzureCommunicationCallAdapter {
|
|
|
30261
30266
|
});
|
|
30262
30267
|
}
|
|
30263
30268
|
disposeStreamView(remoteUserId) {
|
|
30264
|
-
return __awaiter$
|
|
30269
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30265
30270
|
if (remoteUserId === undefined) {
|
|
30266
30271
|
yield this.handlers.onDisposeLocalStreamView();
|
|
30267
30272
|
}
|
|
@@ -30271,22 +30276,22 @@ class AzureCommunicationCallAdapter {
|
|
|
30271
30276
|
});
|
|
30272
30277
|
}
|
|
30273
30278
|
disposeScreenShareStreamView(remoteUserId) {
|
|
30274
|
-
return __awaiter$
|
|
30279
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30275
30280
|
yield this.handlers.onDisposeRemoteScreenShareStreamView(remoteUserId);
|
|
30276
30281
|
});
|
|
30277
30282
|
}
|
|
30278
30283
|
disposeRemoteVideoStreamView(remoteUserId) {
|
|
30279
|
-
return __awaiter$
|
|
30284
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30280
30285
|
yield this.handlers.onDisposeRemoteVideoStreamView(remoteUserId);
|
|
30281
30286
|
});
|
|
30282
30287
|
}
|
|
30283
30288
|
disposeLocalVideoStreamView() {
|
|
30284
|
-
return __awaiter$
|
|
30289
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30285
30290
|
yield this.handlers.onDisposeLocalStreamView();
|
|
30286
30291
|
});
|
|
30287
30292
|
}
|
|
30288
30293
|
leaveCall(forEveryone) {
|
|
30289
|
-
return __awaiter$
|
|
30294
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30290
30295
|
yield this.handlers.onHangUp(forEveryone);
|
|
30291
30296
|
this.unsubscribeCallEvents();
|
|
30292
30297
|
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined,
|
|
@@ -30301,29 +30306,29 @@ class AzureCommunicationCallAdapter {
|
|
|
30301
30306
|
});
|
|
30302
30307
|
}
|
|
30303
30308
|
setCamera(device, options) {
|
|
30304
|
-
return __awaiter$
|
|
30305
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30309
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30310
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30306
30311
|
yield this.handlers.onSelectCamera(device, options);
|
|
30307
30312
|
}));
|
|
30308
30313
|
});
|
|
30309
30314
|
}
|
|
30310
30315
|
setMicrophone(device) {
|
|
30311
|
-
return __awaiter$
|
|
30312
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30316
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30317
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30313
30318
|
yield this.handlers.onSelectMicrophone(device);
|
|
30314
30319
|
}));
|
|
30315
30320
|
});
|
|
30316
30321
|
}
|
|
30317
30322
|
setSpeaker(device) {
|
|
30318
|
-
return __awaiter$
|
|
30319
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30323
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30324
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30320
30325
|
yield this.handlers.onSelectSpeaker(device);
|
|
30321
30326
|
}));
|
|
30322
30327
|
});
|
|
30323
30328
|
}
|
|
30324
30329
|
startCamera(options) {
|
|
30325
|
-
return __awaiter$
|
|
30326
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30330
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30331
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30327
30332
|
if (!isCameraOn(this.getState())) {
|
|
30328
30333
|
// First kick off the effect on the local device before starting the camera in the call.
|
|
30329
30334
|
// This prevents the effect not being applied for a brief moment when the camera is started.
|
|
@@ -30348,8 +30353,8 @@ class AzureCommunicationCallAdapter {
|
|
|
30348
30353
|
});
|
|
30349
30354
|
}
|
|
30350
30355
|
stopCamera() {
|
|
30351
|
-
return __awaiter$
|
|
30352
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30356
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30357
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30353
30358
|
if (isCameraOn(this.getState())) {
|
|
30354
30359
|
yield this.handlers.onToggleCamera();
|
|
30355
30360
|
}
|
|
@@ -30357,8 +30362,8 @@ class AzureCommunicationCallAdapter {
|
|
|
30357
30362
|
});
|
|
30358
30363
|
}
|
|
30359
30364
|
mute() {
|
|
30360
|
-
return __awaiter$
|
|
30361
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30365
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30366
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30362
30367
|
var _a, _b;
|
|
30363
30368
|
this.context.setIsLocalMicrophoneEnabled(false);
|
|
30364
30369
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && !((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
|
@@ -30368,8 +30373,8 @@ class AzureCommunicationCallAdapter {
|
|
|
30368
30373
|
});
|
|
30369
30374
|
}
|
|
30370
30375
|
unmute() {
|
|
30371
|
-
return __awaiter$
|
|
30372
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30376
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30377
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30373
30378
|
var _a, _b;
|
|
30374
30379
|
this.context.setIsLocalMicrophoneEnabled(true);
|
|
30375
30380
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
|
@@ -30379,8 +30384,8 @@ class AzureCommunicationCallAdapter {
|
|
|
30379
30384
|
});
|
|
30380
30385
|
}
|
|
30381
30386
|
startScreenShare() {
|
|
30382
|
-
return __awaiter$
|
|
30383
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30387
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30388
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30384
30389
|
var _a;
|
|
30385
30390
|
if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {
|
|
30386
30391
|
yield this.handlers.onToggleScreenShare();
|
|
@@ -30389,8 +30394,8 @@ class AzureCommunicationCallAdapter {
|
|
|
30389
30394
|
});
|
|
30390
30395
|
}
|
|
30391
30396
|
stopScreenShare() {
|
|
30392
|
-
return __awaiter$
|
|
30393
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30397
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30398
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30394
30399
|
var _a;
|
|
30395
30400
|
if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {
|
|
30396
30401
|
yield this.handlers.onToggleScreenShare();
|
|
@@ -30400,16 +30405,16 @@ class AzureCommunicationCallAdapter {
|
|
|
30400
30405
|
}
|
|
30401
30406
|
/* @conditional-compile-remove(raise-hand) */
|
|
30402
30407
|
raiseHand() {
|
|
30403
|
-
return __awaiter$
|
|
30404
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30408
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30409
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30405
30410
|
yield this.handlers.onToggleRaiseHand();
|
|
30406
30411
|
}));
|
|
30407
30412
|
});
|
|
30408
30413
|
}
|
|
30409
30414
|
/* @conditional-compile-remove(raise-hand) */
|
|
30410
30415
|
lowerHand() {
|
|
30411
|
-
return __awaiter$
|
|
30412
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
30416
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30417
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
|
30413
30418
|
yield this.handlers.onToggleRaiseHand();
|
|
30414
30419
|
}));
|
|
30415
30420
|
});
|
|
@@ -30421,7 +30426,7 @@ class AzureCommunicationCallAdapter {
|
|
|
30421
30426
|
}
|
|
30422
30427
|
/* @conditional-compile-remove(video-background-effects) */
|
|
30423
30428
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
|
30424
|
-
return __awaiter$
|
|
30429
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30425
30430
|
if (this.isBlurEffect(videoBackgroundEffect)) {
|
|
30426
30431
|
const blurConfig = videoBackgroundEffect;
|
|
30427
30432
|
yield this.handlers.onBlurVideoBackground(blurConfig);
|
|
@@ -30434,7 +30439,7 @@ class AzureCommunicationCallAdapter {
|
|
|
30434
30439
|
}
|
|
30435
30440
|
/* @conditional-compile-remove(video-background-effects) */
|
|
30436
30441
|
stopVideoBackgroundEffects() {
|
|
30437
|
-
return __awaiter$
|
|
30442
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30438
30443
|
yield this.handlers.onRemoveVideoBackgroundEffects();
|
|
30439
30444
|
});
|
|
30440
30445
|
}
|
|
@@ -30452,22 +30457,16 @@ class AzureCommunicationCallAdapter {
|
|
|
30452
30457
|
throw new Error('You are already in the call.');
|
|
30453
30458
|
}
|
|
30454
30459
|
const idsToAdd = participants.map((participant) => {
|
|
30455
|
-
|
|
30456
|
-
if (
|
|
30460
|
+
let backendId = participant;
|
|
30461
|
+
if (typeof participant === 'string') {
|
|
30462
|
+
backendId = _toCommunicationIdentifier(participant);
|
|
30463
|
+
}
|
|
30464
|
+
if (backendId.phoneNumber) {
|
|
30457
30465
|
if ((options === null || options === void 0 ? void 0 : options.alternateCallerId) === undefined) {
|
|
30458
30466
|
throw new Error('Unable to start call, PSTN user present with no alternateCallerId.');
|
|
30459
30467
|
}
|
|
30460
30468
|
return backendId;
|
|
30461
30469
|
}
|
|
30462
|
-
else if (communicationCommon.isCommunicationUserIdentifier(backendId)) {
|
|
30463
|
-
return backendId;
|
|
30464
|
-
}
|
|
30465
|
-
else if (communicationCommon.isMicrosoftTeamsAppIdentifier(backendId)) {
|
|
30466
|
-
return backendId;
|
|
30467
|
-
}
|
|
30468
|
-
else if (communicationCommon.isMicrosoftTeamsUserIdentifier(backendId)) {
|
|
30469
|
-
return backendId;
|
|
30470
|
-
}
|
|
30471
30470
|
return backendId;
|
|
30472
30471
|
});
|
|
30473
30472
|
const call = this.handlers.onStartCall(idsToAdd, options);
|
|
@@ -30497,7 +30496,7 @@ class AzureCommunicationCallAdapter {
|
|
|
30497
30496
|
return effect.effectName === 'replacement';
|
|
30498
30497
|
}
|
|
30499
30498
|
removeParticipant(userId) {
|
|
30500
|
-
return __awaiter$
|
|
30499
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30501
30500
|
let participant = userId;
|
|
30502
30501
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
30503
30502
|
participant = _toCommunicationIdentifier(userId);
|
|
@@ -30506,7 +30505,7 @@ class AzureCommunicationCallAdapter {
|
|
|
30506
30505
|
}
|
|
30507
30506
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
30508
30507
|
addParticipant(participant, options) {
|
|
30509
|
-
return __awaiter$
|
|
30508
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30510
30509
|
if (communicationCommon.isPhoneNumberIdentifier(participant) && options) {
|
|
30511
30510
|
this.handlers.onAddParticipant(participant, options);
|
|
30512
30511
|
}
|
|
@@ -30518,7 +30517,7 @@ class AzureCommunicationCallAdapter {
|
|
|
30518
30517
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
30519
30518
|
holdCall() {
|
|
30520
30519
|
var _a;
|
|
30521
|
-
return __awaiter$
|
|
30520
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30522
30521
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) !== 'LocalHold') {
|
|
30523
30522
|
this.handlers.onToggleHold();
|
|
30524
30523
|
}
|
|
@@ -30527,7 +30526,7 @@ class AzureCommunicationCallAdapter {
|
|
|
30527
30526
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
30528
30527
|
resumeCall() {
|
|
30529
30528
|
var _a;
|
|
30530
|
-
return __awaiter$
|
|
30529
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30531
30530
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
|
|
30532
30531
|
this.handlers.onToggleHold();
|
|
30533
30532
|
}
|
|
@@ -30535,31 +30534,31 @@ class AzureCommunicationCallAdapter {
|
|
|
30535
30534
|
}
|
|
30536
30535
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
30537
30536
|
sendDtmfTone(dtmfTone) {
|
|
30538
|
-
return __awaiter$
|
|
30537
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30539
30538
|
this.handlers.onSendDtmfTone(dtmfTone);
|
|
30540
30539
|
});
|
|
30541
30540
|
}
|
|
30542
30541
|
/* @conditional-compile-remove(close-captions) */
|
|
30543
30542
|
startCaptions(options) {
|
|
30544
|
-
return __awaiter$
|
|
30543
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30545
30544
|
this.handlers.onStartCaptions(options);
|
|
30546
30545
|
});
|
|
30547
30546
|
}
|
|
30548
30547
|
/* @conditional-compile-remove(close-captions) */
|
|
30549
30548
|
stopCaptions() {
|
|
30550
|
-
return __awaiter$
|
|
30549
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30551
30550
|
this.handlers.onStopCaptions();
|
|
30552
30551
|
});
|
|
30553
30552
|
}
|
|
30554
30553
|
/* @conditional-compile-remove(close-captions) */
|
|
30555
30554
|
setCaptionLanguage(language) {
|
|
30556
|
-
return __awaiter$
|
|
30555
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30557
30556
|
this.handlers.onSetCaptionLanguage(language);
|
|
30558
30557
|
});
|
|
30559
30558
|
}
|
|
30560
30559
|
/* @conditional-compile-remove(close-captions) */
|
|
30561
30560
|
setSpokenLanguage(language) {
|
|
30562
|
-
return __awaiter$
|
|
30561
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30563
30562
|
this.handlers.onSetSpokenLanguage(language);
|
|
30564
30563
|
});
|
|
30565
30564
|
}
|
|
@@ -30720,7 +30719,7 @@ class AzureCommunicationCallAdapter {
|
|
|
30720
30719
|
this.emitter.off(event, listener);
|
|
30721
30720
|
}
|
|
30722
30721
|
asyncTeeErrorToEventEmitter(f) {
|
|
30723
|
-
return __awaiter$
|
|
30722
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
30724
30723
|
try {
|
|
30725
30724
|
return yield f();
|
|
30726
30725
|
}
|
|
@@ -30755,7 +30754,7 @@ class AzureCommunicationCallAdapter {
|
|
|
30755
30754
|
*/
|
|
30756
30755
|
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
|
|
30757
30756
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
|
30758
|
-
/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter$
|
|
30757
|
+
/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter$5(void 0, void 0, void 0, function* () {
|
|
30759
30758
|
if (!_isValidIdentifier(userId)) {
|
|
30760
30759
|
throw new Error('Invalid identifier. Please provide valid identifier object.');
|
|
30761
30760
|
}
|
|
@@ -30774,7 +30773,7 @@ const createAzureCommunicationCallAdapter = ({ userId, displayName, credential,
|
|
|
30774
30773
|
/**
|
|
30775
30774
|
* @beta
|
|
30776
30775
|
*/
|
|
30777
|
-
const createTeamsCallAdapter = ({ userId, credential, locator, options }) => __awaiter$
|
|
30776
|
+
const createTeamsCallAdapter = ({ userId, credential, locator, options }) => __awaiter$5(void 0, void 0, void 0, function* () {
|
|
30778
30777
|
const callClient = createStatefulCallClient({
|
|
30779
30778
|
userId
|
|
30780
30779
|
});
|
|
@@ -30814,7 +30813,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
|
30814
30813
|
if (adapterKind === 'AzureCommunication' && !displayName) {
|
|
30815
30814
|
return;
|
|
30816
30815
|
}
|
|
30817
|
-
(() => __awaiter$
|
|
30816
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
|
30818
30817
|
if (adapterRef.current) {
|
|
30819
30818
|
// Dispose the old adapter when a new one is created.
|
|
30820
30819
|
//
|
|
@@ -30893,7 +30892,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
|
30893
30892
|
// Dispose any existing adapter when the component unmounts.
|
|
30894
30893
|
React.useEffect(() => {
|
|
30895
30894
|
return () => {
|
|
30896
|
-
(() => __awaiter$
|
|
30895
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
|
30897
30896
|
if (adapterRef.current) {
|
|
30898
30897
|
if (beforeDisposeRef.current) {
|
|
30899
30898
|
yield beforeDisposeRef.current(adapterRef.current);
|
|
@@ -30987,7 +30986,7 @@ beforeDispose) => {
|
|
|
30987
30986
|
*
|
|
30988
30987
|
* @public
|
|
30989
30988
|
*/
|
|
30990
|
-
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$
|
|
30989
|
+
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$5(void 0, void 0, void 0, function* () {
|
|
30991
30990
|
const deviceManager = (yield callClient.getDeviceManager());
|
|
30992
30991
|
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);
|
|
30993
30992
|
if (deviceManager.isSpeakerSelectionAvailable) {
|
|
@@ -31007,7 +31006,7 @@ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, lo
|
|
|
31007
31006
|
*
|
|
31008
31007
|
* @beta
|
|
31009
31008
|
*/
|
|
31010
|
-
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$
|
|
31009
|
+
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$5(void 0, void 0, void 0, function* () {
|
|
31011
31010
|
const deviceManager = (yield callClient.getDeviceManager());
|
|
31012
31011
|
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);
|
|
31013
31012
|
if (deviceManager.isSpeakerSelectionAvailable) {
|
|
@@ -31026,258 +31025,6 @@ const isOutboundCall = (callLocator) => {
|
|
|
31026
31025
|
return 'participantIds' in callLocator;
|
|
31027
31026
|
};
|
|
31028
31027
|
|
|
31029
|
-
// Copyright (c) Microsoft Corporation.
|
|
31030
|
-
// Licensed under the MIT License.
|
|
31031
|
-
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31032
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
31033
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31034
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
31035
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
31036
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31037
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
31038
|
-
});
|
|
31039
|
-
};
|
|
31040
|
-
/**
|
|
31041
|
-
* Temporary copy of the packages/react-composites/tests/browser/call/app/mocks/MockCallAdapter.ts
|
|
31042
|
-
* @internal
|
|
31043
|
-
*/
|
|
31044
|
-
// TODO: Remove this simplified copy of the MockCallAdapter when the original MockCallAdapter is moved to fake-backends package and can be imported
|
|
31045
|
-
class _MockCallAdapter {
|
|
31046
|
-
constructor(testState) {
|
|
31047
|
-
this.emitter = new EventEmitter.EventEmitter();
|
|
31048
|
-
this.state = Object.assign({}, createDefaultCallAdapterState(/* @conditional-compile-remove(rooms) */ testState.localParticipantRole));
|
|
31049
|
-
if (testState.askDevicePermission) {
|
|
31050
|
-
this.askDevicePermission = testState.askDevicePermission;
|
|
31051
|
-
}
|
|
31052
|
-
}
|
|
31053
|
-
setState(state) {
|
|
31054
|
-
this.state = state;
|
|
31055
|
-
this.emitter.emit('stateChanged', state);
|
|
31056
|
-
}
|
|
31057
|
-
addParticipant() {
|
|
31058
|
-
throw Error('addParticipant not implemented');
|
|
31059
|
-
}
|
|
31060
|
-
onStateChange(handler) {
|
|
31061
|
-
this.emitter.addListener('stateChanged', handler);
|
|
31062
|
-
}
|
|
31063
|
-
offStateChange(handler) {
|
|
31064
|
-
this.emitter.removeListener('stateChanged', handler);
|
|
31065
|
-
}
|
|
31066
|
-
allowUnsupportedBrowserVersion() {
|
|
31067
|
-
throw Error('allowWithUnsupportedBrowserVersion not implemented');
|
|
31068
|
-
}
|
|
31069
|
-
getState() {
|
|
31070
|
-
return this.state;
|
|
31071
|
-
}
|
|
31072
|
-
dispose() {
|
|
31073
|
-
throw Error('dispose not implemented');
|
|
31074
|
-
}
|
|
31075
|
-
joinCall() {
|
|
31076
|
-
throw Error('joinCall not implemented');
|
|
31077
|
-
}
|
|
31078
|
-
leaveCall() {
|
|
31079
|
-
throw Error('leaveCall not implemented');
|
|
31080
|
-
}
|
|
31081
|
-
startCamera() {
|
|
31082
|
-
throw Error('leaveCall not implemented');
|
|
31083
|
-
}
|
|
31084
|
-
stopCamera() {
|
|
31085
|
-
throw Error('stopCamera not implemented');
|
|
31086
|
-
}
|
|
31087
|
-
mute() {
|
|
31088
|
-
throw Error('mute not implemented');
|
|
31089
|
-
}
|
|
31090
|
-
unmute() {
|
|
31091
|
-
throw Error('unmute not implemented');
|
|
31092
|
-
}
|
|
31093
|
-
startCall() {
|
|
31094
|
-
throw Error('startCall not implemented');
|
|
31095
|
-
}
|
|
31096
|
-
holdCall() {
|
|
31097
|
-
return Promise.resolve();
|
|
31098
|
-
}
|
|
31099
|
-
resumeCall() {
|
|
31100
|
-
return Promise.resolve();
|
|
31101
|
-
}
|
|
31102
|
-
startScreenShare() {
|
|
31103
|
-
throw Error('startScreenShare not implemented');
|
|
31104
|
-
}
|
|
31105
|
-
stopScreenShare() {
|
|
31106
|
-
throw Error('stopScreenShare not implemented');
|
|
31107
|
-
}
|
|
31108
|
-
/* @conditional-compile-remove(raise-hand) */
|
|
31109
|
-
raiseHand() {
|
|
31110
|
-
throw Error('raiseHand not implemented');
|
|
31111
|
-
}
|
|
31112
|
-
/* @conditional-compile-remove(raise-hand) */
|
|
31113
|
-
lowerHand() {
|
|
31114
|
-
throw Error('lowerHand not implemented');
|
|
31115
|
-
}
|
|
31116
|
-
removeParticipant() {
|
|
31117
|
-
throw Error('removeParticipant not implemented');
|
|
31118
|
-
}
|
|
31119
|
-
createStreamView() {
|
|
31120
|
-
throw Error('createStreamView not implemented');
|
|
31121
|
-
}
|
|
31122
|
-
disposeStreamView() {
|
|
31123
|
-
return Promise.resolve();
|
|
31124
|
-
}
|
|
31125
|
-
disposeScreenShareStreamView() {
|
|
31126
|
-
return Promise.resolve();
|
|
31127
|
-
}
|
|
31128
|
-
disposeLocalVideoStreamView() {
|
|
31129
|
-
return Promise.resolve();
|
|
31130
|
-
}
|
|
31131
|
-
disposeRemoteVideoStreamView() {
|
|
31132
|
-
return Promise.resolve();
|
|
31133
|
-
}
|
|
31134
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31135
|
-
askDevicePermission(constrain) {
|
|
31136
|
-
throw Error('askDevicePermission not implemented');
|
|
31137
|
-
}
|
|
31138
|
-
queryCameras() {
|
|
31139
|
-
return __awaiter$5(this, void 0, void 0, function* () {
|
|
31140
|
-
return [];
|
|
31141
|
-
});
|
|
31142
|
-
}
|
|
31143
|
-
queryMicrophones() {
|
|
31144
|
-
return __awaiter$5(this, void 0, void 0, function* () {
|
|
31145
|
-
return [];
|
|
31146
|
-
});
|
|
31147
|
-
}
|
|
31148
|
-
querySpeakers() {
|
|
31149
|
-
return __awaiter$5(this, void 0, void 0, function* () {
|
|
31150
|
-
return [];
|
|
31151
|
-
});
|
|
31152
|
-
}
|
|
31153
|
-
setCamera() {
|
|
31154
|
-
throw Error('setCamera not implemented');
|
|
31155
|
-
}
|
|
31156
|
-
setMicrophone() {
|
|
31157
|
-
throw Error('setMicrophone not implemented');
|
|
31158
|
-
}
|
|
31159
|
-
setSpeaker() {
|
|
31160
|
-
throw Error('setSpeaker not implemented');
|
|
31161
|
-
}
|
|
31162
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31163
|
-
sendDtmfTone(dtmfTone) {
|
|
31164
|
-
throw Error('sendDtmfTone not implemented');
|
|
31165
|
-
}
|
|
31166
|
-
on() {
|
|
31167
|
-
throw Error('on not implemented');
|
|
31168
|
-
}
|
|
31169
|
-
off() {
|
|
31170
|
-
throw Error('off not implemented');
|
|
31171
|
-
}
|
|
31172
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
|
31173
|
-
getEnvironmentInfo() {
|
|
31174
|
-
throw Error('getEnvironmentInfo not implemented');
|
|
31175
|
-
}
|
|
31176
|
-
/* @conditional-compile-remove(close-captions) */
|
|
31177
|
-
startCaptions() {
|
|
31178
|
-
throw Error('start captions not implemented');
|
|
31179
|
-
}
|
|
31180
|
-
/* @conditional-compile-remove(close-captions) */
|
|
31181
|
-
setCaptionLanguage() {
|
|
31182
|
-
throw Error('setCaptionLanguage not implemented');
|
|
31183
|
-
}
|
|
31184
|
-
/* @conditional-compile-remove(close-captions) */
|
|
31185
|
-
setSpokenLanguage() {
|
|
31186
|
-
throw Error('setSpokenLanguage not implemented');
|
|
31187
|
-
}
|
|
31188
|
-
/* @conditional-compile-remove(close-captions) */
|
|
31189
|
-
stopCaptions() {
|
|
31190
|
-
throw Error('stopCaptions not implemented');
|
|
31191
|
-
}
|
|
31192
|
-
/* @conditional-compile-remove(video-background-effects) */
|
|
31193
|
-
startVideoBackgroundEffect() {
|
|
31194
|
-
throw new Error('startVideoBackgroundEffect not implemented.');
|
|
31195
|
-
}
|
|
31196
|
-
/* @conditional-compile-remove(video-background-effects) */
|
|
31197
|
-
stopVideoBackgroundEffects() {
|
|
31198
|
-
throw new Error('stopVideoBackgroundEffects not implemented.');
|
|
31199
|
-
}
|
|
31200
|
-
/* @conditional-compile-remove(video-background-effects) */
|
|
31201
|
-
updateBackgroundPickerImages() {
|
|
31202
|
-
throw new Error('updateBackgroundPickerImages not implemented.');
|
|
31203
|
-
}
|
|
31204
|
-
/* @conditional-compile-remove(video-background-effects) */
|
|
31205
|
-
updateSelectedVideoBackgroundEffect() {
|
|
31206
|
-
throw new Error('updateSelectedVideoBackgroundEffect not implemented.');
|
|
31207
|
-
}
|
|
31208
|
-
}
|
|
31209
|
-
/**
|
|
31210
|
-
* Default call adapter state that the {@link _MockCallAdapter} class is initialized with an optional role.
|
|
31211
|
-
*/
|
|
31212
|
-
const createDefaultCallAdapterState = (role) => {
|
|
31213
|
-
return {
|
|
31214
|
-
displayName: 'Agnes Thompson',
|
|
31215
|
-
isLocalPreviewMicrophoneEnabled: true,
|
|
31216
|
-
page: 'call',
|
|
31217
|
-
call: {
|
|
31218
|
-
id: 'call1',
|
|
31219
|
-
/* @conditional-compile-remove(teams-identity-support) */
|
|
31220
|
-
kind: communicationCalling.CallKind.Call,
|
|
31221
|
-
callerInfo: { displayName: 'caller', identifier: { kind: 'communicationUser', communicationUserId: '1' } },
|
|
31222
|
-
direction: 'Incoming',
|
|
31223
|
-
transcription: { isTranscriptionActive: false },
|
|
31224
|
-
recording: { isRecordingActive: false },
|
|
31225
|
-
startTime: new Date(500000000000),
|
|
31226
|
-
endTime: new Date(500000000000),
|
|
31227
|
-
diagnostics: { network: { latest: {} }, media: { latest: {} } },
|
|
31228
|
-
state: 'Connected',
|
|
31229
|
-
localVideoStreams: [],
|
|
31230
|
-
isMuted: false,
|
|
31231
|
-
isScreenSharingOn: false,
|
|
31232
|
-
remoteParticipants: {},
|
|
31233
|
-
remoteParticipantsEnded: {},
|
|
31234
|
-
/* @conditional-compile-remove(raise-hand) */
|
|
31235
|
-
raiseHand: { raisedHands: [] },
|
|
31236
|
-
/* @conditional-compile-remove(rooms) */
|
|
31237
|
-
role,
|
|
31238
|
-
/* @conditional-compile-remove(close-captions) */
|
|
31239
|
-
captionsFeature: {
|
|
31240
|
-
captions: [],
|
|
31241
|
-
supportedSpokenLanguages: [],
|
|
31242
|
-
supportedCaptionLanguages: [],
|
|
31243
|
-
currentCaptionLanguage: '',
|
|
31244
|
-
currentSpokenLanguage: '',
|
|
31245
|
-
isCaptionsFeatureActive: false,
|
|
31246
|
-
startCaptionsInProgress: false
|
|
31247
|
-
},
|
|
31248
|
-
/* @conditional-compile-remove(call-transfer) */
|
|
31249
|
-
transfer: {
|
|
31250
|
-
acceptedTransfers: {}
|
|
31251
|
-
},
|
|
31252
|
-
/* @conditional-compile-remove(optimal-video-count) */
|
|
31253
|
-
optimalVideoCount: {
|
|
31254
|
-
maxRemoteVideoStreams: 4
|
|
31255
|
-
}
|
|
31256
|
-
},
|
|
31257
|
-
userId: { kind: 'communicationUser', communicationUserId: '1' },
|
|
31258
|
-
devices: {
|
|
31259
|
-
isSpeakerSelectionAvailable: true,
|
|
31260
|
-
selectedCamera: { id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' },
|
|
31261
|
-
cameras: [{ id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' }],
|
|
31262
|
-
selectedMicrophone: {
|
|
31263
|
-
id: 'microphone1',
|
|
31264
|
-
name: '1st Microphone',
|
|
31265
|
-
deviceType: 'Microphone',
|
|
31266
|
-
isSystemDefault: true
|
|
31267
|
-
},
|
|
31268
|
-
microphones: [{ id: 'microphone1', name: '1st Microphone', deviceType: 'Microphone', isSystemDefault: true }],
|
|
31269
|
-
selectedSpeaker: { id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true },
|
|
31270
|
-
speakers: [{ id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true }],
|
|
31271
|
-
unparentedViews: [],
|
|
31272
|
-
deviceAccess: { video: true, audio: true }
|
|
31273
|
-
},
|
|
31274
|
-
isTeamsCall: false,
|
|
31275
|
-
/* @conditional-compile-remove(rooms) */
|
|
31276
|
-
isRoomsCall: false,
|
|
31277
|
-
latestErrors: {}
|
|
31278
|
-
};
|
|
31279
|
-
};
|
|
31280
|
-
|
|
31281
31028
|
// Copyright (c) Microsoft Corporation.
|
|
31282
31029
|
/**
|
|
31283
31030
|
* @private
|
|
@@ -33361,7 +33108,6 @@ exports.UnsupportedOperatingSystem = UnsupportedOperatingSystem$k;
|
|
|
33361
33108
|
exports.VideoGallery = VideoGallery;
|
|
33362
33109
|
exports.VideoTile = VideoTile;
|
|
33363
33110
|
exports._IdentifierProvider = _IdentifierProvider;
|
|
33364
|
-
exports._MockCallAdapter = _MockCallAdapter;
|
|
33365
33111
|
exports.createAzureCommunicationCallAdapter = createAzureCommunicationCallAdapter;
|
|
33366
33112
|
exports.createAzureCommunicationCallAdapterFromClient = createAzureCommunicationCallAdapterFromClient;
|
|
33367
33113
|
exports.createAzureCommunicationCallWithChatAdapter = createAzureCommunicationCallWithChatAdapter;
|