@azure/communication-react 1.9.0-alpha-202310181643 → 1.9.0-alpha-202310201641
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 +261 -225
- package/dist/dist-cjs/communication-react/index.js +653 -390
- 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/react-components/src/components/Caption.js +1 -0
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +87 -87
- package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.d.ts +61 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.js +255 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +38 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +1 -80
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +84 -23
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +8 -5
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +90 -87
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +0 -79
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +1 -2
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +19 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -17
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +0 -35
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.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-202310201641';
|
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$N = (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$N(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$M = (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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
843
|
+
const onStopScreenShare = () => __awaiter$M(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
844
|
+
const onToggleScreenShare = () => __awaiter$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$M(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$L = (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$L(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$L(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$K = (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$K(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$K(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$J = (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$J(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$J(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$I = (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$I(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$H = (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$G = (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$H(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$H(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$H(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$G = (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$G(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$G(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$F = (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$F(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$F(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$F(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$F(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$F(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$F(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$F(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$F(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$F(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$F(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$F(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$F(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$E = (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$E(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$D = (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$D(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$C = (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$C(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$B = (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$B(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$B(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$B(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$B(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$B(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$A = (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$A(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$A(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$z = (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$z(void 0, void 0, void 0, function* () {
|
9722
9722
|
if (!props.downloadHandler) {
|
9723
9723
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
9724
9724
|
}
|
@@ -9806,7 +9806,7 @@ function createStyleFromV8Style(v8Style) {
|
|
9806
9806
|
|
9807
9807
|
// Copyright (c) Microsoft Corporation.
|
9808
9808
|
// Licensed under the MIT License.
|
9809
|
-
var __awaiter$
|
9809
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9810
9810
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9811
9811
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9812
9812
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9898,7 +9898,7 @@ const MessageBubble = (props) => {
|
|
9898
9898
|
return undefined;
|
9899
9899
|
}, [editedOn, message.messageType, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
9900
9900
|
/* @conditional-compile-remove(image-gallery) */
|
9901
|
-
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$
|
9901
|
+
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$y(void 0, void 0, void 0, function* () {
|
9902
9902
|
if (onInlineImageClicked === undefined) {
|
9903
9903
|
return;
|
9904
9904
|
}
|
@@ -10011,7 +10011,7 @@ const ChatMessageComponentAsMessageBubble = React__default["default"].memo(Messa
|
|
10011
10011
|
|
10012
10012
|
// Copyright (c) Microsoft Corporation.
|
10013
10013
|
// Licensed under the MIT License.
|
10014
|
-
var __awaiter$
|
10014
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10015
10015
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10016
10016
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10017
10017
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10044,7 +10044,7 @@ const ChatMessageComponent = (props) => {
|
|
10044
10044
|
onSendMessage && onSendMessage(content !== undefined ? content : '');
|
10045
10045
|
}, [clientMessageId, content, onSendMessage, onDeleteMessage]);
|
10046
10046
|
if (isEditing && message.messageType === 'chat') {
|
10047
|
-
return (React__default["default"].createElement(ChatMessageComponentAsEditBox, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
10047
|
+
return (React__default["default"].createElement(ChatMessageComponentAsEditBox, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$x(void 0, void 0, void 0, function* () {
|
10048
10048
|
props.onUpdateMessage &&
|
10049
10049
|
message.messageId &&
|
10050
10050
|
(yield props.onUpdateMessage(message.messageId, text, metadata, options));
|
@@ -10585,7 +10585,7 @@ const LiveAnnouncer = (props) => {
|
|
10585
10585
|
|
10586
10586
|
// Copyright (c) Microsoft Corporation.
|
10587
10587
|
// Licensed under the MIT License.
|
10588
|
-
var __awaiter$
|
10588
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10589
10589
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10590
10590
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10591
10591
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10839,7 +10839,7 @@ const MessageThreadWrapper = (props) => {
|
|
10839
10839
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10840
10840
|
const [inlineAttachments, setInlineAttachments] = React.useState({});
|
10841
10841
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10842
|
-
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$
|
10842
|
+
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$w(void 0, void 0, void 0, function* () {
|
10843
10843
|
if (!onFetchAttachments || attachment.attachmentType !== 'inlineImage' || attachment.id in inlineAttachments) {
|
10844
10844
|
return;
|
10845
10845
|
}
|
@@ -10894,7 +10894,7 @@ const MessageThreadWrapper = (props) => {
|
|
10894
10894
|
*/
|
10895
10895
|
const clientHeight = (_a = chatThreadRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
10896
10896
|
// we try to only send those message status if user is scrolled to the bottom.
|
10897
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
10897
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$w(void 0, void 0, void 0, function* () {
|
10898
10898
|
if (!isAtBottomOfScrollRef.current ||
|
10899
10899
|
!document.hasFocus() ||
|
10900
10900
|
!messagesRef.current ||
|
@@ -10945,7 +10945,7 @@ const MessageThreadWrapper = (props) => {
|
|
10945
10945
|
setIsAtBottomOfScrollRef(atBottom);
|
10946
10946
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
10947
10947
|
// Infinite scrolling + threadInitialize function
|
10948
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
10948
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$w(void 0, void 0, void 0, function* () {
|
10949
10949
|
if (!isLoadingChatMessagesRef.current) {
|
10950
10950
|
if (onLoadPreviousChatMessages) {
|
10951
10951
|
isLoadingChatMessagesRef.current = true;
|
@@ -15980,7 +15980,7 @@ const DevicesButton = (props) => {
|
|
15980
15980
|
|
15981
15981
|
// Copyright (c) Microsoft Corporation.
|
15982
15982
|
// Licensed under the MIT License.
|
15983
|
-
var __awaiter$
|
15983
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15984
15984
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15985
15985
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15986
15986
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16018,7 +16018,7 @@ const CameraButton = (props) => {
|
|
16018
16018
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
16019
16019
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
16020
16020
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
16021
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
16021
|
+
const onToggleClick = React.useCallback(() => __awaiter$v(void 0, void 0, void 0, function* () {
|
16022
16022
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
16023
16023
|
if (onToggleCamera) {
|
16024
16024
|
setWaitForCamera(true);
|
@@ -16186,7 +16186,7 @@ const lightThemeCallButtonStyles = {
|
|
16186
16186
|
|
16187
16187
|
// Copyright (c) Microsoft Corporation.
|
16188
16188
|
// Licensed under the MIT License.
|
16189
|
-
var __awaiter$
|
16189
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16190
16190
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16191
16191
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16192
16192
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16227,7 +16227,7 @@ const MicrophoneButton = (props) => {
|
|
16227
16227
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
16228
16228
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
16229
16229
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
16230
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
16230
|
+
const onToggleClick = React.useCallback(() => __awaiter$u(void 0, void 0, void 0, function* () {
|
16231
16231
|
if (onToggleMicrophone) {
|
16232
16232
|
try {
|
16233
16233
|
yield onToggleMicrophone();
|
@@ -17157,7 +17157,7 @@ const formatPhoneNumber = (phoneNumber) => {
|
|
17157
17157
|
|
17158
17158
|
// Copyright (c) Microsoft Corporation.
|
17159
17159
|
// Licensed under the MIT License.
|
17160
|
-
var __awaiter$
|
17160
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17161
17161
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17162
17162
|
return new (P || (P = Promise))(function (resolve, reject) {
|
17163
17163
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -17199,10 +17199,10 @@ const DialpadButton = (props) => {
|
|
17199
17199
|
const theme = react.useTheme();
|
17200
17200
|
const { digit, index, onClick, onLongPress, isMobile = false } = props;
|
17201
17201
|
const useLongPressProps = React__default["default"].useMemo(() => ({
|
17202
|
-
onClick: () => __awaiter$
|
17202
|
+
onClick: () => __awaiter$t(void 0, void 0, void 0, function* () {
|
17203
17203
|
onClick(digit, index);
|
17204
17204
|
}),
|
17205
|
-
onLongPress: () => __awaiter$
|
17205
|
+
onLongPress: () => __awaiter$t(void 0, void 0, void 0, function* () {
|
17206
17206
|
onLongPress(digit, index);
|
17207
17207
|
}),
|
17208
17208
|
touchEventsOnly: isMobile
|
@@ -17836,6 +17836,7 @@ const _Caption = (props) => {
|
|
17836
17836
|
size: react.PersonaSize.size32,
|
17837
17837
|
text: displayName,
|
17838
17838
|
showOverflowTooltip: false,
|
17839
|
+
imageShouldStartVisible: true,
|
17839
17840
|
initialsTextColor: 'white',
|
17840
17841
|
styles: {
|
17841
17842
|
root: {
|
@@ -18042,7 +18043,7 @@ const _spokenLanguageToCaptionLanguage = {
|
|
18042
18043
|
|
18043
18044
|
// Copyright (c) Microsoft Corporation.
|
18044
18045
|
// Licensed under the MIT License.
|
18045
|
-
var __awaiter$
|
18046
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18046
18047
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18047
18048
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18048
18049
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18085,7 +18086,7 @@ const _CaptionsSettingsModal = (props) => {
|
|
18085
18086
|
onDismissCaptionsSettings();
|
18086
18087
|
}
|
18087
18088
|
}, [onDismissCaptionsSettings]);
|
18088
|
-
const onConfirm = React.useCallback(() => __awaiter$
|
18089
|
+
const onConfirm = React.useCallback(() => __awaiter$s(void 0, void 0, void 0, function* () {
|
18089
18090
|
const spokenLanguageCode = selectedSpokenLanguage.key.toString();
|
18090
18091
|
const captionLanguageCode = selectedCaptionLanguage.key.toString();
|
18091
18092
|
if (isCaptionsFeatureActive) {
|
@@ -19015,7 +19016,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
19015
19016
|
|
19016
19017
|
// Copyright (c) Microsoft Corporation.
|
19017
19018
|
// Licensed under the MIT License.
|
19018
|
-
var __awaiter$
|
19019
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
19019
19020
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
19020
19021
|
return new (P || (P = Promise))(function (resolve, reject) {
|
19021
19022
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -19038,35 +19039,35 @@ const createDefaultChatHandlers = memoizeOne__default["default"]((chatClient, ch
|
|
19038
19039
|
let messageIterator = undefined;
|
19039
19040
|
let readReceiptIterator = undefined;
|
19040
19041
|
return {
|
19041
|
-
onSendMessage: (content, options) => __awaiter$
|
19042
|
+
onSendMessage: (content, options) => __awaiter$r(void 0, void 0, void 0, function* () {
|
19042
19043
|
const sendMessageRequest = {
|
19043
19044
|
content,
|
19044
19045
|
senderDisplayName: chatClient.getState().displayName
|
19045
19046
|
};
|
19046
19047
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
19047
19048
|
}),
|
19048
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
19049
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$r(void 0, void 0, void 0, function* () {
|
19049
19050
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
19050
19051
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
19051
19052
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
19052
19053
|
}),
|
19053
|
-
onDeleteMessage: (messageId) => __awaiter$
|
19054
|
+
onDeleteMessage: (messageId) => __awaiter$r(void 0, void 0, void 0, function* () {
|
19054
19055
|
yield chatThreadClient.deleteMessage(messageId);
|
19055
19056
|
}),
|
19056
19057
|
// This handler is designed for chatThread to consume
|
19057
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
19058
|
+
onMessageSeen: (chatMessageId) => __awaiter$r(void 0, void 0, void 0, function* () {
|
19058
19059
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
19059
19060
|
}),
|
19060
|
-
onTyping: () => __awaiter$
|
19061
|
+
onTyping: () => __awaiter$r(void 0, void 0, void 0, function* () {
|
19061
19062
|
yield chatThreadClient.sendTypingNotification();
|
19062
19063
|
}),
|
19063
|
-
onRemoveParticipant: (userId) => __awaiter$
|
19064
|
+
onRemoveParticipant: (userId) => __awaiter$r(void 0, void 0, void 0, function* () {
|
19064
19065
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
19065
19066
|
}),
|
19066
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
19067
|
+
updateThreadTopicName: (topicName) => __awaiter$r(void 0, void 0, void 0, function* () {
|
19067
19068
|
yield chatThreadClient.updateTopic(topicName);
|
19068
19069
|
}),
|
19069
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
19070
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$r(void 0, void 0, void 0, function* () {
|
19070
19071
|
var _a, _b, _c;
|
19071
19072
|
if (messageIterator === undefined) {
|
19072
19073
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -19933,7 +19934,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
19933
19934
|
|
19934
19935
|
// Copyright (c) Microsoft Corporation.
|
19935
19936
|
// Licensed under the MIT License.
|
19936
|
-
var __awaiter$
|
19937
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
19937
19938
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
19938
19939
|
return new (P || (P = Promise))(function (resolve, reject) {
|
19939
19940
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20208,7 +20209,7 @@ class ChatContext$1 {
|
|
20208
20209
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
20209
20210
|
*/
|
20210
20211
|
withAsyncErrorTeedToState(f, target) {
|
20211
|
-
return (...args) => __awaiter$
|
20212
|
+
return (...args) => __awaiter$q(this, void 0, void 0, function* () {
|
20212
20213
|
try {
|
20213
20214
|
return yield f(...args);
|
20214
20215
|
}
|
@@ -20320,7 +20321,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
20320
20321
|
|
20321
20322
|
// Copyright (c) Microsoft Corporation.
|
20322
20323
|
// Licensed under the MIT License.
|
20323
|
-
var __awaiter$
|
20324
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20324
20325
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20325
20326
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20326
20327
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20409,7 +20410,7 @@ class EventSubscriber {
|
|
20409
20410
|
};
|
20410
20411
|
// This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
|
20411
20412
|
// Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
|
20412
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
20413
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$p(this, void 0, void 0, function* () {
|
20413
20414
|
var e_1, _a;
|
20414
20415
|
try {
|
20415
20416
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -20501,7 +20502,7 @@ class EventSubscriber {
|
|
20501
20502
|
|
20502
20503
|
// Copyright (c) Microsoft Corporation.
|
20503
20504
|
// Licensed under the MIT License.
|
20504
|
-
var __awaiter$
|
20505
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20505
20506
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20506
20507
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20507
20508
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20523,7 +20524,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
20523
20524
|
const threadsIterator = iteratorCreator(...args);
|
20524
20525
|
return {
|
20525
20526
|
next() {
|
20526
|
-
return __awaiter$
|
20527
|
+
return __awaiter$o(this, void 0, void 0, function* () {
|
20527
20528
|
const result = yield threadsIterator.next();
|
20528
20529
|
if (!result.done && result.value) {
|
20529
20530
|
decorateFn(result.value, context);
|
@@ -20538,7 +20539,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
20538
20539
|
const pages = threadsIterator.byPage(settings);
|
20539
20540
|
return {
|
20540
20541
|
next() {
|
20541
|
-
return __awaiter$
|
20542
|
+
return __awaiter$o(this, void 0, void 0, function* () {
|
20542
20543
|
const result = yield pages.next();
|
20543
20544
|
const page = result.value;
|
20544
20545
|
if (!result.done && result.value) {
|
@@ -20622,7 +20623,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
20622
20623
|
|
20623
20624
|
// Copyright (c) Microsoft Corporation.
|
20624
20625
|
// Licensed under the MIT License.
|
20625
|
-
var __awaiter$
|
20626
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20626
20627
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20627
20628
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20628
20629
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20641,14 +20642,14 @@ class ProxyChatThreadClient {
|
|
20641
20642
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
20642
20643
|
}
|
20643
20644
|
case 'getMessage': {
|
20644
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
20645
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$n(this, void 0, void 0, function* () {
|
20645
20646
|
const message = yield chatThreadClient.getMessage(...args);
|
20646
20647
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
20647
20648
|
return message;
|
20648
20649
|
}), 'ChatThreadClient.getMessage');
|
20649
20650
|
}
|
20650
20651
|
case 'sendMessage': {
|
20651
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
20652
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$n(this, void 0, void 0, function* () {
|
20652
20653
|
var _a;
|
20653
20654
|
// Retry logic?
|
20654
20655
|
const [request, options] = args;
|
@@ -20689,7 +20690,7 @@ class ProxyChatThreadClient {
|
|
20689
20690
|
}), 'ChatThreadClient.sendMessage');
|
20690
20691
|
}
|
20691
20692
|
case 'addParticipants': {
|
20692
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
20693
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$n(this, void 0, void 0, function* () {
|
20693
20694
|
const result = yield chatThreadClient.addParticipants(...args);
|
20694
20695
|
const [addRequest] = args;
|
20695
20696
|
const participantsToAdd = addRequest.participants;
|
@@ -20698,7 +20699,7 @@ class ProxyChatThreadClient {
|
|
20698
20699
|
}), 'ChatThreadClient.addParticipants');
|
20699
20700
|
}
|
20700
20701
|
case 'deleteMessage': {
|
20701
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
20702
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$n(this, void 0, void 0, function* () {
|
20702
20703
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
20703
20704
|
const [messageId] = args;
|
20704
20705
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -20716,12 +20717,12 @@ class ProxyChatThreadClient {
|
|
20716
20717
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
20717
20718
|
}
|
20718
20719
|
case 'sendTypingNotification': {
|
20719
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
20720
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$n(this, void 0, void 0, function* () {
|
20720
20721
|
return yield chatThreadClient.sendTypingNotification(...args);
|
20721
20722
|
}), 'ChatThreadClient.sendTypingNotification');
|
20722
20723
|
}
|
20723
20724
|
case 'removeParticipant': {
|
20724
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
20725
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$n(this, void 0, void 0, function* () {
|
20725
20726
|
const result = yield chatThreadClient.removeParticipant(...args);
|
20726
20727
|
const [removeIdentifier] = args;
|
20727
20728
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -20729,7 +20730,7 @@ class ProxyChatThreadClient {
|
|
20729
20730
|
}), 'ChatThreadClient.removeParticipant');
|
20730
20731
|
}
|
20731
20732
|
case 'updateMessage': {
|
20732
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
20733
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$n(this, void 0, void 0, function* () {
|
20733
20734
|
const result = yield chatThreadClient.updateMessage(...args);
|
20734
20735
|
const [messageId, updateOption] = args;
|
20735
20736
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -20737,7 +20738,7 @@ class ProxyChatThreadClient {
|
|
20737
20738
|
}), 'ChatThreadClient.updateMessage');
|
20738
20739
|
}
|
20739
20740
|
case 'updateTopic': {
|
20740
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
20741
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$n(this, void 0, void 0, function* () {
|
20741
20742
|
const result = yield chatThreadClient.updateTopic(...args);
|
20742
20743
|
const [topic] = args;
|
20743
20744
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -20745,7 +20746,7 @@ class ProxyChatThreadClient {
|
|
20745
20746
|
}), 'ChatThreadClient.updateTopic');
|
20746
20747
|
}
|
20747
20748
|
case 'getProperties': {
|
20748
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
20749
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$n(this, void 0, void 0, function* () {
|
20749
20750
|
const result = yield chatThreadClient.getProperties(...args);
|
20750
20751
|
this._context.updateThread(chatThreadClient.threadId, result);
|
20751
20752
|
return result;
|
@@ -20782,7 +20783,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
20782
20783
|
|
20783
20784
|
// Copyright (c) Microsoft Corporation.
|
20784
20785
|
// Licensed under the MIT License.
|
20785
|
-
var __awaiter$
|
20786
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20786
20787
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20787
20788
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20788
20789
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20801,7 +20802,7 @@ const proxyChatClient = {
|
|
20801
20802
|
switch (prop) {
|
20802
20803
|
case 'createChatThread': {
|
20803
20804
|
return context.withAsyncErrorTeedToState(function (...args) {
|
20804
|
-
return __awaiter$
|
20805
|
+
return __awaiter$m(this, void 0, void 0, function* () {
|
20805
20806
|
const result = yield chatClient.createChatThread(...args);
|
20806
20807
|
const thread = result.chatThread;
|
20807
20808
|
if (thread) {
|
@@ -20814,7 +20815,7 @@ const proxyChatClient = {
|
|
20814
20815
|
}
|
20815
20816
|
case 'deleteChatThread': {
|
20816
20817
|
return context.withAsyncErrorTeedToState(function (...args) {
|
20817
|
-
return __awaiter$
|
20818
|
+
return __awaiter$m(this, void 0, void 0, function* () {
|
20818
20819
|
const result = yield chatClient.deleteChatThread(...args);
|
20819
20820
|
context.deleteThread(args[0]);
|
20820
20821
|
return result;
|
@@ -20834,7 +20835,7 @@ const proxyChatClient = {
|
|
20834
20835
|
}
|
20835
20836
|
case 'startRealtimeNotifications': {
|
20836
20837
|
return context.withAsyncErrorTeedToState(function (...args) {
|
20837
|
-
return __awaiter$
|
20838
|
+
return __awaiter$m(this, void 0, void 0, function* () {
|
20838
20839
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
20839
20840
|
if (!receiver.eventSubscriber) {
|
20840
20841
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -20845,7 +20846,7 @@ const proxyChatClient = {
|
|
20845
20846
|
}
|
20846
20847
|
case 'stopRealtimeNotifications': {
|
20847
20848
|
return context.withAsyncErrorTeedToState(function (...args) {
|
20848
|
-
return __awaiter$
|
20849
|
+
return __awaiter$m(this, void 0, void 0, function* () {
|
20849
20850
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
20850
20851
|
if (receiver.eventSubscriber) {
|
20851
20852
|
receiver.eventSubscriber.unsubscribe();
|
@@ -21017,7 +21018,9 @@ const COMPOSITE_ONLY_ICONS = {
|
|
21017
21018
|
/* @conditional-compile-remove(gallery-layouts) */
|
21018
21019
|
FocusedContentGalleryLayout: React__default["default"].createElement(reactIcons.ContentView20Regular, null),
|
21019
21020
|
/* @conditional-compile-remove(gallery-layouts) */
|
21020
|
-
LargeGalleryLayout: React__default["default"].createElement(reactIcons.Table20Regular, null)
|
21021
|
+
LargeGalleryLayout: React__default["default"].createElement(reactIcons.Table20Regular, null),
|
21022
|
+
/* @conditional-compile-remove(control-bar-button-injection) */
|
21023
|
+
DefaultCustomButton: React__default["default"].createElement(reactIcons.Circle20Regular, null)
|
21021
21024
|
};
|
21022
21025
|
/**
|
21023
21026
|
* The default set of icons that are available to used in the Composites.
|
@@ -21302,7 +21305,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
|
|
21302
21305
|
|
21303
21306
|
// Copyright (c) Microsoft Corporation.
|
21304
21307
|
// Licensed under the MIT License.
|
21305
|
-
var __awaiter$
|
21308
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21306
21309
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21307
21310
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21308
21311
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21437,9 +21440,9 @@ class AzureCommunicationChatAdapter {
|
|
21437
21440
|
this.unsubscribeAllEvents();
|
21438
21441
|
}
|
21439
21442
|
fetchInitialData() {
|
21440
|
-
return __awaiter$
|
21443
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21441
21444
|
// If get properties fails we dont want to try to get the participants after.
|
21442
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
21445
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
21443
21446
|
var e_1, _a;
|
21444
21447
|
yield this.chatThreadClient.getProperties();
|
21445
21448
|
try {
|
@@ -21473,8 +21476,8 @@ class AzureCommunicationChatAdapter {
|
|
21473
21476
|
this.context.offStateChange(handler);
|
21474
21477
|
}
|
21475
21478
|
sendMessage(content, options = {}) {
|
21476
|
-
return __awaiter$
|
21477
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
21479
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21480
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
21478
21481
|
/* @conditional-compile-remove(file-sharing) */
|
21479
21482
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
21480
21483
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -21491,51 +21494,51 @@ class AzureCommunicationChatAdapter {
|
|
21491
21494
|
});
|
21492
21495
|
}
|
21493
21496
|
sendReadReceipt(chatMessageId) {
|
21494
|
-
return __awaiter$
|
21495
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
21497
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21498
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
21496
21499
|
yield this.handlers.onMessageSeen(chatMessageId);
|
21497
21500
|
}));
|
21498
21501
|
});
|
21499
21502
|
}
|
21500
21503
|
sendTypingIndicator() {
|
21501
|
-
return __awaiter$
|
21502
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
21504
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21505
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
21503
21506
|
yield this.handlers.onTyping();
|
21504
21507
|
}));
|
21505
21508
|
});
|
21506
21509
|
}
|
21507
21510
|
removeParticipant(userId) {
|
21508
|
-
return __awaiter$
|
21509
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
21511
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21512
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
21510
21513
|
yield this.handlers.onRemoveParticipant(userId);
|
21511
21514
|
}));
|
21512
21515
|
});
|
21513
21516
|
}
|
21514
21517
|
setTopic(topicName) {
|
21515
|
-
return __awaiter$
|
21516
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
21518
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21519
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
21517
21520
|
yield this.handlers.updateThreadTopicName(topicName);
|
21518
21521
|
}));
|
21519
21522
|
});
|
21520
21523
|
}
|
21521
21524
|
loadPreviousChatMessages(messagesToLoad) {
|
21522
|
-
return __awaiter$
|
21523
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
21525
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21526
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
21524
21527
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
21525
21528
|
}));
|
21526
21529
|
});
|
21527
21530
|
}
|
21528
21531
|
updateMessage(messageId, content, metadata, options) {
|
21529
|
-
return __awaiter$
|
21530
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
21532
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21533
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
21531
21534
|
/* @conditional-compile-remove(file-sharing) */
|
21532
21535
|
return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
|
21533
21536
|
}));
|
21534
21537
|
});
|
21535
21538
|
}
|
21536
21539
|
deleteMessage(messageId) {
|
21537
|
-
return __awaiter$
|
21538
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
21540
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21541
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
21539
21542
|
return yield this.handlers.onDeleteMessage(messageId);
|
21540
21543
|
}));
|
21541
21544
|
});
|
@@ -21570,8 +21573,8 @@ class AzureCommunicationChatAdapter {
|
|
21570
21573
|
}
|
21571
21574
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21572
21575
|
downloadAttachments(options) {
|
21573
|
-
return __awaiter$
|
21574
|
-
return this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
21576
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21577
|
+
return this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
21575
21578
|
if (this.credential === undefined) {
|
21576
21579
|
const e = new Error();
|
21577
21580
|
e['target'] = 'ChatThreadClient.getMessage';
|
@@ -21591,9 +21594,9 @@ class AzureCommunicationChatAdapter {
|
|
21591
21594
|
}
|
21592
21595
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21593
21596
|
downloadAuthenticatedFile(accessToken, options) {
|
21594
|
-
return __awaiter$
|
21597
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21595
21598
|
function fetchWithAuthentication(url, token) {
|
21596
|
-
return __awaiter$
|
21599
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21597
21600
|
const headers = new Headers();
|
21598
21601
|
headers.append('Authorization', `Bearer ${token}`);
|
21599
21602
|
try {
|
@@ -21665,7 +21668,7 @@ class AzureCommunicationChatAdapter {
|
|
21665
21668
|
this.emitter.off(event, listener);
|
21666
21669
|
}
|
21667
21670
|
asyncTeeErrorToEventEmitter(f) {
|
21668
|
-
return __awaiter$
|
21671
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21669
21672
|
try {
|
21670
21673
|
return yield f();
|
21671
21674
|
}
|
@@ -21707,7 +21710,7 @@ const convertEventType = (type) => {
|
|
21707
21710
|
*
|
21708
21711
|
* @public
|
21709
21712
|
*/
|
21710
|
-
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$
|
21713
|
+
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$l(void 0, void 0, void 0, function* () {
|
21711
21714
|
if (!_isValidIdentifier(userId)) {
|
21712
21715
|
throw new Error('Provided userId is invalid. Please provide valid identifier object.');
|
21713
21716
|
}
|
@@ -21776,7 +21779,7 @@ beforeDispose) => {
|
|
21776
21779
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
21777
21780
|
return;
|
21778
21781
|
}
|
21779
|
-
(() => __awaiter$
|
21782
|
+
(() => __awaiter$l(void 0, void 0, void 0, function* () {
|
21780
21783
|
if (adapterRef.current) {
|
21781
21784
|
// Dispose the old adapter when a new one is created.
|
21782
21785
|
//
|
@@ -21808,7 +21811,7 @@ beforeDispose) => {
|
|
21808
21811
|
// Dispose any existing adapter when the component unmounts.
|
21809
21812
|
React.useEffect(() => {
|
21810
21813
|
return () => {
|
21811
|
-
(() => __awaiter$
|
21814
|
+
(() => __awaiter$l(void 0, void 0, void 0, function* () {
|
21812
21815
|
if (adapterRef.current) {
|
21813
21816
|
if (beforeDisposeRef.current) {
|
21814
21817
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -21832,7 +21835,7 @@ beforeDispose) => {
|
|
21832
21835
|
function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
21833
21836
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21834
21837
|
options) {
|
21835
|
-
return __awaiter$
|
21838
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
21836
21839
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient,
|
21837
21840
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ options);
|
21838
21841
|
});
|
@@ -22045,7 +22048,7 @@ const sendboxContainerStyles = {
|
|
22045
22048
|
|
22046
22049
|
// Copyright (c) Microsoft Corporation.
|
22047
22050
|
// Licensed under the MIT License.
|
22048
|
-
var __awaiter$
|
22051
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
22049
22052
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
22050
22053
|
return new (P || (P = Promise))(function (resolve, reject) {
|
22051
22054
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -22066,7 +22069,7 @@ const AvatarPersona = (props) => {
|
|
22066
22069
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
22067
22070
|
const [data, setData] = React.useState();
|
22068
22071
|
React.useEffect(() => {
|
22069
|
-
(() => __awaiter$
|
22072
|
+
(() => __awaiter$k(void 0, void 0, void 0, function* () {
|
22070
22073
|
if (dataProvider && userId) {
|
22071
22074
|
const newData = yield dataProvider(userId);
|
22072
22075
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
@@ -22443,7 +22446,7 @@ const FileDownloadErrorBar = (props) => {
|
|
22443
22446
|
|
22444
22447
|
// Copyright (c) Microsoft Corporation.
|
22445
22448
|
// Licensed under the MIT License.
|
22446
|
-
var __awaiter$
|
22449
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
22447
22450
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
22448
22451
|
return new (P || (P = Promise))(function (resolve, reject) {
|
22449
22452
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -22470,7 +22473,7 @@ const ChatScreen = (props) => {
|
|
22470
22473
|
const theme = useTheme();
|
22471
22474
|
React.useEffect(() => {
|
22472
22475
|
// Initial data should be always fetched by the composite(or external caller) instead of the adapter
|
22473
|
-
const fetchData = () => __awaiter$
|
22476
|
+
const fetchData = () => __awaiter$j(void 0, void 0, void 0, function* () {
|
22474
22477
|
// Fetch initial data for adapter
|
22475
22478
|
yield adapter.fetchInitialData();
|
22476
22479
|
// Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.
|
@@ -22504,7 +22507,7 @@ const ChatScreen = (props) => {
|
|
22504
22507
|
setDownloadErrorMessage(errorMessage);
|
22505
22508
|
} })), [fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler]);
|
22506
22509
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
22507
|
-
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$
|
22510
|
+
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$j(void 0, void 0, void 0, function* () {
|
22508
22511
|
if (attachment.attachmentType === 'inlineImage' && attachment.previewUrl) {
|
22509
22512
|
const blob = yield adapter.downloadAttachments({ attachmentUrls: [attachment.previewUrl] });
|
22510
22513
|
return blob;
|
@@ -22512,7 +22515,7 @@ const ChatScreen = (props) => {
|
|
22512
22515
|
return [{ blobUrl: '' }];
|
22513
22516
|
}), [adapter]);
|
22514
22517
|
/* @conditional-compile-remove(image-gallery) */
|
22515
|
-
const onInlineImageClicked = React.useCallback((attachmentId, messageId) => __awaiter$
|
22518
|
+
const onInlineImageClicked = React.useCallback((attachmentId, messageId) => __awaiter$j(void 0, void 0, void 0, function* () {
|
22516
22519
|
var _a, _b;
|
22517
22520
|
const messages = (_a = messageThreadProps.messages) === null || _a === void 0 ? void 0 : _a.filter((message) => {
|
22518
22521
|
return message.messageId === messageId;
|
@@ -22817,7 +22820,7 @@ const END_CALL_PAGES = [
|
|
22817
22820
|
|
22818
22821
|
// Copyright (c) Microsoft Corporation.
|
22819
22822
|
// Licensed under the MIT License.
|
22820
|
-
var __awaiter$
|
22823
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
22821
22824
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
22822
22825
|
return new (P || (P = Promise))(function (resolve, reject) {
|
22823
22826
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -23047,7 +23050,7 @@ const isDisabled$3 = (option) => {
|
|
23047
23050
|
/**
|
23048
23051
|
* @returns Permissions state for the camera.
|
23049
23052
|
*/
|
23050
|
-
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$
|
23053
|
+
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$i(void 0, void 0, void 0, function* () {
|
23051
23054
|
try {
|
23052
23055
|
return (yield navigator.permissions.query({ name: 'camera' })).state;
|
23053
23056
|
}
|
@@ -23060,7 +23063,7 @@ const queryCameraPermissionFromPermissionsAPI = () => __awaiter$h(void 0, void 0
|
|
23060
23063
|
/**
|
23061
23064
|
* @returns Permissions state for the microphone.
|
23062
23065
|
*/
|
23063
|
-
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$
|
23066
|
+
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$i(void 0, void 0, void 0, function* () {
|
23064
23067
|
try {
|
23065
23068
|
return (yield navigator.permissions.query({ name: 'microphone' })).state;
|
23066
23069
|
}
|
@@ -23077,7 +23080,7 @@ const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$h(void 0, vo
|
|
23077
23080
|
* If permission API is not supported on this browser, permission state is set to unsupported.
|
23078
23081
|
* @private
|
23079
23082
|
*/
|
23080
|
-
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$
|
23083
|
+
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$i(void 0, void 0, void 0, function* () {
|
23081
23084
|
const [cameraResult, microphoneResult] = yield Promise.all([
|
23082
23085
|
queryCameraPermissionFromPermissionsAPI(),
|
23083
23086
|
queryMicrophonePermissionFromPermissionsAPI()
|
@@ -23155,7 +23158,7 @@ const getSelectedCameraFromAdapterState = (state) => state.devices.selectedCamer
|
|
23155
23158
|
|
23156
23159
|
// Copyright (c) Microsoft Corporation.
|
23157
23160
|
// Licensed under the MIT License.
|
23158
|
-
var __awaiter$
|
23161
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
23159
23162
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23160
23163
|
return new (P || (P = Promise))(function (resolve, reject) {
|
23161
23164
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -23174,127 +23177,127 @@ _component) => {
|
|
23174
23177
|
return createCompositeHandlers(useAdapter());
|
23175
23178
|
};
|
23176
23179
|
const createCompositeHandlers = memoizeOne__default["default"]((adapter) => ({
|
23177
|
-
onCreateLocalStreamView: (options) => __awaiter$
|
23180
|
+
onCreateLocalStreamView: (options) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23178
23181
|
return yield adapter.createStreamView(undefined, options);
|
23179
23182
|
}),
|
23180
|
-
onCreateRemoteStreamView: (userId, options) => __awaiter$
|
23183
|
+
onCreateRemoteStreamView: (userId, options) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23181
23184
|
return yield adapter.createStreamView(userId, options);
|
23182
23185
|
}),
|
23183
|
-
onHangUp: (forEveryone) => __awaiter$
|
23186
|
+
onHangUp: (forEveryone) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23184
23187
|
yield adapter.leaveCall(forEveryone);
|
23185
23188
|
}),
|
23186
23189
|
/* @conditional-compile-remove(PSTN-calls) */
|
23187
|
-
onToggleHold: () => __awaiter$
|
23190
|
+
onToggleHold: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23188
23191
|
var _a;
|
23189
23192
|
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
|
23190
23193
|
}),
|
23191
23194
|
/* @conditional-compile-remove(PSTN-calls) */
|
23192
|
-
onAddParticipant: (participant, options) => __awaiter$
|
23195
|
+
onAddParticipant: (participant, options) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23193
23196
|
return yield adapter.addParticipant(participant, options);
|
23194
23197
|
}),
|
23195
23198
|
/* @conditional-compile-remove(PSTN-calls) */
|
23196
|
-
onSendDtmfTone: (dtmfTone) => __awaiter$
|
23199
|
+
onSendDtmfTone: (dtmfTone) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23197
23200
|
yield adapter.sendDtmfTone(dtmfTone);
|
23198
23201
|
}),
|
23199
|
-
onRemoveParticipant: (userId) => __awaiter$
|
23202
|
+
onRemoveParticipant: (userId) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23200
23203
|
yield adapter.removeParticipant(userId);
|
23201
23204
|
}),
|
23202
23205
|
/* @conditional-compile-remove(raise-hand) */
|
23203
|
-
onRaiseHand: () => __awaiter$
|
23206
|
+
onRaiseHand: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23204
23207
|
yield adapter.raiseHand();
|
23205
23208
|
}),
|
23206
23209
|
/* @conditional-compile-remove(raise-hand) */
|
23207
|
-
onLowerHand: () => __awaiter$
|
23210
|
+
onLowerHand: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23208
23211
|
yield adapter.lowerHand();
|
23209
23212
|
}),
|
23210
23213
|
/* @conditional-compile-remove(raise-hand) */
|
23211
|
-
onToggleRaiseHand: () => __awaiter$
|
23214
|
+
onToggleRaiseHand: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23212
23215
|
var _b;
|
23213
23216
|
((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.raiseHand.localParticipantRaisedHand)
|
23214
23217
|
? yield adapter.lowerHand()
|
23215
23218
|
: yield adapter.raiseHand();
|
23216
23219
|
}),
|
23217
|
-
onSelectCamera: (deviceInfo, options) => __awaiter$
|
23220
|
+
onSelectCamera: (deviceInfo, options) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23218
23221
|
yield adapter.setCamera(deviceInfo, options);
|
23219
23222
|
}),
|
23220
|
-
onSelectMicrophone: (deviceInfo) => __awaiter$
|
23223
|
+
onSelectMicrophone: (deviceInfo) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23221
23224
|
yield adapter.setMicrophone(deviceInfo);
|
23222
23225
|
}),
|
23223
|
-
onSelectSpeaker: (deviceInfo) => __awaiter$
|
23226
|
+
onSelectSpeaker: (deviceInfo) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23224
23227
|
yield adapter.setSpeaker(deviceInfo);
|
23225
23228
|
}),
|
23226
23229
|
onStartCall: (participants, options) => {
|
23227
23230
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
23228
23231
|
return adapter.startCall(rawIds, options);
|
23229
23232
|
},
|
23230
|
-
onStartScreenShare: () => __awaiter$
|
23233
|
+
onStartScreenShare: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23231
23234
|
yield adapter.startScreenShare();
|
23232
23235
|
}),
|
23233
|
-
onStopScreenShare: () => __awaiter$
|
23236
|
+
onStopScreenShare: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23234
23237
|
yield adapter.stopScreenShare();
|
23235
23238
|
}),
|
23236
|
-
onToggleCamera: (options) => __awaiter$
|
23239
|
+
onToggleCamera: (options) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23237
23240
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
23238
23241
|
}),
|
23239
|
-
onToggleMicrophone: () => __awaiter$
|
23242
|
+
onToggleMicrophone: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23240
23243
|
var _c;
|
23241
23244
|
return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
23242
23245
|
}),
|
23243
|
-
onToggleScreenShare: () => __awaiter$
|
23246
|
+
onToggleScreenShare: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23244
23247
|
var _d;
|
23245
23248
|
return ((_d = adapter.getState().call) === null || _d === void 0 ? void 0 : _d.isScreenSharingOn)
|
23246
23249
|
? yield adapter.stopScreenShare()
|
23247
23250
|
: yield adapter.startScreenShare();
|
23248
23251
|
}),
|
23249
|
-
onStartLocalVideo: () => __awaiter$
|
23252
|
+
onStartLocalVideo: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23250
23253
|
if (adapter.getState().call) {
|
23251
23254
|
return adapter.startCamera();
|
23252
23255
|
}
|
23253
23256
|
}),
|
23254
|
-
onDisposeLocalStreamView: () => __awaiter$
|
23257
|
+
onDisposeLocalStreamView: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23255
23258
|
return adapter.disposeLocalVideoStreamView();
|
23256
23259
|
}),
|
23257
|
-
onDisposeRemoteStreamView: (userId) => __awaiter$
|
23260
|
+
onDisposeRemoteStreamView: (userId) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23258
23261
|
return adapter.disposeStreamView(userId);
|
23259
23262
|
}),
|
23260
|
-
onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$
|
23263
|
+
onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23261
23264
|
return adapter.disposeScreenShareStreamView(userId);
|
23262
23265
|
}),
|
23263
|
-
onDisposeRemoteVideoStreamView: (userId) => __awaiter$
|
23266
|
+
onDisposeRemoteVideoStreamView: (userId) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23264
23267
|
return adapter.disposeRemoteVideoStreamView(userId);
|
23265
23268
|
}),
|
23266
23269
|
/* @conditional-compile-remove(call-readiness) */
|
23267
|
-
askDevicePermission: (constrain) => __awaiter$
|
23270
|
+
askDevicePermission: (constrain) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23268
23271
|
return adapter.askDevicePermission(constrain);
|
23269
23272
|
}),
|
23270
23273
|
/* @conditional-compile-remove(video-background-effects) */
|
23271
|
-
onRemoveVideoBackgroundEffects: () => __awaiter$
|
23274
|
+
onRemoveVideoBackgroundEffects: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23272
23275
|
return yield adapter.stopVideoBackgroundEffects();
|
23273
23276
|
}),
|
23274
23277
|
/* @conditional-compile-remove(video-background-effects) */
|
23275
|
-
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter$
|
23278
|
+
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23276
23279
|
const blurConfig = Object.assign({ effectName: 'blur' }, backgroundBlurConfig);
|
23277
23280
|
return yield adapter.startVideoBackgroundEffect(blurConfig);
|
23278
23281
|
}),
|
23279
23282
|
/* @conditional-compile-remove(video-background-effects) */
|
23280
|
-
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter$
|
23283
|
+
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23281
23284
|
const replacementConfig = Object.assign({ effectName: 'replacement' }, backgroundReplacementConfig);
|
23282
23285
|
return yield adapter.startVideoBackgroundEffect(replacementConfig);
|
23283
23286
|
}),
|
23284
23287
|
/* @conditional-compile-remove(close-captions) */
|
23285
|
-
onStartCaptions: (options) => __awaiter$
|
23288
|
+
onStartCaptions: (options) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23286
23289
|
yield adapter.startCaptions(options);
|
23287
23290
|
}),
|
23288
23291
|
/* @conditional-compile-remove(close-captions) */
|
23289
|
-
onStopCaptions: () => __awaiter$
|
23292
|
+
onStopCaptions: () => __awaiter$h(void 0, void 0, void 0, function* () {
|
23290
23293
|
yield adapter.stopCaptions();
|
23291
23294
|
}),
|
23292
23295
|
/* @conditional-compile-remove(close-captions) */
|
23293
|
-
onSetSpokenLanguage: (language) => __awaiter$
|
23296
|
+
onSetSpokenLanguage: (language) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23294
23297
|
yield adapter.setSpokenLanguage(language);
|
23295
23298
|
}),
|
23296
23299
|
/* @conditional-compile-remove(close-captions) */
|
23297
|
-
onSetCaptionLanguage: (language) => __awaiter$
|
23300
|
+
onSetCaptionLanguage: (language) => __awaiter$h(void 0, void 0, void 0, function* () {
|
23298
23301
|
yield adapter.setCaptionLanguage(language);
|
23299
23302
|
})
|
23300
23303
|
}));
|
@@ -23435,7 +23438,7 @@ const MoreButton = (props) => {
|
|
23435
23438
|
|
23436
23439
|
// Copyright (c) Microsoft Corporation.
|
23437
23440
|
// Licensed under the MIT License.
|
23438
|
-
var __awaiter$
|
23441
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
23439
23442
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23440
23443
|
return new (P || (P = Promise))(function (resolve, reject) {
|
23441
23444
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -23463,7 +23466,7 @@ const CaptionsBannerMoreButton = (props) => {
|
|
23463
23466
|
/* @conditional-compile-remove(close-captions) */
|
23464
23467
|
const moreButtonContextualMenuItems = [];
|
23465
23468
|
/* @conditional-compile-remove(close-captions) */
|
23466
|
-
const startCaptions = React.useCallback(() => __awaiter$
|
23469
|
+
const startCaptions = React.useCallback(() => __awaiter$g(void 0, void 0, void 0, function* () {
|
23467
23470
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
23468
23471
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
23469
23472
|
});
|
@@ -23630,36 +23633,6 @@ const Camera = (props) => {
|
|
23630
23633
|
onClickVideoEffects: props.onClickVideoEffects, componentRef: props.componentRef })));
|
23631
23634
|
};
|
23632
23635
|
|
23633
|
-
// Copyright (c) Microsoft Corporation.
|
23634
|
-
/** @private */
|
23635
|
-
const generateCustomControlBarButtons$1 = (onFetchCustomButtonProps, displayType) => {
|
23636
|
-
const response = {
|
23637
|
-
primary: undefined,
|
23638
|
-
overflow: undefined,
|
23639
|
-
secondary: undefined
|
23640
|
-
};
|
23641
|
-
if (!onFetchCustomButtonProps) {
|
23642
|
-
return response;
|
23643
|
-
}
|
23644
|
-
const allButtonProps = onFetchCustomButtonProps.map((f) => f({ displayType }));
|
23645
|
-
for (const key in response) {
|
23646
|
-
response[key] = (React__default["default"].createElement(React__default["default"].Fragment, null, allButtonProps
|
23647
|
-
.filter((buttonProps) => buttonProps.placement === key)
|
23648
|
-
.map((buttonProps, i) => {
|
23649
|
-
var _a;
|
23650
|
-
return (React__default["default"].createElement(ControlBarButton, { ariaDescription: buttonProps.ariaDescription, ariaLabel: buttonProps.ariaLabel, disabled: buttonProps.disabled, id: buttonProps.id, key: (_a = buttonProps.key) !== null && _a !== void 0 ? _a : `${buttonProps.placement}_${i}`, onClick: buttonProps.onItemClick, onRenderIcon: () => { var _a; return React__default["default"].createElement(react.Icon, { iconName: (_a = buttonProps.iconName) !== null && _a !== void 0 ? _a : 'ControlButtonOptions' }); }, showLabel: buttonProps.showLabel, text: buttonProps.text, styles: buttonProps.styles }));
|
23651
|
-
})));
|
23652
|
-
}
|
23653
|
-
return response;
|
23654
|
-
};
|
23655
|
-
/** @private */
|
23656
|
-
const onFetchCustomButtonPropsTrampoline$1 = (options) => {
|
23657
|
-
var _a;
|
23658
|
-
let response = undefined;
|
23659
|
-
response = (_a = options) === null || _a === void 0 ? void 0 : _a.onFetchCustomButtonProps;
|
23660
|
-
return response;
|
23661
|
-
};
|
23662
|
-
|
23663
23636
|
// Copyright (c) Microsoft Corporation.
|
23664
23637
|
/** @private */
|
23665
23638
|
const Devices = (props) => {
|
@@ -24166,6 +24139,88 @@ const isDisabled = (option) => {
|
|
24166
24139
|
return option.disabled;
|
24167
24140
|
};
|
24168
24141
|
|
24142
|
+
// Copyright (c) Microsoft Corporation.
|
24143
|
+
/**
|
24144
|
+
* Max number of Custom Buttons in primary and secondary ControlBar
|
24145
|
+
* Does not include existing buttons in the controlBar.
|
24146
|
+
*
|
24147
|
+
* @private
|
24148
|
+
*/
|
24149
|
+
const CUSTOM_BUTTON_OPTIONS = {
|
24150
|
+
MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS: 3,
|
24151
|
+
MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS: 1,
|
24152
|
+
MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS: 2
|
24153
|
+
};
|
24154
|
+
/** @private */
|
24155
|
+
const generateCustomCallControlBarButton = (onFetchCustomButtonProps, displayType) => {
|
24156
|
+
const allButtonProps = onFetchCustomButtonProps === null || onFetchCustomButtonProps === void 0 ? void 0 : onFetchCustomButtonProps.map((callback) => callback({ displayType }));
|
24157
|
+
return {
|
24158
|
+
primary: generateCustomControlBarButtons('primary', allButtonProps),
|
24159
|
+
secondary: generateCustomControlBarButtons('secondary', allButtonProps),
|
24160
|
+
overflow: generateCustomControlBarButtons('overflow', allButtonProps)
|
24161
|
+
};
|
24162
|
+
};
|
24163
|
+
/** @private */
|
24164
|
+
const generateCustomControlBarButtons = (placement, customButtons) => customButtons
|
24165
|
+
? customButtons
|
24166
|
+
.filter((buttonProps) => buttonProps.placement === placement)
|
24167
|
+
.map((buttonProps, i) => (internalProps) => {
|
24168
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
24169
|
+
if (buttonProps['onRenderButton']) {
|
24170
|
+
return buttonProps['onRenderButton'](internalProps);
|
24171
|
+
}
|
24172
|
+
return (React__default["default"].createElement(ControlBarButton, { ariaDescription: (_b = (_a = buttonProps.strings) === null || _a === void 0 ? void 0 : _a.ariaDescription) !== null && _b !== void 0 ? _b : internalProps.ariaDescription, ariaLabel: (_f = (_d = (_c = buttonProps.strings) === null || _c === void 0 ? void 0 : _c.ariaLabel) !== null && _d !== void 0 ? _d : (_e = buttonProps.strings) === null || _e === void 0 ? void 0 : _e.tooltipContent) !== null && _f !== void 0 ? _f : internalProps.ariaLabel, disabled: (_g = buttonProps.disabled) !== null && _g !== void 0 ? _g : internalProps.disabled, id: (_h = buttonProps.id) !== null && _h !== void 0 ? _h : internalProps.id, key: `${buttonProps.placement}_${i}`, onClick: (_j = buttonProps.onItemClick) !== null && _j !== void 0 ? _j : internalProps.onClick, onRenderIcon: () => {
|
24173
|
+
var _a, _b, _c;
|
24174
|
+
return (React__default["default"].createElement(react.Icon, { iconName: (_c = (_a = buttonProps.iconName) !== null && _a !== void 0 ? _a : (_b = internalProps.iconProps) === null || _b === void 0 ? void 0 : _b.iconName) !== null && _c !== void 0 ? _c : 'DefaultCustomButton' }));
|
24175
|
+
}, showLabel: (_k = buttonProps.showLabel) !== null && _k !== void 0 ? _k : internalProps.showLabel, styles: react.mergeStyleSets(internalProps.styles), strings: buttonProps.strings }));
|
24176
|
+
})
|
24177
|
+
: [];
|
24178
|
+
/** @private */
|
24179
|
+
const generateCustomDrawerButtons = (placement, customButtons) => customButtons
|
24180
|
+
? customButtons
|
24181
|
+
.filter((buttonProps) => buttonProps.placement === placement)
|
24182
|
+
.map((buttonProps, i) => {
|
24183
|
+
var _a, _b;
|
24184
|
+
return (Object.assign(Object.assign({}, buttonProps), { disabled: buttonProps.disabled, iconProps: { iconName: (_a = buttonProps.iconName) !== null && _a !== void 0 ? _a : 'DefaultCustomButton', styles: { root: { lineHeight: 0 } } }, id: buttonProps.id, itemKey: `${buttonProps.placement}_${i}`, onItemClick: buttonProps.onItemClick, text: (_b = buttonProps.strings) === null || _b === void 0 ? void 0 : _b.label }));
|
24185
|
+
})
|
24186
|
+
: [];
|
24187
|
+
/** @private */
|
24188
|
+
const generateCustomCallDrawerButtons = (onFetchCustomButtonProps, displayType) => {
|
24189
|
+
const customButtons = onFetchCustomButtonProps === null || onFetchCustomButtonProps === void 0 ? void 0 : onFetchCustomButtonProps.map((callback) => callback({ displayType }));
|
24190
|
+
return {
|
24191
|
+
primary: generateCustomDrawerButtons('primary', customButtons),
|
24192
|
+
secondary: generateCustomDrawerButtons('secondary', customButtons),
|
24193
|
+
overflow: generateCustomDrawerButtons('overflow', customButtons)
|
24194
|
+
};
|
24195
|
+
};
|
24196
|
+
/** @private */
|
24197
|
+
const generateCustomCallDesktopOverflowButtons = (onFetchCustomButtonProps, displayType) => {
|
24198
|
+
const customButtons = onFetchCustomButtonProps === null || onFetchCustomButtonProps === void 0 ? void 0 : onFetchCustomButtonProps.map((callback) => callback({ displayType }));
|
24199
|
+
return {
|
24200
|
+
primary: generateCustomDrawerButtons('primary', customButtons).map(drawerMenuItemToContextualMenuItem),
|
24201
|
+
secondary: generateCustomDrawerButtons('secondary', customButtons).map(drawerMenuItemToContextualMenuItem),
|
24202
|
+
overflow: generateCustomDrawerButtons('overflow', customButtons).map(drawerMenuItemToContextualMenuItem)
|
24203
|
+
};
|
24204
|
+
};
|
24205
|
+
/** @private */
|
24206
|
+
const drawerMenuItemToContextualMenuItem = (item) => (Object.assign(Object.assign({}, item), { key: item.itemKey, onClick: item.onItemClick
|
24207
|
+
? (ev) => {
|
24208
|
+
var _a;
|
24209
|
+
(_a = item.onItemClick) === null || _a === void 0 ? void 0 : _a.call(item, ev);
|
24210
|
+
}
|
24211
|
+
: undefined, subMenuProps: item.subMenuProps
|
24212
|
+
? {
|
24213
|
+
items: item.subMenuProps.map(drawerMenuItemToContextualMenuItem)
|
24214
|
+
}
|
24215
|
+
: undefined }));
|
24216
|
+
/** @private */
|
24217
|
+
const onFetchCustomButtonPropsTrampoline = (options) => {
|
24218
|
+
var _a;
|
24219
|
+
let response = undefined;
|
24220
|
+
response = (_a = options) === null || _a === void 0 ? void 0 : _a.onFetchCustomButtonProps;
|
24221
|
+
return response;
|
24222
|
+
};
|
24223
|
+
|
24169
24224
|
// Copyright (c) Microsoft Corporation.
|
24170
24225
|
// Enforce a background color on control bar to ensure it matches the composite background color.
|
24171
24226
|
const controlBarStyles = react.memoizeFunction((background) => ({ root: { background: background } }));
|
@@ -24173,6 +24228,7 @@ const controlBarStyles = react.memoizeFunction((background) => ({ root: { backgr
|
|
24173
24228
|
* @private
|
24174
24229
|
*/
|
24175
24230
|
const CallControls = (props) => {
|
24231
|
+
var _a;
|
24176
24232
|
const options = React.useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);
|
24177
24233
|
/* @conditional-compile-remove(PSTN-calls) */
|
24178
24234
|
const adapter = useAdapter();
|
@@ -24276,12 +24332,13 @@ const CallControls = (props) => {
|
|
24276
24332
|
}
|
24277
24333
|
return items;
|
24278
24334
|
};
|
24335
|
+
const customDrawerButtons = React.useMemo(() => generateCustomCallDesktopOverflowButtons(onFetchCustomButtonPropsTrampoline(typeof options === 'object' ? options : undefined), typeof options === 'object' ? options.displayType : undefined), [options]);
|
24279
24336
|
const moreButtonMenuItems = moreButtonContextualMenuItems();
|
24280
24337
|
let showMoreButton = isEnabled$2(options === null || options === void 0 ? void 0 : options.moreButton) && moreButtonMenuItems.length > 0;
|
24281
24338
|
if (showMoreButton) {
|
24282
24339
|
numberOfButtons++;
|
24283
24340
|
}
|
24284
|
-
const customButtons = React.useMemo(() =>
|
24341
|
+
const customButtons = React.useMemo(() => generateCustomCallControlBarButton(onFetchCustomButtonPropsTrampoline(options), options === null || options === void 0 ? void 0 : options.displayType), [options]);
|
24285
24342
|
numberOfButtons += React__default["default"].Children.count(customButtons['primary']) + React__default["default"].Children.count(customButtons['secondary']);
|
24286
24343
|
let showDevicesButtonInControlBar = isEnabled$2(options === null || options === void 0 ? void 0 : options.devicesButton);
|
24287
24344
|
if (showDevicesButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {
|
@@ -24337,6 +24394,32 @@ const CallControls = (props) => {
|
|
24337
24394
|
['data-ui-id']: 'call-composite-more-menu-raise-hand-button'
|
24338
24395
|
});
|
24339
24396
|
}
|
24397
|
+
// Custom Buttons in More Button Menu should always be the last items pushed into the moreButtonMenuItems array
|
24398
|
+
if (customDrawerButtons['primary']) {
|
24399
|
+
customDrawerButtons['primary']
|
24400
|
+
.slice(props.isMobile
|
24401
|
+
? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS
|
24402
|
+
: CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS)
|
24403
|
+
.forEach((element) => {
|
24404
|
+
moreButtonMenuItems.push(Object.assign({ itemProps: {
|
24405
|
+
styles: buttonFlyoutIncreasedSizeStyles
|
24406
|
+
} }, element));
|
24407
|
+
});
|
24408
|
+
}
|
24409
|
+
if (customDrawerButtons['secondary']) {
|
24410
|
+
customDrawerButtons['secondary'].forEach((element) => {
|
24411
|
+
moreButtonMenuItems.push(Object.assign({ itemProps: {
|
24412
|
+
styles: buttonFlyoutIncreasedSizeStyles
|
24413
|
+
} }, element));
|
24414
|
+
});
|
24415
|
+
}
|
24416
|
+
if (customDrawerButtons['overflow']) {
|
24417
|
+
customDrawerButtons['overflow'].forEach((element) => {
|
24418
|
+
moreButtonMenuItems.push(Object.assign({ itemProps: {
|
24419
|
+
styles: buttonFlyoutIncreasedSizeStyles
|
24420
|
+
} }, element));
|
24421
|
+
});
|
24422
|
+
}
|
24340
24423
|
/* @conditional-compile-remove(PSTN-calls) */
|
24341
24424
|
const [showDialpad, setShowDialpad] = React.useState(false);
|
24342
24425
|
const theme = react.useTheme();
|
@@ -24360,10 +24443,16 @@ const CallControls = (props) => {
|
|
24360
24443
|
showParticipantsButtonInControlBar && (React__default["default"].createElement(Participants, { option: options === null || options === void 0 ? void 0 : options.participantsButton, callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, isMobile: props.isMobile, disabled: isDisabled$3(options === null || options === void 0 ? void 0 : options.participantsButton) })) && (
|
24361
24444
|
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
|
24362
24445
|
React__default["default"].createElement(People, { checked: props.peopleButtonChecked, ariaLabel: peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.label, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-composite-people-button", strings: peopleButtonStrings, disabled: isDisabled$3(options === null || options === void 0 ? void 0 : options.participantsButton) })),
|
24363
|
-
showDevicesButtonInControlBar && (React__default["default"].createElement(Devices, { displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, disabled: isDisabled$3(options === null || options === void 0 ? void 0 : options.devicesButton) })),
|
24446
|
+
showDevicesButtonInControlBar && (React__default["default"].createElement(Devices, { displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, disabled: isDisabled$3(options === null || options === void 0 ? void 0 : options.devicesButton) })), (_a = customButtons['primary']) === null || _a === void 0 ? void 0 :
|
24447
|
+
_a.slice(0, props.isMobile
|
24448
|
+
? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS
|
24449
|
+
: CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
24450
|
+
return (React__default["default"].createElement(CustomButton, { key: `primary-custom-button-${i}`,
|
24451
|
+
// styles={commonButtonStyles}
|
24452
|
+
showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact' }));
|
24453
|
+
}),
|
24364
24454
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */
|
24365
24455
|
showMoreButton && (React__default["default"].createElement(MoreButton, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonMenuItems }, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact' })),
|
24366
|
-
customButtons['primary'],
|
24367
24456
|
isEnabled$2(options === null || options === void 0 ? void 0 : options.endCallButton) && React__default["default"].createElement(EndCall, { displayType: options === null || options === void 0 ? void 0 : options.displayType })))));
|
24368
24457
|
};
|
24369
24458
|
const isEnabled$2 = (option) => option !== false;
|
@@ -24405,88 +24494,9 @@ const useCallWithChatCompositeStrings = () => {
|
|
24405
24494
|
return locale.strings.callWithChat;
|
24406
24495
|
};
|
24407
24496
|
|
24408
|
-
// Copyright (c) Microsoft Corporation.
|
24409
|
-
/**
|
24410
|
-
* Max number of Custom Buttons in primary and secondary ControlBar
|
24411
|
-
* Does not include existing buttons in the controlBar.
|
24412
|
-
*
|
24413
|
-
* @private
|
24414
|
-
*/
|
24415
|
-
const CUSTOM_BUTTON_OPTIONS = {
|
24416
|
-
MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS: 3,
|
24417
|
-
MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS: 1,
|
24418
|
-
MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS: 2
|
24419
|
-
};
|
24420
|
-
/** @private */
|
24421
|
-
const generateCustomCallControlBarButton = (onFetchCustomButtonProps, displayType) => {
|
24422
|
-
const allButtonProps = onFetchCustomButtonProps === null || onFetchCustomButtonProps === void 0 ? void 0 : onFetchCustomButtonProps.map((callback) => callback({ displayType }));
|
24423
|
-
return {
|
24424
|
-
primary: generateCustomControlBarButtons('primary', allButtonProps),
|
24425
|
-
secondary: generateCustomControlBarButtons('secondary', allButtonProps),
|
24426
|
-
overflow: generateCustomControlBarButtons('overflow', allButtonProps)
|
24427
|
-
};
|
24428
|
-
};
|
24429
|
-
/** @private */
|
24430
|
-
const generateCustomControlBarButtons = (placement, customButtons) => customButtons
|
24431
|
-
? customButtons
|
24432
|
-
.filter((buttonProps) => buttonProps.placement === placement)
|
24433
|
-
.map((buttonProps, i) => (internalProps) => {
|
24434
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
24435
|
-
if (buttonProps['onRenderButton']) {
|
24436
|
-
return buttonProps['onRenderButton'](internalProps);
|
24437
|
-
}
|
24438
|
-
return (React__default["default"].createElement(ControlBarButton, { ariaDescription: (_a = buttonProps.ariaDescription) !== null && _a !== void 0 ? _a : internalProps.ariaDescription, ariaLabel: (_b = buttonProps.ariaLabel) !== null && _b !== void 0 ? _b : internalProps.ariaLabel, disabled: (_c = buttonProps.disabled) !== null && _c !== void 0 ? _c : internalProps.disabled, id: (_d = buttonProps.id) !== null && _d !== void 0 ? _d : internalProps.id, key: (_e = buttonProps.key) !== null && _e !== void 0 ? _e : `${buttonProps.placement}_${i}`, onClick: (_f = buttonProps.onItemClick) !== null && _f !== void 0 ? _f : internalProps.onClick, onRenderIcon: () => {
|
24439
|
-
var _a, _b, _c;
|
24440
|
-
return (React__default["default"].createElement(react.Icon, { iconName: (_c = (_a = buttonProps.iconName) !== null && _a !== void 0 ? _a : (_b = internalProps.iconProps) === null || _b === void 0 ? void 0 : _b.iconName) !== null && _c !== void 0 ? _c : 'ControlButtonOptions' }));
|
24441
|
-
}, showLabel: (_g = buttonProps.showLabel) !== null && _g !== void 0 ? _g : internalProps.showLabel, text: (_h = buttonProps.text) !== null && _h !== void 0 ? _h : internalProps.text, styles: react.mergeStyleSets(internalProps.styles, buttonProps.styles) }));
|
24442
|
-
})
|
24443
|
-
: [];
|
24444
|
-
/** @private */
|
24445
|
-
const generateCustomDrawerButtons = (placement, customButtons) => customButtons
|
24446
|
-
? customButtons
|
24447
|
-
.filter((buttonProps) => buttonProps.placement === placement)
|
24448
|
-
.map((buttonProps, i) => (Object.assign(Object.assign({}, buttonProps), { disabled: buttonProps.disabled, iconProps: { iconName: buttonProps.iconName }, id: buttonProps.id, itemKey: buttonProps.key ? '' + buttonProps.key : `${buttonProps.placement}_${i}`, onItemClick: buttonProps.onItemClick, text: buttonProps.text })))
|
24449
|
-
: [];
|
24450
|
-
/** @private */
|
24451
|
-
const generateCustomCallDrawerButtons = (onFetchCustomButtonProps, displayType) => {
|
24452
|
-
const customButtons = onFetchCustomButtonProps === null || onFetchCustomButtonProps === void 0 ? void 0 : onFetchCustomButtonProps.map((callback) => callback({ displayType }));
|
24453
|
-
return {
|
24454
|
-
primary: generateCustomDrawerButtons('primary', customButtons),
|
24455
|
-
secondary: generateCustomDrawerButtons('secondary', customButtons),
|
24456
|
-
overflow: generateCustomDrawerButtons('overflow', customButtons)
|
24457
|
-
};
|
24458
|
-
};
|
24459
|
-
/** @private */
|
24460
|
-
const generateCustomCallDesktopOverflowButtons = (onFetchCustomButtonProps, displayType) => {
|
24461
|
-
const customButtons = onFetchCustomButtonProps === null || onFetchCustomButtonProps === void 0 ? void 0 : onFetchCustomButtonProps.map((callback) => callback({ displayType }));
|
24462
|
-
return {
|
24463
|
-
primary: generateCustomDrawerButtons('primary', customButtons).map(drawerMenuItemToContextualMenuItem),
|
24464
|
-
secondary: generateCustomDrawerButtons('secondary', customButtons).map(drawerMenuItemToContextualMenuItem),
|
24465
|
-
overflow: generateCustomDrawerButtons('overflow', customButtons).map(drawerMenuItemToContextualMenuItem)
|
24466
|
-
};
|
24467
|
-
};
|
24468
|
-
/** @private */
|
24469
|
-
const drawerMenuItemToContextualMenuItem = (item) => (Object.assign(Object.assign({}, item), { key: item.itemKey, onClick: item.onItemClick
|
24470
|
-
? (ev) => {
|
24471
|
-
var _a;
|
24472
|
-
(_a = item.onItemClick) === null || _a === void 0 ? void 0 : _a.call(item, ev);
|
24473
|
-
}
|
24474
|
-
: undefined, subMenuProps: item.subMenuProps
|
24475
|
-
? {
|
24476
|
-
items: item.subMenuProps.map(drawerMenuItemToContextualMenuItem)
|
24477
|
-
}
|
24478
|
-
: undefined }));
|
24479
|
-
/** @private */
|
24480
|
-
const onFetchCustomButtonPropsTrampoline = (options) => {
|
24481
|
-
var _a;
|
24482
|
-
let response = undefined;
|
24483
|
-
response = (_a = options) === null || _a === void 0 ? void 0 : _a.onFetchCustomButtonProps;
|
24484
|
-
return response;
|
24485
|
-
};
|
24486
|
-
|
24487
24497
|
// Copyright (c) Microsoft Corporation.
|
24488
24498
|
// Licensed under the MIT License.
|
24489
|
-
var __awaiter$
|
24499
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
24490
24500
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
24491
24501
|
return new (P || (P = Promise))(function (resolve, reject) {
|
24492
24502
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -24510,7 +24520,7 @@ const DesktopMoreButton = (props) => {
|
|
24510
24520
|
/* @conditional-compile-remove(close-captions) */
|
24511
24521
|
const startCaptionsButtonHandlers = useHandlers();
|
24512
24522
|
/* @conditional-compile-remove(close-captions) */
|
24513
|
-
const startCaptions = React.useCallback(() => __awaiter$
|
24523
|
+
const startCaptions = React.useCallback(() => __awaiter$f(void 0, void 0, void 0, function* () {
|
24514
24524
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
24515
24525
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
24516
24526
|
});
|
@@ -25250,7 +25260,7 @@ const themedToggleButtonStyle = (theme, checked) => {
|
|
25250
25260
|
|
25251
25261
|
// Copyright (c) Microsoft Corporation.
|
25252
25262
|
// Licensed under the MIT License.
|
25253
|
-
var __awaiter$
|
25263
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
25254
25264
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
25255
25265
|
return new (P || (P = Promise))(function (resolve, reject) {
|
25256
25266
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -25480,7 +25490,7 @@ const MoreDrawer = (props) => {
|
|
25480
25490
|
? captionSettingsProp.currentCaptionLanguage
|
25481
25491
|
: _spokenLanguageToCaptionLanguage[currentSpokenLanguage]);
|
25482
25492
|
/* @conditional-compile-remove(close-captions) */
|
25483
|
-
const onToggleChange = React.useCallback(() => __awaiter$
|
25493
|
+
const onToggleChange = React.useCallback(() => __awaiter$e(void 0, void 0, void 0, function* () {
|
25484
25494
|
if (!captionSettingsProp.isCaptionsFeatureActive) {
|
25485
25495
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
25486
25496
|
spokenLanguage: currentSpokenLanguage
|
@@ -26199,7 +26209,7 @@ const AddPeopleButton = (props) => {
|
|
26199
26209
|
|
26200
26210
|
// Copyright (c) Microsoft Corporation.
|
26201
26211
|
// Licensed under the MIT License.
|
26202
|
-
var __awaiter$
|
26212
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26203
26213
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26204
26214
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26205
26215
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26221,11 +26231,11 @@ const PeoplePaneContent = (props) => {
|
|
26221
26231
|
return localeStrings.strings.call;
|
26222
26232
|
};
|
26223
26233
|
const strings = getStrings();
|
26224
|
-
const removeParticipantFromCall = React.useCallback((participantId) => __awaiter$
|
26234
|
+
const removeParticipantFromCall = React.useCallback((participantId) => __awaiter$d(void 0, void 0, void 0, function* () {
|
26225
26235
|
yield adapter.removeParticipant(participantId);
|
26226
26236
|
}), [adapter]);
|
26227
26237
|
/* @conditional-compile-remove(PSTN-calls) */
|
26228
|
-
const addParticipantToCall = React.useCallback((participant, options) => __awaiter$
|
26238
|
+
const addParticipantToCall = React.useCallback((participant, options) => __awaiter$d(void 0, void 0, void 0, function* () {
|
26229
26239
|
yield adapter.addParticipant(participant, options);
|
26230
26240
|
}), [adapter]);
|
26231
26241
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -26252,7 +26262,7 @@ const PeoplePaneContent = (props) => {
|
|
26252
26262
|
setDrawerMenuItems
|
26253
26263
|
]);
|
26254
26264
|
const participantListProps = React.useMemo(() => {
|
26255
|
-
const onRemoveAParticipant = (participantId) => __awaiter$
|
26265
|
+
const onRemoveAParticipant = (participantId) => __awaiter$d(void 0, void 0, void 0, function* () { return removeParticipantFromCall(participantId); });
|
26256
26266
|
return Object.assign(Object.assign({}, participantListDefaultProps), {
|
26257
26267
|
// Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
|
26258
26268
|
onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
|
@@ -26385,7 +26395,7 @@ const localVideoSelector = reselect__namespace.createSelector([callStatusSelecto
|
|
26385
26395
|
|
26386
26396
|
// Copyright (c) Microsoft Corporation.
|
26387
26397
|
// Licensed under the MIT License.
|
26388
|
-
var __awaiter$
|
26398
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26389
26399
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26390
26400
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26391
26401
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26454,7 +26464,7 @@ const VideoEffectsPaneContent = (props) => {
|
|
26454
26464
|
return videoEffects;
|
26455
26465
|
}, [strings, adapter]);
|
26456
26466
|
/* @conditional-compile-remove(video-background-effects) */
|
26457
|
-
const onEffectChange = React.useCallback((effectKey) => __awaiter$
|
26467
|
+
const onEffectChange = React.useCallback((effectKey) => __awaiter$c(void 0, void 0, void 0, function* () {
|
26458
26468
|
if (effectKey === 'blur') {
|
26459
26469
|
const blurEffect = {
|
26460
26470
|
effectName: effectKey
|
@@ -28220,7 +28230,7 @@ const localPreviewButtonStyle = {
|
|
28220
28230
|
|
28221
28231
|
// Copyright (c) Microsoft Corporation.
|
28222
28232
|
// Licensed under the MIT License.
|
28223
|
-
var __awaiter$
|
28233
|
+
var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
28224
28234
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28225
28235
|
return new (P || (P = Promise))(function (resolve, reject) {
|
28226
28236
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -28240,7 +28250,7 @@ const LocalPreview = (props) => {
|
|
28240
28250
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
28241
28251
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
28242
28252
|
const adapter = useAdapter();
|
28243
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
28253
|
+
const onToggleMic = React.useCallback(() => __awaiter$b(void 0, void 0, void 0, function* () {
|
28244
28254
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
28245
28255
|
}), [adapter, isLocalMicrophoneEnabled]);
|
28246
28256
|
const hasNoDevices = devicesButtonProps.cameras.length === 0 &&
|
@@ -28508,7 +28518,7 @@ const CallReadinessModalFallBack = (props) => {
|
|
28508
28518
|
|
28509
28519
|
// Copyright (c) Microsoft Corporation.
|
28510
28520
|
// Licensed under the MIT License.
|
28511
|
-
var __awaiter$
|
28521
|
+
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
28512
28522
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28513
28523
|
return new (P || (P = Promise))(function (resolve, reject) {
|
28514
28524
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -28617,7 +28627,7 @@ const ConfigurationPage = (props) => {
|
|
28617
28627
|
const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;
|
28618
28628
|
/* @conditional-compile-remove(video-background-effects) */
|
28619
28629
|
const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(props.updateSidePaneRenderer, mobileView, props.latestErrors, props.onDismissError);
|
28620
|
-
const startCall = React.useCallback(() => __awaiter$
|
28630
|
+
const startCall = React.useCallback(() => __awaiter$a(void 0, void 0, void 0, function* () {
|
28621
28631
|
/* @conditional-compile-remove(video-background-effects) */
|
28622
28632
|
closeVideoEffectsPane();
|
28623
28633
|
startCallHandler();
|
@@ -29104,7 +29114,7 @@ const holdPaneContentStyles = {
|
|
29104
29114
|
|
29105
29115
|
// Copyright (c) Microsoft Corporation.
|
29106
29116
|
// Licensed under the MIT License.
|
29107
|
-
var __awaiter$
|
29117
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29108
29118
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29109
29119
|
return new (P || (P = Promise))(function (resolve, reject) {
|
29110
29120
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -29139,7 +29149,7 @@ const HoldPane = () => {
|
|
29139
29149
|
React__default["default"].createElement(react.Stack, { horizontal: true, styles: holdPaneContentStyles },
|
29140
29150
|
React__default["default"].createElement(react.Text, { styles: holdPaneTimerStyles }, elapsedTime),
|
29141
29151
|
React__default["default"].createElement(react.Text, { styles: holdPaneLabelStyles }, strings.holdScreenLabel),
|
29142
|
-
React__default["default"].createElement(react.PrimaryButton, { text: !resumingCall ? strings.resumeCallButtonLabel : strings.resumingCallButtonLabel, ariaLabel: !resumingCall ? strings.resumeCallButtonAriaLabel : strings.resumingCallButtonAriaLabel, styles: resumeButtonStyles, disabled: resumingCall, onClick: () => __awaiter$
|
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$9(void 0, void 0, void 0, function* () {
|
29143
29153
|
setResumingCall(true);
|
29144
29154
|
try {
|
29145
29155
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
@@ -29371,7 +29381,7 @@ const updateLatestCapabilityChangedNotificationMap = (capabilitiesChangedInfoAnd
|
|
29371
29381
|
|
29372
29382
|
// Copyright (c) Microsoft Corporation.
|
29373
29383
|
// Licensed under the MIT License.
|
29374
|
-
var __awaiter$
|
29384
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29375
29385
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29376
29386
|
return new (P || (P = Promise))(function (resolve, reject) {
|
29377
29387
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -29390,7 +29400,7 @@ const MainScreen = (props) => {
|
|
29390
29400
|
const hasCameras = camerasCount > 0;
|
29391
29401
|
const hasMicrophones = microphonesCount > 0;
|
29392
29402
|
React.useEffect(() => {
|
29393
|
-
(() => __awaiter$
|
29403
|
+
(() => __awaiter$8(void 0, void 0, void 0, function* () {
|
29394
29404
|
var _a;
|
29395
29405
|
const constrain = getQueryOptions({
|
29396
29406
|
/* @conditional-compile-remove(rooms) */ role: (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role
|
@@ -29721,7 +29731,7 @@ options) {
|
|
29721
29731
|
|
29722
29732
|
// Copyright (c) Microsoft Corporation.
|
29723
29733
|
// Licensed under the MIT License.
|
29724
|
-
var __awaiter$
|
29734
|
+
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29725
29735
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29726
29736
|
return new (P || (P = Promise))(function (resolve, reject) {
|
29727
29737
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -29738,7 +29748,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
|
|
29738
29748
|
return (state) => {
|
29739
29749
|
var _a;
|
29740
29750
|
const originalParticipants = (_a = state.call) === null || _a === void 0 ? void 0 : _a.remoteParticipants;
|
29741
|
-
(() => __awaiter$
|
29751
|
+
(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
29742
29752
|
let shouldNotifyUpdates = false;
|
29743
29753
|
for (const key in originalParticipants) {
|
29744
29754
|
if (cachedDisplayName[key]) {
|
@@ -29765,7 +29775,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
|
|
29765
29775
|
|
29766
29776
|
// Copyright (c) Microsoft Corporation.
|
29767
29777
|
// Licensed under the MIT License.
|
29768
|
-
var __awaiter$
|
29778
|
+
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29769
29779
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29770
29780
|
return new (P || (P = Promise))(function (resolve, reject) {
|
29771
29781
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -30115,9 +30125,9 @@ class AzureCommunicationCallAdapter {
|
|
30115
30125
|
this.callAgent.dispose();
|
30116
30126
|
}
|
30117
30127
|
queryCameras() {
|
30118
|
-
return __awaiter$
|
30128
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30119
30129
|
const startTime = new Date().getTime();
|
30120
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30130
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30121
30131
|
const cameras = yield this.deviceManager.getCameras();
|
30122
30132
|
const endTime = new Date().getTime();
|
30123
30133
|
compositeLogger.info('time to query cameras', endTime - startTime, 'ms');
|
@@ -30126,9 +30136,9 @@ class AzureCommunicationCallAdapter {
|
|
30126
30136
|
});
|
30127
30137
|
}
|
30128
30138
|
queryMicrophones() {
|
30129
|
-
return __awaiter$
|
30139
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30130
30140
|
const startTime = new Date().getTime();
|
30131
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30141
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30132
30142
|
const microphones = yield this.deviceManager.getMicrophones();
|
30133
30143
|
const endTime = new Date().getTime();
|
30134
30144
|
compositeLogger.info('time to query microphones', endTime - startTime, 'ms');
|
@@ -30137,9 +30147,9 @@ class AzureCommunicationCallAdapter {
|
|
30137
30147
|
});
|
30138
30148
|
}
|
30139
30149
|
querySpeakers() {
|
30140
|
-
return __awaiter$
|
30150
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30141
30151
|
const startTime = new Date().getTime();
|
30142
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30152
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30143
30153
|
const speakers = (yield this.deviceManager.isSpeakerSelectionAvailable) ? this.deviceManager.getSpeakers() : [];
|
30144
30154
|
const endTime = new Date().getTime();
|
30145
30155
|
compositeLogger.info('time to query speakers', endTime - startTime, 'ms');
|
@@ -30148,9 +30158,9 @@ class AzureCommunicationCallAdapter {
|
|
30148
30158
|
});
|
30149
30159
|
}
|
30150
30160
|
askDevicePermission(constrain) {
|
30151
|
-
return __awaiter$
|
30161
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30152
30162
|
const startTime = new Date().getTime();
|
30153
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30163
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30154
30164
|
yield this.deviceManager.askDevicePermission(constrain);
|
30155
30165
|
const endTime = new Date().getTime();
|
30156
30166
|
compositeLogger.info('time to query askDevicePermissions', endTime - startTime, 'ms');
|
@@ -30241,7 +30251,7 @@ class AzureCommunicationCallAdapter {
|
|
30241
30251
|
});
|
30242
30252
|
}
|
30243
30253
|
createStreamView(remoteUserId, options) {
|
30244
|
-
return __awaiter$
|
30254
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30245
30255
|
if (remoteUserId === undefined) {
|
30246
30256
|
return yield this.handlers.onCreateLocalStreamView(options);
|
30247
30257
|
}
|
@@ -30251,7 +30261,7 @@ class AzureCommunicationCallAdapter {
|
|
30251
30261
|
});
|
30252
30262
|
}
|
30253
30263
|
disposeStreamView(remoteUserId) {
|
30254
|
-
return __awaiter$
|
30264
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30255
30265
|
if (remoteUserId === undefined) {
|
30256
30266
|
yield this.handlers.onDisposeLocalStreamView();
|
30257
30267
|
}
|
@@ -30261,22 +30271,22 @@ class AzureCommunicationCallAdapter {
|
|
30261
30271
|
});
|
30262
30272
|
}
|
30263
30273
|
disposeScreenShareStreamView(remoteUserId) {
|
30264
|
-
return __awaiter$
|
30274
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30265
30275
|
yield this.handlers.onDisposeRemoteScreenShareStreamView(remoteUserId);
|
30266
30276
|
});
|
30267
30277
|
}
|
30268
30278
|
disposeRemoteVideoStreamView(remoteUserId) {
|
30269
|
-
return __awaiter$
|
30279
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30270
30280
|
yield this.handlers.onDisposeRemoteVideoStreamView(remoteUserId);
|
30271
30281
|
});
|
30272
30282
|
}
|
30273
30283
|
disposeLocalVideoStreamView() {
|
30274
|
-
return __awaiter$
|
30284
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30275
30285
|
yield this.handlers.onDisposeLocalStreamView();
|
30276
30286
|
});
|
30277
30287
|
}
|
30278
30288
|
leaveCall(forEveryone) {
|
30279
|
-
return __awaiter$
|
30289
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30280
30290
|
yield this.handlers.onHangUp(forEveryone);
|
30281
30291
|
this.unsubscribeCallEvents();
|
30282
30292
|
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined,
|
@@ -30291,29 +30301,29 @@ class AzureCommunicationCallAdapter {
|
|
30291
30301
|
});
|
30292
30302
|
}
|
30293
30303
|
setCamera(device, options) {
|
30294
|
-
return __awaiter$
|
30295
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30304
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30305
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30296
30306
|
yield this.handlers.onSelectCamera(device, options);
|
30297
30307
|
}));
|
30298
30308
|
});
|
30299
30309
|
}
|
30300
30310
|
setMicrophone(device) {
|
30301
|
-
return __awaiter$
|
30302
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30311
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30312
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30303
30313
|
yield this.handlers.onSelectMicrophone(device);
|
30304
30314
|
}));
|
30305
30315
|
});
|
30306
30316
|
}
|
30307
30317
|
setSpeaker(device) {
|
30308
|
-
return __awaiter$
|
30309
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30318
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30319
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30310
30320
|
yield this.handlers.onSelectSpeaker(device);
|
30311
30321
|
}));
|
30312
30322
|
});
|
30313
30323
|
}
|
30314
30324
|
startCamera(options) {
|
30315
|
-
return __awaiter$
|
30316
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30325
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30326
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30317
30327
|
if (!isCameraOn(this.getState())) {
|
30318
30328
|
// First kick off the effect on the local device before starting the camera in the call.
|
30319
30329
|
// This prevents the effect not being applied for a brief moment when the camera is started.
|
@@ -30338,8 +30348,8 @@ class AzureCommunicationCallAdapter {
|
|
30338
30348
|
});
|
30339
30349
|
}
|
30340
30350
|
stopCamera() {
|
30341
|
-
return __awaiter$
|
30342
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30351
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30352
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30343
30353
|
if (isCameraOn(this.getState())) {
|
30344
30354
|
yield this.handlers.onToggleCamera();
|
30345
30355
|
}
|
@@ -30347,8 +30357,8 @@ class AzureCommunicationCallAdapter {
|
|
30347
30357
|
});
|
30348
30358
|
}
|
30349
30359
|
mute() {
|
30350
|
-
return __awaiter$
|
30351
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30360
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30361
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30352
30362
|
var _a, _b;
|
30353
30363
|
this.context.setIsLocalMicrophoneEnabled(false);
|
30354
30364
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && !((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -30358,8 +30368,8 @@ class AzureCommunicationCallAdapter {
|
|
30358
30368
|
});
|
30359
30369
|
}
|
30360
30370
|
unmute() {
|
30361
|
-
return __awaiter$
|
30362
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30371
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30372
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30363
30373
|
var _a, _b;
|
30364
30374
|
this.context.setIsLocalMicrophoneEnabled(true);
|
30365
30375
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -30369,8 +30379,8 @@ class AzureCommunicationCallAdapter {
|
|
30369
30379
|
});
|
30370
30380
|
}
|
30371
30381
|
startScreenShare() {
|
30372
|
-
return __awaiter$
|
30373
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30382
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30383
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30374
30384
|
var _a;
|
30375
30385
|
if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {
|
30376
30386
|
yield this.handlers.onToggleScreenShare();
|
@@ -30379,8 +30389,8 @@ class AzureCommunicationCallAdapter {
|
|
30379
30389
|
});
|
30380
30390
|
}
|
30381
30391
|
stopScreenShare() {
|
30382
|
-
return __awaiter$
|
30383
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30392
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30393
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30384
30394
|
var _a;
|
30385
30395
|
if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {
|
30386
30396
|
yield this.handlers.onToggleScreenShare();
|
@@ -30390,16 +30400,16 @@ class AzureCommunicationCallAdapter {
|
|
30390
30400
|
}
|
30391
30401
|
/* @conditional-compile-remove(raise-hand) */
|
30392
30402
|
raiseHand() {
|
30393
|
-
return __awaiter$
|
30394
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30403
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30404
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30395
30405
|
yield this.handlers.onToggleRaiseHand();
|
30396
30406
|
}));
|
30397
30407
|
});
|
30398
30408
|
}
|
30399
30409
|
/* @conditional-compile-remove(raise-hand) */
|
30400
30410
|
lowerHand() {
|
30401
|
-
return __awaiter$
|
30402
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
30411
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30412
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$6(this, void 0, void 0, function* () {
|
30403
30413
|
yield this.handlers.onToggleRaiseHand();
|
30404
30414
|
}));
|
30405
30415
|
});
|
@@ -30411,7 +30421,7 @@ class AzureCommunicationCallAdapter {
|
|
30411
30421
|
}
|
30412
30422
|
/* @conditional-compile-remove(video-background-effects) */
|
30413
30423
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
30414
|
-
return __awaiter$
|
30424
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30415
30425
|
if (this.isBlurEffect(videoBackgroundEffect)) {
|
30416
30426
|
const blurConfig = videoBackgroundEffect;
|
30417
30427
|
yield this.handlers.onBlurVideoBackground(blurConfig);
|
@@ -30424,7 +30434,7 @@ class AzureCommunicationCallAdapter {
|
|
30424
30434
|
}
|
30425
30435
|
/* @conditional-compile-remove(video-background-effects) */
|
30426
30436
|
stopVideoBackgroundEffects() {
|
30427
|
-
return __awaiter$
|
30437
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30428
30438
|
yield this.handlers.onRemoveVideoBackgroundEffects();
|
30429
30439
|
});
|
30430
30440
|
}
|
@@ -30487,7 +30497,7 @@ class AzureCommunicationCallAdapter {
|
|
30487
30497
|
return effect.effectName === 'replacement';
|
30488
30498
|
}
|
30489
30499
|
removeParticipant(userId) {
|
30490
|
-
return __awaiter$
|
30500
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30491
30501
|
let participant = userId;
|
30492
30502
|
/* @conditional-compile-remove(PSTN-calls) */
|
30493
30503
|
participant = _toCommunicationIdentifier(userId);
|
@@ -30496,7 +30506,7 @@ class AzureCommunicationCallAdapter {
|
|
30496
30506
|
}
|
30497
30507
|
/* @conditional-compile-remove(PSTN-calls) */
|
30498
30508
|
addParticipant(participant, options) {
|
30499
|
-
return __awaiter$
|
30509
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30500
30510
|
if (communicationCommon.isPhoneNumberIdentifier(participant) && options) {
|
30501
30511
|
this.handlers.onAddParticipant(participant, options);
|
30502
30512
|
}
|
@@ -30508,7 +30518,7 @@ class AzureCommunicationCallAdapter {
|
|
30508
30518
|
/* @conditional-compile-remove(PSTN-calls) */
|
30509
30519
|
holdCall() {
|
30510
30520
|
var _a;
|
30511
|
-
return __awaiter$
|
30521
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30512
30522
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) !== 'LocalHold') {
|
30513
30523
|
this.handlers.onToggleHold();
|
30514
30524
|
}
|
@@ -30517,7 +30527,7 @@ class AzureCommunicationCallAdapter {
|
|
30517
30527
|
/* @conditional-compile-remove(PSTN-calls) */
|
30518
30528
|
resumeCall() {
|
30519
30529
|
var _a;
|
30520
|
-
return __awaiter$
|
30530
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30521
30531
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
|
30522
30532
|
this.handlers.onToggleHold();
|
30523
30533
|
}
|
@@ -30525,31 +30535,31 @@ class AzureCommunicationCallAdapter {
|
|
30525
30535
|
}
|
30526
30536
|
/* @conditional-compile-remove(PSTN-calls) */
|
30527
30537
|
sendDtmfTone(dtmfTone) {
|
30528
|
-
return __awaiter$
|
30538
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30529
30539
|
this.handlers.onSendDtmfTone(dtmfTone);
|
30530
30540
|
});
|
30531
30541
|
}
|
30532
30542
|
/* @conditional-compile-remove(close-captions) */
|
30533
30543
|
startCaptions(options) {
|
30534
|
-
return __awaiter$
|
30544
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30535
30545
|
this.handlers.onStartCaptions(options);
|
30536
30546
|
});
|
30537
30547
|
}
|
30538
30548
|
/* @conditional-compile-remove(close-captions) */
|
30539
30549
|
stopCaptions() {
|
30540
|
-
return __awaiter$
|
30550
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30541
30551
|
this.handlers.onStopCaptions();
|
30542
30552
|
});
|
30543
30553
|
}
|
30544
30554
|
/* @conditional-compile-remove(close-captions) */
|
30545
30555
|
setCaptionLanguage(language) {
|
30546
|
-
return __awaiter$
|
30556
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30547
30557
|
this.handlers.onSetCaptionLanguage(language);
|
30548
30558
|
});
|
30549
30559
|
}
|
30550
30560
|
/* @conditional-compile-remove(close-captions) */
|
30551
30561
|
setSpokenLanguage(language) {
|
30552
|
-
return __awaiter$
|
30562
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30553
30563
|
this.handlers.onSetSpokenLanguage(language);
|
30554
30564
|
});
|
30555
30565
|
}
|
@@ -30710,7 +30720,7 @@ class AzureCommunicationCallAdapter {
|
|
30710
30720
|
this.emitter.off(event, listener);
|
30711
30721
|
}
|
30712
30722
|
asyncTeeErrorToEventEmitter(f) {
|
30713
|
-
return __awaiter$
|
30723
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
30714
30724
|
try {
|
30715
30725
|
return yield f();
|
30716
30726
|
}
|
@@ -30745,7 +30755,7 @@ class AzureCommunicationCallAdapter {
|
|
30745
30755
|
*/
|
30746
30756
|
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
|
30747
30757
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
30748
|
-
/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter$
|
30758
|
+
/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter$6(void 0, void 0, void 0, function* () {
|
30749
30759
|
if (!_isValidIdentifier(userId)) {
|
30750
30760
|
throw new Error('Invalid identifier. Please provide valid identifier object.');
|
30751
30761
|
}
|
@@ -30764,7 +30774,7 @@ const createAzureCommunicationCallAdapter = ({ userId, displayName, credential,
|
|
30764
30774
|
/**
|
30765
30775
|
* @beta
|
30766
30776
|
*/
|
30767
|
-
const createTeamsCallAdapter = ({ userId, credential, locator, options }) => __awaiter$
|
30777
|
+
const createTeamsCallAdapter = ({ userId, credential, locator, options }) => __awaiter$6(void 0, void 0, void 0, function* () {
|
30768
30778
|
const callClient = createStatefulCallClient({
|
30769
30779
|
userId
|
30770
30780
|
});
|
@@ -30804,7 +30814,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
30804
30814
|
if (adapterKind === 'AzureCommunication' && !displayName) {
|
30805
30815
|
return;
|
30806
30816
|
}
|
30807
|
-
(() => __awaiter$
|
30817
|
+
(() => __awaiter$6(void 0, void 0, void 0, function* () {
|
30808
30818
|
if (adapterRef.current) {
|
30809
30819
|
// Dispose the old adapter when a new one is created.
|
30810
30820
|
//
|
@@ -30883,7 +30893,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
30883
30893
|
// Dispose any existing adapter when the component unmounts.
|
30884
30894
|
React.useEffect(() => {
|
30885
30895
|
return () => {
|
30886
|
-
(() => __awaiter$
|
30896
|
+
(() => __awaiter$6(void 0, void 0, void 0, function* () {
|
30887
30897
|
if (adapterRef.current) {
|
30888
30898
|
if (beforeDisposeRef.current) {
|
30889
30899
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -30977,7 +30987,7 @@ beforeDispose) => {
|
|
30977
30987
|
*
|
30978
30988
|
* @public
|
30979
30989
|
*/
|
30980
|
-
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$
|
30990
|
+
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$6(void 0, void 0, void 0, function* () {
|
30981
30991
|
const deviceManager = (yield callClient.getDeviceManager());
|
30982
30992
|
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);
|
30983
30993
|
if (deviceManager.isSpeakerSelectionAvailable) {
|
@@ -30997,7 +31007,7 @@ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, lo
|
|
30997
31007
|
*
|
30998
31008
|
* @beta
|
30999
31009
|
*/
|
31000
|
-
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$
|
31010
|
+
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$6(void 0, void 0, void 0, function* () {
|
31001
31011
|
const deviceManager = (yield callClient.getDeviceManager());
|
31002
31012
|
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);
|
31003
31013
|
if (deviceManager.isSpeakerSelectionAvailable) {
|
@@ -31016,6 +31026,258 @@ const isOutboundCall = (callLocator) => {
|
|
31016
31026
|
return 'participantIds' in callLocator;
|
31017
31027
|
};
|
31018
31028
|
|
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
|
+
|
31019
31281
|
// Copyright (c) Microsoft Corporation.
|
31020
31282
|
/**
|
31021
31283
|
* @private
|
@@ -33099,6 +33361,7 @@ exports.UnsupportedOperatingSystem = UnsupportedOperatingSystem$k;
|
|
33099
33361
|
exports.VideoGallery = VideoGallery;
|
33100
33362
|
exports.VideoTile = VideoTile;
|
33101
33363
|
exports._IdentifierProvider = _IdentifierProvider;
|
33364
|
+
exports._MockCallAdapter = _MockCallAdapter;
|
33102
33365
|
exports.createAzureCommunicationCallAdapter = createAzureCommunicationCallAdapter;
|
33103
33366
|
exports.createAzureCommunicationCallAdapterFromClient = createAzureCommunicationCallAdapterFromClient;
|
33104
33367
|
exports.createAzureCommunicationCallWithChatAdapter = createAzureCommunicationCallWithChatAdapter;
|