@azure/communication-react 1.12.1-alpha-202401260012 → 1.12.1-alpha-202401280013
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 +75 -8
- package/dist/dist-cjs/communication-react/index.js +823 -780
- 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/chat-component-bindings/src/messageThreadSelector.js +33 -10
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.d.ts +4 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +26 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.d.ts +32 -0
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +127 -0
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +1 -0
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js +2 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +0 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +0 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +0 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +0 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +0 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +0 -27
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js +0 -13
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +8 -2
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +12 -5
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +6 -2
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/MessageThread.js +0 -28
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ReactionButton.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/ReactionButton.js +23 -15
- package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +5 -2
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +20 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +14 -5
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoTile.js +28 -9
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js +2 -1
- package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +19 -16
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +4 -1
- package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.d.ts +0 -5
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js +0 -12
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +1 -1
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +45 -0
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js +4 -0
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/types/index.js +1 -0
- package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -34
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +3 -36
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +8 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +10 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +1 -13
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/package.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +0 -17
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +0 -42
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +0 -11
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +0 -40
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +0 -1
@@ -173,7 +173,7 @@ function getDefaultExportFromCjs (x) {
|
|
173
173
|
// Copyright (c) Microsoft Corporation.
|
174
174
|
// Licensed under the MIT License.
|
175
175
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
176
|
-
var telemetryVersion = '1.12.1-alpha-
|
176
|
+
var telemetryVersion = '1.12.1-alpha-202401280013';
|
177
177
|
|
178
178
|
|
179
179
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -525,7 +525,7 @@ const getSupportedSpokenLanguages = (state, props) => {
|
|
525
525
|
|
526
526
|
// Copyright (c) Microsoft Corporation.
|
527
527
|
// Licensed under the MIT License.
|
528
|
-
var __awaiter$
|
528
|
+
var __awaiter$P = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
529
529
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
530
530
|
return new (P || (P = Promise))(function (resolve, reject) {
|
531
531
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -564,7 +564,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
564
564
|
*
|
565
565
|
* @private
|
566
566
|
*/
|
567
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
567
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$P(void 0, void 0, void 0, function* () {
|
568
568
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
569
569
|
for (const view of unparentedViews) {
|
570
570
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -772,7 +772,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
772
772
|
|
773
773
|
// Copyright (c) Microsoft Corporation.
|
774
774
|
// Licensed under the MIT License.
|
775
|
-
var __awaiter$
|
775
|
+
var __awaiter$O = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
776
776
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
777
777
|
return new (P || (P = Promise))(function (resolve, reject) {
|
778
778
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -793,7 +793,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
793
793
|
* @private
|
794
794
|
*/
|
795
795
|
const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager, call, options) => {
|
796
|
-
const onStartLocalVideo = () => __awaiter$
|
796
|
+
const onStartLocalVideo = () => __awaiter$O(void 0, void 0, void 0, function* () {
|
797
797
|
// Before the call object creates a stream, dispose of any local preview streams.
|
798
798
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
799
799
|
// of disposing and creating a new stream?
|
@@ -813,7 +813,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
813
813
|
yield call.startVideo(stream);
|
814
814
|
}
|
815
815
|
});
|
816
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
816
|
+
const onStopLocalVideo = (stream) => __awaiter$O(void 0, void 0, void 0, function* () {
|
817
817
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
818
818
|
if (!callId) {
|
819
819
|
return;
|
@@ -822,7 +822,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
822
822
|
yield call.stopVideo(stream);
|
823
823
|
}
|
824
824
|
});
|
825
|
-
const onToggleCamera = (options) => __awaiter$
|
825
|
+
const onToggleCamera = (options) => __awaiter$O(void 0, void 0, void 0, function* () {
|
826
826
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
827
827
|
// the disposal of the unparented views is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
828
828
|
// The root cause of the issue is caused by never transitioning the unparented view to the
|
@@ -879,19 +879,19 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
879
879
|
}
|
880
880
|
}
|
881
881
|
});
|
882
|
-
const onSelectMicrophone = (device) => __awaiter$
|
882
|
+
const onSelectMicrophone = (device) => __awaiter$O(void 0, void 0, void 0, function* () {
|
883
883
|
if (!deviceManager) {
|
884
884
|
return;
|
885
885
|
}
|
886
886
|
return deviceManager.selectMicrophone(device);
|
887
887
|
});
|
888
|
-
const onSelectSpeaker = (device) => __awaiter$
|
888
|
+
const onSelectSpeaker = (device) => __awaiter$O(void 0, void 0, void 0, function* () {
|
889
889
|
if (!deviceManager) {
|
890
890
|
return;
|
891
891
|
}
|
892
892
|
return deviceManager.selectSpeaker(device);
|
893
893
|
});
|
894
|
-
const onSelectCamera = (device, options) => __awaiter$
|
894
|
+
const onSelectCamera = (device, options) => __awaiter$O(void 0, void 0, void 0, function* () {
|
895
895
|
if (!deviceManager) {
|
896
896
|
return;
|
897
897
|
}
|
@@ -922,11 +922,11 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
922
922
|
}
|
923
923
|
});
|
924
924
|
/* @conditional-compile-remove(raise-hand) */
|
925
|
-
const onRaiseHand = () => __awaiter$
|
925
|
+
const onRaiseHand = () => __awaiter$O(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()); });
|
926
926
|
/* @conditional-compile-remove(raise-hand) */
|
927
|
-
const onLowerHand = () => __awaiter$
|
927
|
+
const onLowerHand = () => __awaiter$O(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()); });
|
928
928
|
/* @conditional-compile-remove(raise-hand) */
|
929
|
-
const onToggleRaiseHand = () => __awaiter$
|
929
|
+
const onToggleRaiseHand = () => __awaiter$O(void 0, void 0, void 0, function* () {
|
930
930
|
const raiseHandFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand);
|
931
931
|
const localUserId = callClient.getState().userId;
|
932
932
|
const isLocalRaisedHand = raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.getRaisedHands().find((publishedState) => toFlatCommunicationIdentifier(publishedState.identifier) === toFlatCommunicationIdentifier(localUserId));
|
@@ -938,7 +938,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
938
938
|
}
|
939
939
|
});
|
940
940
|
/* @conditional-compile-remove(reaction) */
|
941
|
-
const onReactionClicked = (reaction) => __awaiter$
|
941
|
+
const onReactionClicked = (reaction) => __awaiter$O(void 0, void 0, void 0, function* () {
|
942
942
|
var _c;
|
943
943
|
if (reaction === 'like' ||
|
944
944
|
reaction === 'applause' ||
|
@@ -952,19 +952,19 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
952
952
|
}
|
953
953
|
return;
|
954
954
|
});
|
955
|
-
const onToggleMicrophone = () => __awaiter$
|
955
|
+
const onToggleMicrophone = () => __awaiter$O(void 0, void 0, void 0, function* () {
|
956
956
|
if (!call || !(_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {
|
957
957
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
958
958
|
}
|
959
959
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
960
960
|
});
|
961
|
-
const onStartScreenShare = () => __awaiter$
|
962
|
-
const onStopScreenShare = () => __awaiter$
|
963
|
-
const onToggleScreenShare = () => __awaiter$
|
964
|
-
const onHangUp = (forEveryone) => __awaiter$
|
961
|
+
const onStartScreenShare = () => __awaiter$O(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
962
|
+
const onStopScreenShare = () => __awaiter$O(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
963
|
+
const onToggleScreenShare = () => __awaiter$O(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
964
|
+
const onHangUp = (forEveryone) => __awaiter$O(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
965
965
|
/* @conditional-compile-remove(PSTN-calls) */
|
966
|
-
const onToggleHold = () => __awaiter$
|
967
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
966
|
+
const onToggleHold = () => __awaiter$O(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()); });
|
967
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$O(void 0, void 0, void 0, function* () {
|
968
968
|
var _d;
|
969
969
|
if (!call || call.localVideoStreams.length === 0) {
|
970
970
|
return;
|
@@ -980,7 +980,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
980
980
|
const { view } = (_d = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _d !== void 0 ? _d : {};
|
981
981
|
return view ? { view } : undefined;
|
982
982
|
});
|
983
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
983
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$O(void 0, void 0, void 0, function* () {
|
984
984
|
if (!call) {
|
985
985
|
return;
|
986
986
|
}
|
@@ -1011,7 +1011,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1011
1011
|
}
|
1012
1012
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
1013
1013
|
});
|
1014
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
1014
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1015
1015
|
if (!call) {
|
1016
1016
|
return;
|
1017
1017
|
}
|
@@ -1032,7 +1032,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1032
1032
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
1033
1033
|
}
|
1034
1034
|
});
|
1035
|
-
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$
|
1035
|
+
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1036
1036
|
if (!call) {
|
1037
1037
|
return;
|
1038
1038
|
}
|
@@ -1049,7 +1049,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1049
1049
|
callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
|
1050
1050
|
}
|
1051
1051
|
});
|
1052
|
-
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$
|
1052
|
+
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1053
1053
|
if (!call) {
|
1054
1054
|
return;
|
1055
1055
|
}
|
@@ -1066,7 +1066,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1066
1066
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
1067
1067
|
}
|
1068
1068
|
});
|
1069
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
1069
|
+
const onDisposeLocalStreamView = () => __awaiter$O(void 0, void 0, void 0, function* () {
|
1070
1070
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
1071
1071
|
const callState = call && callClient.getState().calls[call.id];
|
1072
1072
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -1079,18 +1079,18 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1079
1079
|
yield disposeAllLocalPreviewViews(callClient);
|
1080
1080
|
});
|
1081
1081
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
1082
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
1082
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$O(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
1083
1083
|
const notImplemented = () => {
|
1084
1084
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
1085
1085
|
};
|
1086
1086
|
/* @conditional-compile-remove(call-readiness) */
|
1087
|
-
const askDevicePermission = (constrain) => __awaiter$
|
1087
|
+
const askDevicePermission = (constrain) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1088
1088
|
if (deviceManager) {
|
1089
1089
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
1090
1090
|
}
|
1091
1091
|
});
|
1092
1092
|
/* @conditional-compile-remove(video-background-effects) */
|
1093
|
-
const onRemoveVideoBackgroundEffects = () => __awaiter$
|
1093
|
+
const onRemoveVideoBackgroundEffects = () => __awaiter$O(void 0, void 0, void 0, function* () {
|
1094
1094
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1095
1095
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
1096
1096
|
if (stream) {
|
@@ -1103,7 +1103,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1103
1103
|
}
|
1104
1104
|
});
|
1105
1105
|
/* @conditional-compile-remove(video-background-effects) */
|
1106
|
-
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$
|
1106
|
+
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1107
1107
|
var _e;
|
1108
1108
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1109
1109
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
@@ -1117,7 +1117,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1117
1117
|
}
|
1118
1118
|
});
|
1119
1119
|
/* @conditional-compile-remove(video-background-effects) */
|
1120
|
-
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$
|
1120
|
+
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1121
1121
|
var _f;
|
1122
1122
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1123
1123
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
@@ -1131,34 +1131,34 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1131
1131
|
}
|
1132
1132
|
});
|
1133
1133
|
/* @conditional-compile-remove(close-captions) */
|
1134
|
-
const onStartCaptions = (options) => __awaiter$
|
1134
|
+
const onStartCaptions = (options) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1135
1135
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1136
1136
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.startCaptions(options));
|
1137
1137
|
});
|
1138
1138
|
/* @conditional-compile-remove(close-captions) */
|
1139
|
-
const onStopCaptions = () => __awaiter$
|
1139
|
+
const onStopCaptions = () => __awaiter$O(void 0, void 0, void 0, function* () {
|
1140
1140
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1141
1141
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.stopCaptions());
|
1142
1142
|
});
|
1143
1143
|
/* @conditional-compile-remove(close-captions) */
|
1144
|
-
const onSetSpokenLanguage = (language) => __awaiter$
|
1144
|
+
const onSetSpokenLanguage = (language) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1145
1145
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1146
1146
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.setSpokenLanguage(language));
|
1147
1147
|
});
|
1148
1148
|
/* @conditional-compile-remove(close-captions) */
|
1149
|
-
const onSetCaptionLanguage = (language) => __awaiter$
|
1149
|
+
const onSetCaptionLanguage = (language) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1150
1150
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1151
1151
|
yield captionsFeature.setCaptionLanguage(language);
|
1152
1152
|
});
|
1153
1153
|
/* @conditional-compile-remove(end-of-call-survey) */
|
1154
|
-
const onSubmitSurvey = (survey) => __awaiter$
|
1154
|
+
const onSubmitSurvey = (survey) => __awaiter$O(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.CallSurvey).submitSurvey(survey)); });
|
1155
1155
|
/* @conditional-compile-remove(spotlight) */
|
1156
|
-
const onStartSpotlight = (userId) => __awaiter$
|
1156
|
+
const onStartSpotlight = (userId) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1157
1157
|
const participant = _toCommunicationIdentifier(userId);
|
1158
1158
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).startSpotlight([participant]));
|
1159
1159
|
});
|
1160
1160
|
/* @conditional-compile-remove(spotlight) */
|
1161
|
-
const onStopSpotlight = (userId) => __awaiter$
|
1161
|
+
const onStopSpotlight = (userId) => __awaiter$O(void 0, void 0, void 0, function* () {
|
1162
1162
|
const participant = _toCommunicationIdentifier(userId);
|
1163
1163
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).stopSpotlight([participant]));
|
1164
1164
|
});
|
@@ -1221,7 +1221,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1221
1221
|
|
1222
1222
|
// Copyright (c) Microsoft Corporation.
|
1223
1223
|
// Licensed under the MIT License.
|
1224
|
-
var __awaiter$
|
1224
|
+
var __awaiter$N = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1225
1225
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1226
1226
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1227
1227
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1249,7 +1249,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1249
1249
|
return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);
|
1250
1250
|
},
|
1251
1251
|
/* @conditional-compile-remove(PSTN-calls) */
|
1252
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1252
|
+
onAddParticipant: (userId, options) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1253
1253
|
const participant = _toCommunicationIdentifier(userId);
|
1254
1254
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
1255
1255
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -1257,7 +1257,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1257
1257
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
1258
1258
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1259
1259
|
}
|
1260
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1260
|
+
}), onRemoveParticipant: (userId) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1261
1261
|
const participant = _toCommunicationIdentifier(userId);
|
1262
1262
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
1263
1263
|
}) });
|
@@ -1265,7 +1265,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1265
1265
|
|
1266
1266
|
// Copyright (c) Microsoft Corporation.
|
1267
1267
|
// Licensed under the MIT License.
|
1268
|
-
var __awaiter$
|
1268
|
+
var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1269
1269
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1270
1270
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1271
1271
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1297,7 +1297,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
|
|
1297
1297
|
},
|
1298
1298
|
/* @conditional-compile-remove(teams-identity-support) */
|
1299
1299
|
/* @conditional-compile-remove(PSTN-calls) */
|
1300
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1300
|
+
onAddParticipant: (userId, options) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1301
1301
|
const participant = _toCommunicationIdentifier(userId);
|
1302
1302
|
/* @conditional-compile-remove(teams-identity-support) */
|
1303
1303
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -1313,7 +1313,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
|
|
1313
1313
|
}
|
1314
1314
|
/* @conditional-compile-remove(teams-identity-support) */
|
1315
1315
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1316
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1316
|
+
}), onRemoveParticipant: (userId) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1317
1317
|
const participant = _toCommunicationIdentifier(userId);
|
1318
1318
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
1319
1319
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -1404,7 +1404,7 @@ const getCaptionsSpeakerIdentifier = (captions) => {
|
|
1404
1404
|
|
1405
1405
|
// Copyright (c) Microsoft Corporation.
|
1406
1406
|
// Licensed under the MIT License.
|
1407
|
-
var __awaiter$
|
1407
|
+
var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1408
1408
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1409
1409
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1410
1410
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1453,13 +1453,13 @@ class ProxyDeviceManager {
|
|
1453
1453
|
this.selectCamera = (videoDeviceInfo) => {
|
1454
1454
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
1455
1455
|
};
|
1456
|
-
this.videoDevicesUpdated = () => __awaiter$
|
1456
|
+
this.videoDevicesUpdated = () => __awaiter$L(this, void 0, void 0, function* () {
|
1457
1457
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
1458
1458
|
// We don't want to show that in the UI.
|
1459
1459
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
1460
1460
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
1461
1461
|
});
|
1462
|
-
this.audioDevicesUpdated = () => __awaiter$
|
1462
|
+
this.audioDevicesUpdated = () => __awaiter$L(this, void 0, void 0, function* () {
|
1463
1463
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
1464
1464
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
1465
1465
|
});
|
@@ -1860,7 +1860,7 @@ function convertFromSDKToRaisedHandState(raisedHand) {
|
|
1860
1860
|
|
1861
1861
|
// Copyright (c) Microsoft Corporation.
|
1862
1862
|
// Licensed under the MIT License.
|
1863
|
-
var __awaiter$
|
1863
|
+
var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1864
1864
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1865
1865
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1866
1866
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2679,7 +2679,7 @@ let CallContext$2 = class CallContext {
|
|
2679
2679
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
2680
2680
|
*/
|
2681
2681
|
withAsyncErrorTeedToState(action, target) {
|
2682
|
-
return (...args) => __awaiter$
|
2682
|
+
return (...args) => __awaiter$K(this, void 0, void 0, function* () {
|
2683
2683
|
try {
|
2684
2684
|
return yield action(...args);
|
2685
2685
|
}
|
@@ -3133,7 +3133,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
3133
3133
|
|
3134
3134
|
// Copyright (c) Microsoft Corporation.
|
3135
3135
|
// Licensed under the MIT License.
|
3136
|
-
var __awaiter$
|
3136
|
+
var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3137
3137
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3138
3138
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3139
3139
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3143,7 +3143,7 @@ var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
3143
3143
|
});
|
3144
3144
|
};
|
3145
3145
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
3146
|
-
return __awaiter$
|
3146
|
+
return __awaiter$J(this, void 0, void 0, function* () {
|
3147
3147
|
// we can only have 3 types of createView
|
3148
3148
|
let streamEventType;
|
3149
3149
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
@@ -3272,7 +3272,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
3272
3272
|
});
|
3273
3273
|
}
|
3274
3274
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
3275
|
-
return __awaiter$
|
3275
|
+
return __awaiter$J(this, void 0, void 0, function* () {
|
3276
3276
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
3277
3277
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
3278
3278
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -3441,7 +3441,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
3441
3441
|
// Render LocalVideoStream that is not part of a Call
|
3442
3442
|
// 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).
|
3443
3443
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
3444
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
3444
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$J(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
3445
3445
|
}
|
3446
3446
|
else {
|
3447
3447
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
@@ -4051,7 +4051,7 @@ class CallSubscriber {
|
|
4051
4051
|
|
4052
4052
|
// Copyright (c) Microsoft Corporation.
|
4053
4053
|
// Licensed under the MIT License.
|
4054
|
-
var __awaiter$
|
4054
|
+
var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4055
4055
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4056
4056
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4057
4057
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4071,14 +4071,14 @@ class ProxyIncomingCall {
|
|
4071
4071
|
switch (prop) {
|
4072
4072
|
case 'accept': {
|
4073
4073
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4074
|
-
return __awaiter$
|
4074
|
+
return __awaiter$I(this, void 0, void 0, function* () {
|
4075
4075
|
return yield target.accept(...args);
|
4076
4076
|
});
|
4077
4077
|
}, 'IncomingCall.accept');
|
4078
4078
|
}
|
4079
4079
|
case 'reject': {
|
4080
4080
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4081
|
-
return __awaiter$
|
4081
|
+
return __awaiter$I(this, void 0, void 0, function* () {
|
4082
4082
|
return yield target.reject(...args);
|
4083
4083
|
});
|
4084
4084
|
}, 'IncomingCall.reject');
|
@@ -4319,7 +4319,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
4319
4319
|
|
4320
4320
|
// Copyright (c) Microsoft Corporation.
|
4321
4321
|
// Licensed under the MIT License.
|
4322
|
-
var __awaiter$
|
4322
|
+
var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4323
4323
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4324
4324
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4325
4325
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4345,56 +4345,56 @@ class ProxyCallCommon {
|
|
4345
4345
|
switch (prop) {
|
4346
4346
|
case 'mute': {
|
4347
4347
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4348
|
-
return __awaiter$
|
4348
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
4349
4349
|
return yield target.mute(...args);
|
4350
4350
|
});
|
4351
4351
|
}, 'Call.mute');
|
4352
4352
|
}
|
4353
4353
|
case 'unmute': {
|
4354
4354
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4355
|
-
return __awaiter$
|
4355
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
4356
4356
|
return yield target.unmute(...args);
|
4357
4357
|
});
|
4358
4358
|
}, 'Call.unmute');
|
4359
4359
|
}
|
4360
4360
|
case 'startVideo': {
|
4361
4361
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4362
|
-
return __awaiter$
|
4362
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
4363
4363
|
return yield target.startVideo(...args);
|
4364
4364
|
});
|
4365
4365
|
}, 'Call.startVideo');
|
4366
4366
|
}
|
4367
4367
|
case 'stopVideo': {
|
4368
4368
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4369
|
-
return __awaiter$
|
4369
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
4370
4370
|
return yield target.stopVideo(...args);
|
4371
4371
|
});
|
4372
4372
|
}, 'Call.stopVideo');
|
4373
4373
|
}
|
4374
4374
|
case 'startScreenSharing': {
|
4375
4375
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4376
|
-
return __awaiter$
|
4376
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
4377
4377
|
return yield target.startScreenSharing(...args);
|
4378
4378
|
});
|
4379
4379
|
}, 'Call.startScreenSharing');
|
4380
4380
|
}
|
4381
4381
|
case 'stopScreenSharing': {
|
4382
4382
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4383
|
-
return __awaiter$
|
4383
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
4384
4384
|
return yield target.stopScreenSharing(...args);
|
4385
4385
|
});
|
4386
4386
|
}, 'Call.stopScreenSharing');
|
4387
4387
|
}
|
4388
4388
|
case 'hold': {
|
4389
4389
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4390
|
-
return __awaiter$
|
4390
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
4391
4391
|
return yield target.hold(...args);
|
4392
4392
|
});
|
4393
4393
|
}, 'Call.hold');
|
4394
4394
|
}
|
4395
4395
|
case 'resume': {
|
4396
4396
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4397
|
-
return __awaiter$
|
4397
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
4398
4398
|
return yield target.resume(...args);
|
4399
4399
|
});
|
4400
4400
|
}, 'Call.resume');
|
@@ -4434,7 +4434,7 @@ class ProxyTeamsCaptions {
|
|
4434
4434
|
get(target, prop) {
|
4435
4435
|
switch (prop) {
|
4436
4436
|
case 'startCaptions':
|
4437
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4437
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$H(this, void 0, void 0, function* () {
|
4438
4438
|
var _a, _b;
|
4439
4439
|
this._context.setStartCaptionsInProgress(this._call.id, true);
|
4440
4440
|
const ret = yield target.startCaptions(...args);
|
@@ -4442,7 +4442,7 @@ class ProxyTeamsCaptions {
|
|
4442
4442
|
return ret;
|
4443
4443
|
}), 'Call.feature');
|
4444
4444
|
case 'stopCaptions':
|
4445
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4445
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$H(this, void 0, void 0, function* () {
|
4446
4446
|
const ret = yield target.stopCaptions(...args);
|
4447
4447
|
this._context.setIsCaptionActive(this._call.id, false);
|
4448
4448
|
this._context.setStartCaptionsInProgress(this._call.id, false);
|
@@ -4450,13 +4450,13 @@ class ProxyTeamsCaptions {
|
|
4450
4450
|
return ret;
|
4451
4451
|
}), 'Call.feature');
|
4452
4452
|
case 'setSpokenLanguage':
|
4453
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4453
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$H(this, void 0, void 0, function* () {
|
4454
4454
|
const ret = yield target.setSpokenLanguage(...args);
|
4455
4455
|
this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
|
4456
4456
|
return ret;
|
4457
4457
|
}), 'Call.feature');
|
4458
4458
|
case 'setCaptionLanguage':
|
4459
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4459
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$H(this, void 0, void 0, function* () {
|
4460
4460
|
const ret = yield target.setCaptionLanguage(...args);
|
4461
4461
|
this._context.setSelectedCaptionLanguage(this._call.id, args[0]);
|
4462
4462
|
return ret;
|
@@ -4504,7 +4504,7 @@ class ProxyTransferCallFeature {
|
|
4504
4504
|
|
4505
4505
|
// Copyright (c) Microsoft Corporation.
|
4506
4506
|
// Licensed under the MIT License.
|
4507
|
-
var __awaiter$
|
4507
|
+
var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4508
4508
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4509
4509
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4510
4510
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4518,7 +4518,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
4518
4518
|
switch (prop) {
|
4519
4519
|
case 'addParticipant': {
|
4520
4520
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4521
|
-
return __awaiter$
|
4521
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
4522
4522
|
return yield target.addParticipant(...args);
|
4523
4523
|
});
|
4524
4524
|
}, 'Call.addParticipant');
|
@@ -4756,7 +4756,7 @@ class InternalCallContext {
|
|
4756
4756
|
|
4757
4757
|
// Copyright (c) Microsoft Corporation.
|
4758
4758
|
// Licensed under the MIT License.
|
4759
|
-
var __awaiter$
|
4759
|
+
var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4760
4760
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4761
4761
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4762
4762
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4771,7 +4771,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
4771
4771
|
switch (prop) {
|
4772
4772
|
case 'addParticipant': {
|
4773
4773
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4774
|
-
return __awaiter$
|
4774
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
4775
4775
|
return yield target.addParticipant(...args);
|
4776
4776
|
});
|
4777
4777
|
}, 'TeamsCall.addParticipant');
|
@@ -4888,7 +4888,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
4888
4888
|
|
4889
4889
|
// Copyright (c) Microsoft Corporation.
|
4890
4890
|
// Licensed under the MIT License.
|
4891
|
-
var __awaiter$
|
4891
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4892
4892
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4893
4893
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4894
4894
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4910,7 +4910,7 @@ class ProxyVideoStreamRendererView {
|
|
4910
4910
|
get(target, prop) {
|
4911
4911
|
switch (prop) {
|
4912
4912
|
case 'updateScalingMode': {
|
4913
|
-
return (...args) => __awaiter$
|
4913
|
+
return (...args) => __awaiter$E(this, void 0, void 0, function* () {
|
4914
4914
|
yield target.updateScalingMode(...args);
|
4915
4915
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
4916
4916
|
});
|
@@ -4931,7 +4931,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
4931
4931
|
|
4932
4932
|
// Copyright (c) Microsoft Corporation.
|
4933
4933
|
// Licensed under the MIT License.
|
4934
|
-
var __awaiter$
|
4934
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4935
4935
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4936
4936
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4937
4937
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4953,7 +4953,7 @@ class ProxyCallClient {
|
|
4953
4953
|
get(target, prop) {
|
4954
4954
|
switch (prop) {
|
4955
4955
|
case 'createCallAgent': {
|
4956
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4956
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
4957
4957
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4958
4958
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4959
4959
|
// callAgent if the createCallAgent succeeds.
|
@@ -4966,7 +4966,7 @@ class ProxyCallClient {
|
|
4966
4966
|
}), 'CallClient.createCallAgent');
|
4967
4967
|
}
|
4968
4968
|
case 'createTeamsCallAgent': {
|
4969
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4969
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
4970
4970
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4971
4971
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4972
4972
|
// callAgent if the createCallAgent succeeds.
|
@@ -4979,7 +4979,7 @@ class ProxyCallClient {
|
|
4979
4979
|
}), 'CallClient.createTeamsCallAgent');
|
4980
4980
|
}
|
4981
4981
|
case 'getDeviceManager': {
|
4982
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
4982
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$D(this, void 0, void 0, function* () {
|
4983
4983
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
4984
4984
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
4985
4985
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -5008,7 +5008,7 @@ class ProxyCallClient {
|
|
5008
5008
|
/**
|
5009
5009
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
5010
5010
|
*/
|
5011
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
5011
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$D(this, void 0, void 0, function* () {
|
5012
5012
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
5013
5013
|
this._context.setEnvironmentInfo(environmentInfo);
|
5014
5014
|
return environmentInfo;
|
@@ -5069,7 +5069,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
5069
5069
|
});
|
5070
5070
|
Object.defineProperty(callClient, 'createView', {
|
5071
5071
|
configurable: false,
|
5072
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
5072
|
+
value: (callId, participantId, stream, options) => __awaiter$D(void 0, void 0, void 0, function* () {
|
5073
5073
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
5074
5074
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
5075
5075
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -7618,7 +7618,7 @@ const _MentionPopover = (props) => {
|
|
7618
7618
|
|
7619
7619
|
// Copyright (c) Microsoft Corporation.
|
7620
7620
|
// Licensed under the MIT License.
|
7621
|
-
var __awaiter$
|
7621
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7622
7622
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7623
7623
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7624
7624
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7804,7 +7804,7 @@ const TextFieldWithMention = (props) => {
|
|
7804
7804
|
onSuggestionSelected,
|
7805
7805
|
updateMentionSuggestions
|
7806
7806
|
]);
|
7807
|
-
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$
|
7807
|
+
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$C(void 0, void 0, void 0, function* () {
|
7808
7808
|
var _a;
|
7809
7809
|
let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
|
7810
7810
|
suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
|
@@ -7981,7 +7981,7 @@ const TextFieldWithMention = (props) => {
|
|
7981
7981
|
});
|
7982
7982
|
}
|
7983
7983
|
}, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
|
7984
|
-
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$
|
7984
|
+
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$C(void 0, void 0, void 0, function* () {
|
7985
7985
|
var _b;
|
7986
7986
|
debouncedQueryUpdate.cancel();
|
7987
7987
|
if (event.currentTarget === null) {
|
@@ -10534,27 +10534,6 @@ const MessageContentWithLiveAria = (props) => {
|
|
10534
10534
|
props.content));
|
10535
10535
|
};
|
10536
10536
|
const MessageContentAsRichTextHTML = (props) => {
|
10537
|
-
const {
|
10538
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10539
|
-
// message is used only in useEffect that is under teams-inline-images-and-file-sharing cc
|
10540
|
-
message,
|
10541
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10542
|
-
attachmentsMap,
|
10543
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10544
|
-
onFetchAttachments } = props;
|
10545
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10546
|
-
React.useEffect(() => {
|
10547
|
-
var _a;
|
10548
|
-
if (!attachmentsMap || !onFetchAttachments) {
|
10549
|
-
return;
|
10550
|
-
}
|
10551
|
-
const attachments = (_a = message.inlineImages) === null || _a === void 0 ? void 0 : _a.filter((inlinedImages) => {
|
10552
|
-
return attachmentsMap[inlinedImages.id] === undefined;
|
10553
|
-
});
|
10554
|
-
if (attachments && attachments.length > 0) {
|
10555
|
-
onFetchAttachments(attachments, message.messageId);
|
10556
|
-
}
|
10557
|
-
}, [message.inlineImages, message.messageId, onFetchAttachments, attachmentsMap]);
|
10558
10537
|
return (React.createElement(MessageContentWithLiveAria, { message: props.message, liveMessage: generateLiveMessage(props), ariaLabel: messageContentAriaText(props), content: processHtmlToReact(props) }));
|
10559
10538
|
};
|
10560
10539
|
const MessageContentAsText = (props) => {
|
@@ -10630,10 +10609,6 @@ const processHtmlToReact = (props) => {
|
|
10630
10609
|
return metadata.id === domNode.attribs.id;
|
10631
10610
|
}))) {
|
10632
10611
|
domNode.attribs['aria-label'] = domNode.attribs.name;
|
10633
|
-
// logic to check id in map/list
|
10634
|
-
if (props.attachmentsMap && domNode.attribs.id in props.attachmentsMap) {
|
10635
|
-
domNode.attribs.src = props.attachmentsMap[domNode.attribs.id];
|
10636
|
-
}
|
10637
10612
|
/* @conditional-compile-remove(image-gallery) */
|
10638
10613
|
const handleOnClick = () => {
|
10639
10614
|
props.onInlineImageClicked && props.onInlineImageClicked(domNode.attribs.id);
|
@@ -10682,7 +10657,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
10682
10657
|
|
10683
10658
|
// Copyright (c) Microsoft Corporation.
|
10684
10659
|
// Licensed under the MIT License.
|
10685
|
-
var __awaiter$
|
10660
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10686
10661
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10687
10662
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10688
10663
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10725,7 +10700,7 @@ const _FileDownloadCards = (props) => {
|
|
10725
10700
|
fileCount: `${(_c = fileMetadata === null || fileMetadata === void 0 ? void 0 : fileMetadata.filter(isFileSharingAttachment).length) !== null && _c !== void 0 ? _c : 0}`
|
10726
10701
|
});
|
10727
10702
|
}, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);
|
10728
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
10703
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$B(void 0, void 0, void 0, function* () {
|
10729
10704
|
if (!props.downloadHandler) {
|
10730
10705
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
10731
10706
|
}
|
@@ -10777,7 +10752,7 @@ const useLocaleStringsTrampoline = () => {
|
|
10777
10752
|
|
10778
10753
|
// Copyright (c) Microsoft Corporation.
|
10779
10754
|
// Licensed under the MIT License.
|
10780
|
-
var __awaiter$
|
10755
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10781
10756
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10782
10757
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10783
10758
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10878,7 +10853,7 @@ const MessageBubble = (props) => {
|
|
10878
10853
|
return undefined;
|
10879
10854
|
}, [editedOn, message.messageType, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
10880
10855
|
/* @conditional-compile-remove(image-gallery) */
|
10881
|
-
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$
|
10856
|
+
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$A(void 0, void 0, void 0, function* () {
|
10882
10857
|
if (onInlineImageClicked === undefined) {
|
10883
10858
|
return;
|
10884
10859
|
}
|
@@ -10892,10 +10867,6 @@ const MessageBubble = (props) => {
|
|
10892
10867
|
}
|
10893
10868
|
return (React.createElement("div", { tabIndex: 0, className: "ui-chat__message__content" },
|
10894
10869
|
React.createElement(ChatMessageContent, { message: message, strings: strings,
|
10895
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10896
|
-
onFetchAttachments: props.onFetchAttachments,
|
10897
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10898
|
-
attachmentsMap: props.attachmentsMap,
|
10899
10870
|
/* @conditional-compile-remove(mention) */
|
10900
10871
|
mentionDisplayOptions: props.mentionDisplayOptions,
|
10901
10872
|
/* @conditional-compile-remove(image-gallery) */
|
@@ -10998,7 +10969,7 @@ const ChatMessageComponentAsMessageBubble = React.memo(MessageBubble);
|
|
10998
10969
|
|
10999
10970
|
// Copyright (c) Microsoft Corporation.
|
11000
10971
|
// Licensed under the MIT License.
|
11001
|
-
var __awaiter$
|
10972
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11002
10973
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11003
10974
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11004
10975
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11031,7 +11002,7 @@ const ChatMessageComponent = (props) => {
|
|
11031
11002
|
onSendMessage && onSendMessage(content !== undefined ? content : '');
|
11032
11003
|
}, [clientMessageId, content, onSendMessage, onDeleteMessage]);
|
11033
11004
|
if (isEditing && message.messageType === 'chat') {
|
11034
|
-
return (React.createElement(ChatMessageComponentAsEditBox, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
11005
|
+
return (React.createElement(ChatMessageComponentAsEditBox, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$z(void 0, void 0, void 0, function* () {
|
11035
11006
|
props.onUpdateMessage &&
|
11036
11007
|
message.messageId &&
|
11037
11008
|
(yield props.onUpdateMessage(message.messageId, text, metadata, options));
|
@@ -11047,12 +11018,8 @@ const ChatMessageComponent = (props) => {
|
|
11047
11018
|
return (React.createElement(ChatMessageComponentAsMessageBubble, Object.assign({}, props, { onRemoveClick: onRemoveClick, onEditClick: onEditClick, onResendClick: onResendClick, onRenderAvatar: props.onRenderAvatar,
|
11048
11019
|
/* @conditional-compile-remove(date-time-customization) */
|
11049
11020
|
onDisplayDateTimeString: props.onDisplayDateTimeString, strings: props.strings,
|
11050
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11051
|
-
onFetchAttachments: props.onFetchAttachments,
|
11052
11021
|
/* @conditional-compile-remove(image-gallery) */
|
11053
11022
|
onInlineImageClicked: props.onInlineImageClicked,
|
11054
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11055
|
-
attachmentsMap: props.attachmentsMap,
|
11056
11023
|
/* @conditional-compile-remove(mention) */
|
11057
11024
|
mentionDisplayOptions: (_b = props.mentionOptions) === null || _b === void 0 ? void 0 : _b.displayOptions })));
|
11058
11025
|
}
|
@@ -11072,12 +11039,8 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
11072
11039
|
const { message, styles, shouldOverlapAvatarAndMessage, onRenderMessage, onRenderAvatar, showMessageStatus, onRenderMessageStatus, participantCount, readCount, onActionButtonClick,
|
11073
11040
|
/* @conditional-compile-remove(date-time-customization) */
|
11074
11041
|
onDisplayDateTimeString,
|
11075
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11076
|
-
onFetchInlineAttachment,
|
11077
11042
|
/* @conditional-compile-remove(image-gallery) */
|
11078
11043
|
onInlineImageClicked,
|
11079
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11080
|
-
inlineAttachments,
|
11081
11044
|
/* @conditional-compile-remove(mention) */
|
11082
11045
|
mentionOptions,
|
11083
11046
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -11092,7 +11055,6 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
11092
11055
|
// To rerender the defaultChatMessageRenderer if app running across days(every new day chat time stamp
|
11093
11056
|
// needs to be regenerated), the dependency on "new Date().toDateString()"" is added.
|
11094
11057
|
const defaultChatMessageRenderer = React.useCallback((messageProps) => {
|
11095
|
-
var _a;
|
11096
11058
|
if (messageProps.message.messageType === 'chat' ||
|
11097
11059
|
/* @conditional-compile-remove(data-loss-prevention) */ messageProps.message.messageType === 'blocked') {
|
11098
11060
|
return (React.createElement(ChatMessageComponent, Object.assign({}, messageProps, {
|
@@ -11102,12 +11064,8 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
11102
11064
|
strings: messageProps.strings, message: messageProps.message, userId: userId, remoteParticipantsCount: participantCount ? participantCount - 1 : 0, shouldOverlapAvatarAndMessage: shouldOverlapAvatarAndMessage, onRenderAvatar: onRenderAvatar, showMessageStatus: showMessageStatus, messageStatus: messageProps.message.status, onActionButtonClick: onActionButtonClick,
|
11103
11065
|
/* @conditional-compile-remove(date-time-customization) */
|
11104
11066
|
onDisplayDateTimeString: onDisplayDateTimeString,
|
11105
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11106
|
-
onFetchAttachments: onFetchInlineAttachment,
|
11107
11067
|
/* @conditional-compile-remove(image-gallery) */
|
11108
11068
|
onInlineImageClicked: onInlineImageClicked,
|
11109
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11110
|
-
attachmentsMap: (_a = inlineAttachments[messageProps.message.messageId]) !== null && _a !== void 0 ? _a : {},
|
11111
11069
|
/* @conditional-compile-remove(mention) */
|
11112
11070
|
mentionOptions: mentionOptions,
|
11113
11071
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -11124,12 +11082,8 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
11124
11082
|
userId,
|
11125
11083
|
/* @conditional-compile-remove(date-time-customization) */
|
11126
11084
|
onDisplayDateTimeString,
|
11127
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11128
|
-
onFetchInlineAttachment,
|
11129
11085
|
/* @conditional-compile-remove(image-gallery) */
|
11130
11086
|
onInlineImageClicked,
|
11131
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11132
|
-
inlineAttachments,
|
11133
11087
|
/* @conditional-compile-remove(mention) */
|
11134
11088
|
mentionOptions,
|
11135
11089
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -11342,7 +11296,7 @@ const ChatMessageComponentWrapper = (props) => {
|
|
11342
11296
|
|
11343
11297
|
// Copyright (c) Microsoft Corporation.
|
11344
11298
|
// Licensed under the MIT License.
|
11345
|
-
var __awaiter$
|
11299
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11346
11300
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11347
11301
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11348
11302
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11487,8 +11441,6 @@ const MessageThreadWrapper = (props) => {
|
|
11487
11441
|
const { messages: newMessages, userId, participantCount, readReceiptsBySenderId, styles, disableJumpToNewMessageButton = false, showMessageDate = false, showMessageStatus = false, numberOfChatMessagesToReload = 5, onMessageSeen, onRenderMessageStatus, onRenderAvatar, onLoadPreviousChatMessages, onRenderJumpToNewMessageButton, onRenderMessage, onUpdateMessage, onCancelEditMessage, onDeleteMessage, onSendMessage,
|
11488
11442
|
/* @conditional-compile-remove(date-time-customization) */
|
11489
11443
|
onDisplayDateTimeString,
|
11490
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11491
|
-
onFetchAttachments,
|
11492
11444
|
/* @conditional-compile-remove(mention) */
|
11493
11445
|
mentionOptions,
|
11494
11446
|
/* @conditional-compile-remove(image-gallery) */
|
@@ -11509,28 +11461,6 @@ const MessageThreadWrapper = (props) => {
|
|
11509
11461
|
const [lastSendingChatMessage, setLastSendingChatMessage] = React.useState(undefined);
|
11510
11462
|
// readCount and participantCount will only need to be updated on-fly when user hover on an indicator
|
11511
11463
|
const [readCountForHoveredIndicator, setReadCountForHoveredIndicator] = React.useState(undefined);
|
11512
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11513
|
-
const [inlineAttachments, setInlineAttachments] = React.useState({});
|
11514
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11515
|
-
const onFetchInlineAttachment = React.useCallback((attachments, messageId) => __awaiter$x(void 0, void 0, void 0, function* () {
|
11516
|
-
if (!onFetchAttachments || attachments.length === 0) {
|
11517
|
-
return;
|
11518
|
-
}
|
11519
|
-
const attachmentDownloadResult = yield onFetchAttachments(attachments);
|
11520
|
-
if (attachmentDownloadResult.length > 0) {
|
11521
|
-
setInlineAttachments((prev) => {
|
11522
|
-
var _a;
|
11523
|
-
// The new state should always be based on the previous one
|
11524
|
-
// otherwise there can be issues with renders
|
11525
|
-
const listOfAttachments = (_a = prev[messageId]) !== null && _a !== void 0 ? _a : {};
|
11526
|
-
for (const result of attachmentDownloadResult) {
|
11527
|
-
const { attachmentId, blobUrl } = result;
|
11528
|
-
listOfAttachments[attachmentId] = blobUrl;
|
11529
|
-
}
|
11530
|
-
return Object.assign(Object.assign({}, prev), { [messageId]: listOfAttachments });
|
11531
|
-
});
|
11532
|
-
}
|
11533
|
-
}), [onFetchAttachments]);
|
11534
11464
|
const localeStrings = useLocale$1().strings.messageThread;
|
11535
11465
|
const strings = React.useMemo(() => (Object.assign(Object.assign({}, localeStrings), props.strings)), [localeStrings, props.strings]);
|
11536
11466
|
// it is required to use useState for messages
|
@@ -11542,7 +11472,7 @@ const MessageThreadWrapper = (props) => {
|
|
11542
11472
|
const previousMessagesRef = React.useRef([]);
|
11543
11473
|
// an aria label for Narrator to notify when a message is deleted
|
11544
11474
|
const [deletedMessageAriaLabel, setDeletedMessageAriaLabel] = React.useState(undefined);
|
11545
|
-
const onDeleteMessageCallback = React.useCallback((messageId) => __awaiter$
|
11475
|
+
const onDeleteMessageCallback = React.useCallback((messageId) => __awaiter$y(void 0, void 0, void 0, function* () {
|
11546
11476
|
if (!onDeleteMessage) {
|
11547
11477
|
return;
|
11548
11478
|
}
|
@@ -11622,7 +11552,7 @@ const MessageThreadWrapper = (props) => {
|
|
11622
11552
|
*/
|
11623
11553
|
const clientHeight = (_a = chatThreadRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
11624
11554
|
// we try to only send those message status if user is scrolled to the bottom.
|
11625
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
11555
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$y(void 0, void 0, void 0, function* () {
|
11626
11556
|
if (!isAtBottomOfScrollRef.current ||
|
11627
11557
|
!document.hasFocus() ||
|
11628
11558
|
!messagesRef.current ||
|
@@ -11673,7 +11603,7 @@ const MessageThreadWrapper = (props) => {
|
|
11673
11603
|
setIsAtBottomOfScrollRef(atBottom);
|
11674
11604
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
11675
11605
|
// Infinite scrolling + threadInitialize function
|
11676
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
11606
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$y(void 0, void 0, void 0, function* () {
|
11677
11607
|
if (!isLoadingChatMessagesRef.current) {
|
11678
11608
|
if (onLoadPreviousChatMessages) {
|
11679
11609
|
isLoadingChatMessagesRef.current = true;
|
@@ -11829,10 +11759,6 @@ const MessageThreadWrapper = (props) => {
|
|
11829
11759
|
return (React.createElement(MemoChatMessageComponentWrapper, Object.assign({}, message, { userId: userId, key: message.key, styles: styles, shouldOverlapAvatarAndMessage: isNarrow, strings: strings, onRenderAvatar: onRenderAvatar, onRenderMessage: onRenderMessage, onRenderMessageStatus: onRenderMessageStatus, defaultStatusRenderer: defaultStatusRenderer, onActionButtonClick: onActionButtonClickMemo, readCount: readCountForHoveredIndicator, participantCount: participantCount,
|
11830
11760
|
/* @conditional-compile-remove(file-sharing) */
|
11831
11761
|
fileDownloadHandler: props.fileDownloadHandler,
|
11832
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11833
|
-
onFetchInlineAttachment: onFetchInlineAttachment,
|
11834
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11835
|
-
inlineAttachments: inlineAttachments,
|
11836
11762
|
/* @conditional-compile-remove(image-gallery) */
|
11837
11763
|
onInlineImageClicked: onInlineImageClicked,
|
11838
11764
|
/* @conditional-compile-remove(date-time-customization) */
|
@@ -13146,22 +13072,25 @@ const playFrames$1 = react.memoizeFunction(() => react.keyframes({
|
|
13146
13072
|
/**
|
13147
13073
|
* @private
|
13148
13074
|
*/
|
13149
|
-
const reactionRenderingStyle = (args) =>
|
13150
|
-
|
13151
|
-
|
13152
|
-
|
13153
|
-
|
13154
|
-
|
13155
|
-
|
13156
|
-
|
13157
|
-
|
13158
|
-
|
13159
|
-
|
13160
|
-
|
13161
|
-
|
13162
|
-
|
13163
|
-
|
13164
|
-
|
13075
|
+
const reactionRenderingStyle = (args) => {
|
13076
|
+
const imageUrl = `url(${args.spriteImageUrl})`;
|
13077
|
+
return react.mergeStyles({
|
13078
|
+
height: '100%',
|
13079
|
+
width: '100%',
|
13080
|
+
overflow: 'hidden',
|
13081
|
+
animationName: playFrames$1(),
|
13082
|
+
backgroundImage: imageUrl,
|
13083
|
+
animationDuration: '5.12s',
|
13084
|
+
animationTimingFunction: `steps(102)`,
|
13085
|
+
backgroundSize: `cover`,
|
13086
|
+
animationPlayState: 'running',
|
13087
|
+
animationIterationCount: 'infinite',
|
13088
|
+
justifyContent: 'center',
|
13089
|
+
alignItems: 'center',
|
13090
|
+
backgroundPosition: `center`,
|
13091
|
+
transform: `scale(${84 < args.personaSize ? 84 / args.personaSize : args.personaSize / 84})`
|
13092
|
+
});
|
13093
|
+
};
|
13165
13094
|
|
13166
13095
|
// Copyright (c) Microsoft Corporation.
|
13167
13096
|
// Licensed under the MIT License.
|
@@ -13172,18 +13101,6 @@ const getVideoTileOverrideColor = (isVideoRendered, theme, color) => {
|
|
13172
13101
|
// when video is being rendered, the info has a grey-ish background, so no use of theme
|
13173
13102
|
return { color: isVideoRendered ? react.DefaultPalette[color] : theme.palette[color] };
|
13174
13103
|
};
|
13175
|
-
/* @conditional-compile-remove(reaction) */
|
13176
|
-
/**
|
13177
|
-
* Temporary mapping of paths for the reaction emoji resources.
|
13178
|
-
* @private
|
13179
|
-
*/
|
13180
|
-
const reactionEmoji = new Map([
|
13181
|
-
['like', `url('/assets/reactions/likeEmoji.png')`],
|
13182
|
-
['applause', `url('/assets/reactions/clapEmoji.png')`],
|
13183
|
-
['heart', `url('/assets/reactions/heartEmoji.png')`],
|
13184
|
-
['laugh', `url('/assets/reactions/laughEmoji.png')`],
|
13185
|
-
['surprised', `url('/assets/reactions/surprisedEmoji.png')`]
|
13186
|
-
]);
|
13187
13104
|
|
13188
13105
|
// Copyright (c) Microsoft Corporation.
|
13189
13106
|
// Licensed under the MIT License.
|
@@ -13252,8 +13169,11 @@ function useLongPress(props) {
|
|
13252
13169
|
startPressTimer();
|
13253
13170
|
}, [startPressTimer]);
|
13254
13171
|
const handleOnTouchEnd = React.useCallback(() => {
|
13172
|
+
if (!isLongPress && onClick) {
|
13173
|
+
onClick();
|
13174
|
+
}
|
13255
13175
|
timerRef.current && clearTimeout(timerRef.current);
|
13256
|
-
}, []);
|
13176
|
+
}, [onClick, isLongPress]);
|
13257
13177
|
const handleOnTouchMove = React.useCallback(() => {
|
13258
13178
|
timerRef.current && clearTimeout(timerRef.current);
|
13259
13179
|
}, []);
|
@@ -13280,96 +13200,342 @@ function useLongPress(props) {
|
|
13280
13200
|
|
13281
13201
|
// Copyright (c) Microsoft Corporation.
|
13282
13202
|
// Licensed under the MIT License.
|
13283
|
-
|
13284
|
-
|
13285
|
-
|
13286
|
-
|
13287
|
-
|
13288
|
-
|
13289
|
-
|
13290
|
-
|
13291
|
-
|
13292
|
-
|
13293
|
-
|
13294
|
-
const videoTileMoreMenuIconProps = { iconName: undefined, style: { display: 'none' } };
|
13295
|
-
/* @conditional-compile-remove(pinned-participants) */
|
13296
|
-
const videoTileMoreMenuProps = {
|
13297
|
-
directionalHint: react.DirectionalHint.topLeftEdge,
|
13298
|
-
isBeakVisible: false,
|
13299
|
-
styles: { container: { maxWidth: '8rem' } }
|
13300
|
-
};
|
13301
|
-
/* @conditional-compile-remove(pinned-participants) */
|
13302
|
-
const VideoTileMoreOptionsButton = (props) => {
|
13303
|
-
const { contextualMenu, canShowContextMenuButton } = props;
|
13304
|
-
if (!contextualMenu) {
|
13305
|
-
return React.createElement(React.Fragment, null);
|
13203
|
+
/**
|
13204
|
+
* Calculates the participants that should be rendered based on the list of dominant
|
13205
|
+
* speakers and currently rendered participants in a call.
|
13206
|
+
* @param args - SmartDominantSpeakerParticipantsArgs
|
13207
|
+
* @returns VideoGalleryRemoteParticipant[] {@link @azure/communication-react#VideoGalleryRemoteParticipant}
|
13208
|
+
*/
|
13209
|
+
const smartDominantSpeakerParticipants = (args) => {
|
13210
|
+
const { participants, dominantSpeakers = [], lastVisibleParticipants = [], maxDominantSpeakers } = args;
|
13211
|
+
// Don't apply any logic if total number of video streams is less than max dominant speakers.
|
13212
|
+
if (participants.length <= maxDominantSpeakers) {
|
13213
|
+
return participants;
|
13306
13214
|
}
|
13307
|
-
const
|
13308
|
-
|
13215
|
+
const participantsMap = participantsById(participants);
|
13216
|
+
// Only use the Max allowed dominant speakers that exist in participants
|
13217
|
+
const dominantSpeakerIds = dominantSpeakers.filter((id) => !!participantsMap[id]).slice(0, maxDominantSpeakers);
|
13218
|
+
const newVisibleParticipantIds = lastVisibleParticipants.map((p) => p.userId).slice(0, maxDominantSpeakers);
|
13219
|
+
const newDominantSpeakerIds = dominantSpeakerIds.filter((id) => !newVisibleParticipantIds.includes(id));
|
13220
|
+
// Remove participants that are no longer dominant and replace them with new dominant speakers.
|
13221
|
+
for (let index = 0; index < maxDominantSpeakers; index++) {
|
13222
|
+
const newVisibleParticipantId = newVisibleParticipantIds[index];
|
13223
|
+
if (newVisibleParticipantId === undefined || !dominantSpeakerIds.includes(newVisibleParticipantId)) {
|
13224
|
+
const replacement = newDominantSpeakerIds.shift();
|
13225
|
+
if (!replacement) {
|
13226
|
+
break;
|
13227
|
+
}
|
13228
|
+
newVisibleParticipantIds[index] = replacement;
|
13229
|
+
}
|
13230
|
+
}
|
13231
|
+
let newVisibleParticipants = newVisibleParticipantIds
|
13232
|
+
.map((participantId) => participantsMap[participantId])
|
13233
|
+
.filter((p) => p !== undefined);
|
13234
|
+
const newVisibleParticipantIdsSet = new Set(newVisibleParticipantIds);
|
13235
|
+
const remainingParticipants = participants.filter((p) => !newVisibleParticipantIdsSet.has(p.userId));
|
13236
|
+
newVisibleParticipants = newVisibleParticipants.concat(remainingParticipants);
|
13237
|
+
return newVisibleParticipants;
|
13309
13238
|
};
|
13310
13239
|
/**
|
13311
|
-
*
|
13312
|
-
*
|
13313
|
-
* Use with {@link GridLayout} in a {@link VideoGallery}.
|
13314
|
-
*
|
13315
|
-
* @public
|
13240
|
+
* maps the participants array to an object with userId as key
|
13241
|
+
* @private
|
13316
13242
|
*/
|
13317
|
-
const
|
13318
|
-
const
|
13319
|
-
|
13320
|
-
|
13321
|
-
|
13322
|
-
|
13323
|
-
|
13324
|
-
|
13325
|
-
|
13326
|
-
|
13327
|
-
|
13328
|
-
|
13329
|
-
|
13330
|
-
const
|
13331
|
-
|
13332
|
-
const [
|
13333
|
-
|
13334
|
-
|
13335
|
-
const
|
13336
|
-
|
13337
|
-
|
13338
|
-
|
13339
|
-
const observer = React.useRef(new ResizeObserver((entries) => {
|
13340
|
-
const { width, height } = entries[0].contentRect;
|
13341
|
-
const personaCalcSize = Math.min(width, height) / 3;
|
13342
|
-
// we only want to set the persona size if it has changed
|
13343
|
-
if (personaCalcSize !== personaSize) {
|
13344
|
-
setPersonaSize(Math.max(Math.min(personaCalcSize, personaMaxSize), personaMinSize));
|
13243
|
+
const participantsById = (participants) => {
|
13244
|
+
const response = {};
|
13245
|
+
participants.forEach((p) => (response[p.userId] = p));
|
13246
|
+
return response;
|
13247
|
+
};
|
13248
|
+
|
13249
|
+
// Copyright (c) Microsoft Corporation.
|
13250
|
+
// Licensed under the MIT License.
|
13251
|
+
const DEFAULT_MAX_OVERFLOW_GALLERY_DOMINANT_SPEAKERS = 6;
|
13252
|
+
const DEFAULT_MAX_VIDEO_SREAMS = 4;
|
13253
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
13254
|
+
const MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY = 9;
|
13255
|
+
const _useOrganizedParticipants = (props) => {
|
13256
|
+
const visibleGridParticipants = React.useRef([]);
|
13257
|
+
const visibleOverflowGalleryParticipants = React.useRef([]);
|
13258
|
+
const { remoteParticipants = [], localParticipant, dominantSpeakers = [], maxRemoteVideoStreams = DEFAULT_MAX_VIDEO_SREAMS, maxOverflowGalleryDominantSpeakers = DEFAULT_MAX_OVERFLOW_GALLERY_DOMINANT_SPEAKERS, isScreenShareActive = false, pinnedParticipantUserIds = [],
|
13259
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
13260
|
+
layout } = props;
|
13261
|
+
const calculateMaxRemoteVideoStreams = () => {
|
13262
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
13263
|
+
if (maxRemoteVideoStreams > MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY) {
|
13264
|
+
return MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY;
|
13345
13265
|
}
|
13346
|
-
|
13347
|
-
|
13348
|
-
if (videoTileRef.current) {
|
13349
|
-
observer.current.observe(videoTileRef.current);
|
13266
|
+
else {
|
13267
|
+
return maxRemoteVideoStreams;
|
13350
13268
|
}
|
13351
|
-
|
13352
|
-
|
13353
|
-
|
13354
|
-
|
13355
|
-
|
13356
|
-
return
|
13357
|
-
|
13358
|
-
|
13359
|
-
|
13360
|
-
|
13361
|
-
|
13362
|
-
|
13363
|
-
|
13364
|
-
|
13365
|
-
|
13366
|
-
|
13367
|
-
|
13368
|
-
|
13369
|
-
|
13370
|
-
|
13371
|
-
|
13372
|
-
|
13269
|
+
};
|
13270
|
+
const maxRemoteVideoStreamsToUse = calculateMaxRemoteVideoStreams();
|
13271
|
+
const videoParticipants = remoteParticipants.filter((p) => { var _a; return (_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
|
13272
|
+
const participantsToSortTrampoline = () => {
|
13273
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
13274
|
+
return layout !== 'floatingLocalVideo' ? putVideoParticipantsFirst(remoteParticipants) : videoParticipants;
|
13275
|
+
};
|
13276
|
+
visibleGridParticipants.current =
|
13277
|
+
pinnedParticipantUserIds.length > 0 || isScreenShareActive
|
13278
|
+
? []
|
13279
|
+
: smartDominantSpeakerParticipants({
|
13280
|
+
participants: participantsToSortTrampoline(),
|
13281
|
+
dominantSpeakers,
|
13282
|
+
lastVisibleParticipants: visibleGridParticipants.current,
|
13283
|
+
maxDominantSpeakers: maxRemoteVideoStreamsToUse
|
13284
|
+
}).slice(0, maxRemoteVideoStreamsToUse);
|
13285
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
13286
|
+
const dominantSpeakerToGrid = layout === 'speaker'
|
13287
|
+
? dominantSpeakers && dominantSpeakers[0]
|
13288
|
+
? visibleGridParticipants.current.filter((p) => p.userId === dominantSpeakers[0])
|
13289
|
+
: [visibleGridParticipants.current[0]]
|
13290
|
+
: [];
|
13291
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
13292
|
+
if (dominantSpeakerToGrid[0]) {
|
13293
|
+
visibleGridParticipants.current = dominantSpeakerToGrid;
|
13294
|
+
}
|
13295
|
+
const visibleGridParticipantsSet = new Set(visibleGridParticipants.current.map((p) => p.userId));
|
13296
|
+
const remoteParticipantsOrdered = putVideoParticipantsFirst(remoteParticipants);
|
13297
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
13298
|
+
const callingParticipants = remoteParticipantsOrdered.filter((p) => p.state === ('Connecting' ));
|
13299
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
13300
|
+
const callingParticipantsSet = new Set(callingParticipants.map((p) => p.userId));
|
13301
|
+
visibleOverflowGalleryParticipants.current = smartDominantSpeakerParticipants({
|
13302
|
+
participants: remoteParticipantsOrdered.filter((p) => !visibleGridParticipantsSet.has(p.userId) &&
|
13303
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !callingParticipantsSet.has(p.userId)),
|
13304
|
+
dominantSpeakers: dominantSpeakers,
|
13305
|
+
lastVisibleParticipants: visibleOverflowGalleryParticipants.current,
|
13306
|
+
maxDominantSpeakers: maxOverflowGalleryDominantSpeakers
|
13307
|
+
});
|
13308
|
+
const getGridParticipants = React.useCallback(() => {
|
13309
|
+
if (isScreenShareActive) {
|
13310
|
+
return [];
|
13311
|
+
}
|
13312
|
+
// if we have no grid participants we need to cap the max number of overflowGallery participants in the grid
|
13313
|
+
// we will use the max streams provided to the function to find the max participants that can go in the grid
|
13314
|
+
// if there are less participants than max streams then we will use all participants including joining in the grid
|
13315
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
13316
|
+
return visibleGridParticipants.current.length > 0
|
13317
|
+
? visibleGridParticipants.current
|
13318
|
+
: visibleOverflowGalleryParticipants.current.length > maxRemoteVideoStreamsToUse
|
13319
|
+
? visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse)
|
13320
|
+
: visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse).concat(callingParticipants);
|
13321
|
+
}, [
|
13322
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,
|
13323
|
+
isScreenShareActive,
|
13324
|
+
maxRemoteVideoStreamsToUse
|
13325
|
+
]);
|
13326
|
+
const gridParticipants = getGridParticipants();
|
13327
|
+
const getOverflowGalleryRemoteParticipants = React.useCallback(() => {
|
13328
|
+
if (isScreenShareActive && localParticipant) {
|
13329
|
+
const localParticipantPlusOverflow = [localParticipant].concat(visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current));
|
13330
|
+
// If screen sharing is active, assign video and audio participants as overflow gallery participants
|
13331
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
13332
|
+
return localParticipantPlusOverflow.concat(callingParticipants);
|
13333
|
+
}
|
13334
|
+
else if (isScreenShareActive) {
|
13335
|
+
// If screen sharing is active, assign video and audio participants as overflow gallery participants
|
13336
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
13337
|
+
return visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current.concat(callingParticipants));
|
13338
|
+
}
|
13339
|
+
else {
|
13340
|
+
// If screen sharing is not active, then assign all video tiles as grid tiles.
|
13341
|
+
// If there are no video tiles, then assign audio tiles as grid tiles.
|
13342
|
+
// if there are more overflow tiles than max streams then find the tiles that don't fit in the grid and put them in overflow
|
13343
|
+
// overflow should be empty if total participants including calling participants is less than max streams
|
13344
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
13345
|
+
return visibleGridParticipants.current.length > 0
|
13346
|
+
? visibleOverflowGalleryParticipants.current.concat(callingParticipants)
|
13347
|
+
: visibleOverflowGalleryParticipants.current.length > maxRemoteVideoStreamsToUse
|
13348
|
+
? visibleOverflowGalleryParticipants.current.slice(maxRemoteVideoStreamsToUse).concat(callingParticipants)
|
13349
|
+
: [];
|
13350
|
+
}
|
13351
|
+
}, [
|
13352
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,
|
13353
|
+
isScreenShareActive,
|
13354
|
+
localParticipant,
|
13355
|
+
maxRemoteVideoStreamsToUse
|
13356
|
+
]);
|
13357
|
+
const overflowGalleryParticipants = getOverflowGalleryRemoteParticipants();
|
13358
|
+
return { gridParticipants, overflowGalleryParticipants: overflowGalleryParticipants };
|
13359
|
+
};
|
13360
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13361
|
+
const _useOrganizedParticipantsWithFocusedParticipants = (props) => {
|
13362
|
+
var _a, _b;
|
13363
|
+
// map remote participants by userId
|
13364
|
+
const remoteParticipantMap = props.remoteParticipants.reduce((map, remoteParticipant) => {
|
13365
|
+
map[remoteParticipant.userId] = remoteParticipant;
|
13366
|
+
return map;
|
13367
|
+
}, {});
|
13368
|
+
const spotlightedParticipantUserIds = (_a = props.spotlightedParticipantUserIds) !== null && _a !== void 0 ? _a : [];
|
13369
|
+
// declare focused participant user ids as spotlighted participants user ids followed by
|
13370
|
+
// pinned participants user ids
|
13371
|
+
const focusedParticipantUserIds = [
|
13372
|
+
...new Set(spotlightedParticipantUserIds.concat((_b = props.pinnedParticipantUserIds) !== null && _b !== void 0 ? _b : []))
|
13373
|
+
];
|
13374
|
+
// get focused participants from map of remote participants in the order of the user ids
|
13375
|
+
const focusedParticipants = [];
|
13376
|
+
focusedParticipantUserIds.forEach((id) => {
|
13377
|
+
const pinnedParticipant = remoteParticipantMap[id];
|
13378
|
+
if (pinnedParticipant) {
|
13379
|
+
focusedParticipants.push(pinnedParticipant);
|
13380
|
+
}
|
13381
|
+
});
|
13382
|
+
// get unfocused participants by filtering out set of focused participant user ids from all remote participants
|
13383
|
+
const focusedParticipantUserIdSet = new Set(focusedParticipantUserIds);
|
13384
|
+
const unfocusedParticipants = props.remoteParticipants.filter((p) => !focusedParticipantUserIdSet.has(p.userId));
|
13385
|
+
const useOrganizedParticipantsProps = Object.assign(Object.assign({}, props), {
|
13386
|
+
// if there are pinned participants then we should only consider unpinned participants
|
13387
|
+
remoteParticipants: unfocusedParticipants });
|
13388
|
+
const useOrganizedParticipantsResult = _useOrganizedParticipants(useOrganizedParticipantsProps);
|
13389
|
+
if (focusedParticipants.length === 0) {
|
13390
|
+
return useOrganizedParticipantsResult;
|
13391
|
+
}
|
13392
|
+
return {
|
13393
|
+
gridParticipants: props.isScreenShareActive ? [] : focusedParticipants,
|
13394
|
+
overflowGalleryParticipants: props.isScreenShareActive
|
13395
|
+
? focusedParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants)
|
13396
|
+
: useOrganizedParticipantsResult.gridParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants)
|
13397
|
+
};
|
13398
|
+
};
|
13399
|
+
const putVideoParticipantsFirst = (remoteParticipants) => {
|
13400
|
+
const videoParticipants = [];
|
13401
|
+
const audioParticipants = [];
|
13402
|
+
remoteParticipants.forEach((p) => {
|
13403
|
+
var _a;
|
13404
|
+
if ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) {
|
13405
|
+
videoParticipants.push(p);
|
13406
|
+
}
|
13407
|
+
else {
|
13408
|
+
audioParticipants.push(p);
|
13409
|
+
}
|
13410
|
+
});
|
13411
|
+
const remoteParticipantSortedByVideo = videoParticipants.concat(audioParticipants);
|
13412
|
+
return remoteParticipantSortedByVideo;
|
13413
|
+
};
|
13414
|
+
/**
|
13415
|
+
* Hook to determine which participants should be in grid and overflow gallery and their order respectively
|
13416
|
+
* @private
|
13417
|
+
*/
|
13418
|
+
const useOrganizedParticipants = (args) => {
|
13419
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13420
|
+
return _useOrganizedParticipantsWithFocusedParticipants(args);
|
13421
|
+
};
|
13422
|
+
/* @conditional-compile-remove(reaction) */
|
13423
|
+
/**
|
13424
|
+
* @private
|
13425
|
+
*/
|
13426
|
+
const getEmojiResource = (reactionName, reactionResources) => {
|
13427
|
+
var _a, _b, _c, _d, _e;
|
13428
|
+
switch (reactionName) {
|
13429
|
+
case 'like':
|
13430
|
+
return (_a = reactionResources.likeReaction) === null || _a === void 0 ? void 0 : _a.url;
|
13431
|
+
case 'heart':
|
13432
|
+
return (_b = reactionResources.heartReaction) === null || _b === void 0 ? void 0 : _b.url;
|
13433
|
+
case 'laugh':
|
13434
|
+
return (_c = reactionResources.laughReaction) === null || _c === void 0 ? void 0 : _c.url;
|
13435
|
+
case 'applause':
|
13436
|
+
return (_d = reactionResources.applauseReaction) === null || _d === void 0 ? void 0 : _d.url;
|
13437
|
+
case 'surprised':
|
13438
|
+
return (_e = reactionResources.surprisedReaction) === null || _e === void 0 ? void 0 : _e.url;
|
13439
|
+
}
|
13440
|
+
return '';
|
13441
|
+
};
|
13442
|
+
|
13443
|
+
// Copyright (c) Microsoft Corporation.
|
13444
|
+
// Licensed under the MIT License.
|
13445
|
+
// Coin max size is set to PersonaSize.size100
|
13446
|
+
const DEFAULT_PERSONA_MAX_SIZE_PX = 100;
|
13447
|
+
// Coin min size is set PersonaSize.size32
|
13448
|
+
const DEFAULT_PERSONA_MIN_SIZE_PX = 32;
|
13449
|
+
const DefaultPlaceholder = (props) => {
|
13450
|
+
const { text, noVideoAvailableAriaLabel, coinSize, hidePersonaDetails } = props;
|
13451
|
+
return (React.createElement(react.Stack, { className: react.mergeStyles({ position: 'absolute', height: '100%', width: '100%' }) },
|
13452
|
+
React.createElement(react.Stack, { styles: defaultPersonaStyles$1 }, coinSize && (React.createElement(react.Persona, { coinSize: coinSize, hidePersonaDetails: hidePersonaDetails, text: text !== null && text !== void 0 ? text : '', initialsTextColor: "white", "aria-label": noVideoAvailableAriaLabel !== null && noVideoAvailableAriaLabel !== void 0 ? noVideoAvailableAriaLabel : '', showOverflowTooltip: false })))));
|
13453
|
+
};
|
13454
|
+
const defaultPersonaStyles$1 = { root: { margin: 'auto', maxHeight: '100%' } };
|
13455
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13456
|
+
const videoTileMoreMenuIconProps = { iconName: undefined, style: { display: 'none' } };
|
13457
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13458
|
+
const videoTileMoreMenuProps = {
|
13459
|
+
directionalHint: react.DirectionalHint.topLeftEdge,
|
13460
|
+
isBeakVisible: false,
|
13461
|
+
styles: { container: { maxWidth: '8rem' } }
|
13462
|
+
};
|
13463
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13464
|
+
const VideoTileMoreOptionsButton = (props) => {
|
13465
|
+
const { contextualMenu, canShowContextMenuButton } = props;
|
13466
|
+
if (!contextualMenu) {
|
13467
|
+
return React.createElement(React.Fragment, null);
|
13468
|
+
}
|
13469
|
+
const optionsIcon = canShowContextMenuButton ? 'VideoTileMoreOptions' : undefined;
|
13470
|
+
return (React.createElement(react.IconButton, { "data-ui-id": "video-tile-more-options-button", styles: moreButtonStyles, menuIconProps: videoTileMoreMenuIconProps, menuProps: Object.assign(Object.assign({}, videoTileMoreMenuProps), contextualMenu), iconProps: { iconName: optionsIcon } }));
|
13471
|
+
};
|
13472
|
+
/**
|
13473
|
+
* A component to render the video stream for a single call participant.
|
13474
|
+
*
|
13475
|
+
* Use with {@link GridLayout} in a {@link VideoGallery}.
|
13476
|
+
*
|
13477
|
+
* @public
|
13478
|
+
*/
|
13479
|
+
const VideoTile = (props) => {
|
13480
|
+
const { children, displayName, initialsName, isMirrored, isMuted,
|
13481
|
+
/* @conditional-compile-remove(spotlight) */
|
13482
|
+
isSpotlighted,
|
13483
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13484
|
+
isPinned, onRenderPlaceholder, renderElement, showLabel = true, showMuteIndicator = true, styles, userId, noVideoAvailableAriaLabel, isSpeaking,
|
13485
|
+
/* @conditional-compile-remove(raise-hand) */
|
13486
|
+
raisedHand,
|
13487
|
+
/* @conditional-compile-remove(reaction) */
|
13488
|
+
reaction, personaMinSize = DEFAULT_PERSONA_MIN_SIZE_PX, personaMaxSize = DEFAULT_PERSONA_MAX_SIZE_PX,
|
13489
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13490
|
+
contextualMenu,
|
13491
|
+
/* @conditional-compile-remove(reaction) */
|
13492
|
+
reactionResources } = props;
|
13493
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13494
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
13495
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13496
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
13497
|
+
// need to set a default otherwise the resizeObserver will get stuck in an infinite loop.
|
13498
|
+
const [personaSize, setPersonaSize] = React.useState(1);
|
13499
|
+
/* @conditional-compile-remove(reaction) */
|
13500
|
+
const [isValidImageSource, setIsValidImageSource] = React.useState(false);
|
13501
|
+
const videoTileRef = React.useRef(null);
|
13502
|
+
const locale = useLocale$1();
|
13503
|
+
const theme = useTheme();
|
13504
|
+
const isVideoRendered = !!renderElement;
|
13505
|
+
const observer = React.useRef(new ResizeObserver((entries) => {
|
13506
|
+
const { width, height } = entries[0].contentRect;
|
13507
|
+
const personaCalcSize = Math.min(width, height) / 3;
|
13508
|
+
// we only want to set the persona size if it has changed
|
13509
|
+
if (personaCalcSize !== personaSize) {
|
13510
|
+
setPersonaSize(Math.max(Math.min(personaCalcSize, personaMaxSize), personaMinSize));
|
13511
|
+
}
|
13512
|
+
}));
|
13513
|
+
React.useLayoutEffect(() => {
|
13514
|
+
if (videoTileRef.current) {
|
13515
|
+
observer.current.observe(videoTileRef.current);
|
13516
|
+
}
|
13517
|
+
const currentObserver = observer.current;
|
13518
|
+
return () => currentObserver.disconnect();
|
13519
|
+
}, [videoTileRef]);
|
13520
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13521
|
+
const useLongPressProps = React.useMemo(() => {
|
13522
|
+
return {
|
13523
|
+
onLongPress: () => {
|
13524
|
+
var _a;
|
13525
|
+
(_a = props.onLongTouch) === null || _a === void 0 ? void 0 : _a.call(props);
|
13526
|
+
},
|
13527
|
+
touchEventsOnly: true
|
13528
|
+
};
|
13529
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
13530
|
+
}, [props.onLongTouch]);
|
13531
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13532
|
+
const longPressHandlers = useLongPress(useLongPressProps);
|
13533
|
+
const longPressHandlersTrampoline = React.useMemo(() => {
|
13534
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13535
|
+
return longPressHandlers;
|
13536
|
+
}, [
|
13537
|
+
/* @conditional-compile-remove(pinned-participants) */
|
13538
|
+
longPressHandlers
|
13373
13539
|
]);
|
13374
13540
|
const hoverHandlers = React.useMemo(() => {
|
13375
13541
|
/* @conditional-compile-remove(pinned-participants) */
|
@@ -13401,7 +13567,9 @@ const VideoTile = (props) => {
|
|
13401
13567
|
/* @conditional-compile-remove(raise-hand) */
|
13402
13568
|
raisedHandBackgroundColor = callingPalette.raiseHandGold;
|
13403
13569
|
/* @conditional-compile-remove(reaction) */
|
13404
|
-
const backgroundImageUrl = reaction !== undefined
|
13570
|
+
const backgroundImageUrl = reaction !== undefined && reactionResources !== undefined
|
13571
|
+
? getEmojiResource(reaction === null || reaction === void 0 ? void 0 : reaction.reactionType, reactionResources)
|
13572
|
+
: '';
|
13405
13573
|
/* @conditional-compile-remove(reaction) */
|
13406
13574
|
const currentTimestamp = new Date();
|
13407
13575
|
/* @conditional-compile-remove(reaction) */
|
@@ -13409,12 +13577,25 @@ const VideoTile = (props) => {
|
|
13409
13577
|
/* @conditional-compile-remove(reaction) */
|
13410
13578
|
const receivedUnixTimestamp = reaction ? Math.floor(reaction.receivedAt.getTime() / 1000) : undefined;
|
13411
13579
|
/* @conditional-compile-remove(reaction) */
|
13412
|
-
const canRenderReaction = receivedUnixTimestamp ? currentUnixTimeStamp - receivedUnixTimestamp < 3000 : false
|
13580
|
+
const canRenderReaction = (receivedUnixTimestamp ? currentUnixTimeStamp - receivedUnixTimestamp < 3000 : false) &&
|
13581
|
+
backgroundImageUrl !== undefined;
|
13582
|
+
/* @conditional-compile-remove(reaction) */
|
13583
|
+
React.useEffect(() => {
|
13584
|
+
if (!backgroundImageUrl || backgroundImageUrl.length === 0) {
|
13585
|
+
return;
|
13586
|
+
}
|
13587
|
+
fetch(`${backgroundImageUrl}`)
|
13588
|
+
.then((res) => setIsValidImageSource(res.ok))
|
13589
|
+
.catch((warning) => console.warn(`Sprite image for animation rendering failed with warning: ${warning}`));
|
13590
|
+
return () => setIsValidImageSource(false);
|
13591
|
+
}, [backgroundImageUrl]);
|
13592
|
+
/* @conditional-compile-remove(reaction) */
|
13593
|
+
const spriteImageUrl = backgroundImageUrl !== undefined ? backgroundImageUrl : '';
|
13413
13594
|
/* @conditional-compile-remove(reaction) */
|
13414
13595
|
const reactionContainerStyles = React.useCallback(() => reactionRenderingStyle({
|
13415
|
-
|
13596
|
+
spriteImageUrl,
|
13416
13597
|
personaSize
|
13417
|
-
}), [
|
13598
|
+
}), [spriteImageUrl, personaSize]);
|
13418
13599
|
return (React.createElement(react.Stack, Object.assign({ "data-ui-id": ids.videoTile, className: react.mergeStyles(rootStyles, {
|
13419
13600
|
background: theme.palette.neutralLighter,
|
13420
13601
|
borderRadius: theme.effects.roundedCorner4
|
@@ -13437,7 +13618,7 @@ const VideoTile = (props) => {
|
|
13437
13618
|
: 1
|
13438
13619
|
}) }, onRenderPlaceholder ? (onRenderPlaceholder(userId !== null && userId !== void 0 ? userId : '', placeholderOptions, DefaultPlaceholder)) : (React.createElement(DefaultPlaceholder, Object.assign({}, placeholderOptions))))),
|
13439
13620
|
/* @conditional-compile-remove(reaction) */
|
13440
|
-
canRenderReaction && (React.createElement(react.Stack, { className: react.mergeStyles(videoContainerStyles, {
|
13621
|
+
canRenderReaction && isValidImageSource && (React.createElement(react.Stack, { className: react.mergeStyles(videoContainerStyles, {
|
13441
13622
|
display: 'flex',
|
13442
13623
|
justifyContent: 'center',
|
13443
13624
|
alignItems: 'center',
|
@@ -13501,7 +13682,8 @@ const _RemoteVideoTile = React.memo((props) => {
|
|
13501
13682
|
var _a;
|
13502
13683
|
const { isAvailable, isReceiving = true, // default to true to prevent any breaking change
|
13503
13684
|
isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, onRenderAvatar, showMuteIndicator, remoteParticipant, participantState, menuKind, isPinned, onPinParticipant, onUnpinParticipant,
|
13504
|
-
/* @conditional-compile-remove(spotlight) */ isSpotlighted, onUpdateScalingMode, disablePinMenuItem, toggleAnnouncerString, strings
|
13685
|
+
/* @conditional-compile-remove(spotlight) */ isSpotlighted, onUpdateScalingMode, disablePinMenuItem, toggleAnnouncerString, strings,
|
13686
|
+
/* @conditional-compile-remove(reaction) */ reactionResources } = props;
|
13505
13687
|
const remoteVideoStreamProps = React.useMemo(() => ({
|
13506
13688
|
isMirrored: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored,
|
13507
13689
|
isScreenSharingOn,
|
@@ -13592,7 +13774,9 @@ const _RemoteVideoTile = React.memo((props) => {
|
|
13592
13774
|
/* @conditional-compile-remove(pinned-participants) */
|
13593
13775
|
onLongTouch: () => setDrawerMenuItemProps(convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () => setDrawerMenuItemProps([]))),
|
13594
13776
|
/* @conditional-compile-remove(spotlight) */
|
13595
|
-
isSpotlighted: isSpotlighted
|
13777
|
+
isSpotlighted: isSpotlighted,
|
13778
|
+
/* @conditional-compile-remove(reaction) */
|
13779
|
+
reactionResources: reactionResources })),
|
13596
13780
|
drawerMenuItemProps.length > 0 && (React.createElement(react.Layer, { hostId: props.drawerMenuHostId },
|
13597
13781
|
React.createElement(react.Stack, { styles: drawerMenuWrapperStyles },
|
13598
13782
|
React.createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItemProps([]), items: drawerMenuItemProps, heading: remoteParticipant.displayName }))))));
|
@@ -13794,7 +13978,7 @@ const localVideoTileContainerStyles = {
|
|
13794
13978
|
|
13795
13979
|
// Copyright (c) Microsoft Corporation.
|
13796
13980
|
// Licensed under the MIT License.
|
13797
|
-
var __awaiter$
|
13981
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13798
13982
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13799
13983
|
return new (P || (P = Promise))(function (resolve, reject) {
|
13800
13984
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -13811,7 +13995,7 @@ const LocalVideoCameraCycleButton = (props) => {
|
|
13811
13995
|
const { cameras, selectedCamera, onSelectCamera, label, ariaDescription, size } = props;
|
13812
13996
|
const theme = react.useTheme();
|
13813
13997
|
const [waitForCamera, setWaitForCamera] = React.useState(false);
|
13814
|
-
const onChangeCameraClick = React.useCallback((device) => __awaiter$
|
13998
|
+
const onChangeCameraClick = React.useCallback((device) => __awaiter$x(void 0, void 0, void 0, function* () {
|
13815
13999
|
// Throttle changing camera to prevent too many callbacks
|
13816
14000
|
if (onSelectCamera) {
|
13817
14001
|
setWaitForCamera(true);
|
@@ -13848,7 +14032,9 @@ const _LocalVideoTile = React.memo((props) => {
|
|
13848
14032
|
/* @conditional-compile-remove(reaction) */
|
13849
14033
|
reaction,
|
13850
14034
|
/* @conditional-compile-remove(spotlight) */
|
13851
|
-
isSpotlighted
|
14035
|
+
isSpotlighted,
|
14036
|
+
/* @conditional-compile-remove(reaction) */
|
14037
|
+
reactionResources } = props;
|
13852
14038
|
/* @conditional-compile-remove(spotlight) */
|
13853
14039
|
const theme = useTheme();
|
13854
14040
|
const localVideoStreamProps = React.useMemo(() => ({
|
@@ -13903,260 +14089,40 @@ const _LocalVideoTile = React.memo((props) => {
|
|
13903
14089
|
/* @conditional-compile-remove(reaction) */
|
13904
14090
|
reaction: reaction,
|
13905
14091
|
/* @conditional-compile-remove(spotlight) */
|
13906
|
-
isSpotlighted: isSpotlighted
|
14092
|
+
isSpotlighted: isSpotlighted,
|
14093
|
+
/* @conditional-compile-remove(reaction) */
|
14094
|
+
reactionResources: reactionResources }), /* @conditional-compile-remove(spotlight) */
|
13907
14095
|
isSpotlighted && spotlightBorder));
|
13908
14096
|
});
|
13909
14097
|
const FloatingLocalCameraCycleButton = (props) => {
|
13910
14098
|
const { showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription } = props;
|
13911
14099
|
const ariaDescription = (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) &&
|
13912
14100
|
localVideoSelectedDescription &&
|
13913
|
-
_formatString(localVideoSelectedDescription, {
|
13914
|
-
cameraName: localVideoCameraCycleButtonProps.selectedCamera.name
|
13915
|
-
});
|
13916
|
-
return (React.createElement(react.Stack, { horizontalAlign: "end" }, showCameraSwitcherInLocalPreview &&
|
13917
|
-
(localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.cameras) !== undefined &&
|
13918
|
-
(localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) !== undefined &&
|
13919
|
-
(localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.onSelectCamera) !== undefined && (React.createElement(LocalVideoCameraCycleButton, { cameras: localVideoCameraCycleButtonProps.cameras, selectedCamera: localVideoCameraCycleButtonProps.selectedCamera, onSelectCamera: localVideoCameraCycleButtonProps.onSelectCamera, label: localVideoCameraSwitcherLabel, ariaDescription: ariaDescription }))));
|
13920
|
-
};
|
13921
|
-
|
13922
|
-
// Copyright (c) Microsoft Corporation.
|
13923
|
-
// Licensed under the MIT License.
|
13924
|
-
/**
|
13925
|
-
* @private
|
13926
|
-
*/
|
13927
|
-
const rootLayoutStyle$1 = {
|
13928
|
-
root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }
|
13929
|
-
};
|
13930
|
-
|
13931
|
-
// Copyright (c) Microsoft Corporation.
|
13932
|
-
// Licensed under the MIT License.
|
13933
|
-
/**
|
13934
|
-
* @private
|
13935
|
-
*/
|
13936
|
-
const videoGalleryLayoutGap = {
|
13937
|
-
childrenGap: '0.5rem'
|
14101
|
+
_formatString(localVideoSelectedDescription, {
|
14102
|
+
cameraName: localVideoCameraCycleButtonProps.selectedCamera.name
|
14103
|
+
});
|
14104
|
+
return (React.createElement(react.Stack, { horizontalAlign: "end" }, showCameraSwitcherInLocalPreview &&
|
14105
|
+
(localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.cameras) !== undefined &&
|
14106
|
+
(localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) !== undefined &&
|
14107
|
+
(localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.onSelectCamera) !== undefined && (React.createElement(LocalVideoCameraCycleButton, { cameras: localVideoCameraCycleButtonProps.cameras, selectedCamera: localVideoCameraCycleButtonProps.selectedCamera, onSelectCamera: localVideoCameraCycleButtonProps.onSelectCamera, label: localVideoCameraSwitcherLabel, ariaDescription: ariaDescription }))));
|
13938
14108
|
};
|
13939
14109
|
|
13940
14110
|
// Copyright (c) Microsoft Corporation.
|
13941
14111
|
// Licensed under the MIT License.
|
13942
14112
|
/**
|
13943
|
-
* Calculates the participants that should be rendered based on the list of dominant
|
13944
|
-
* speakers and currently rendered participants in a call.
|
13945
|
-
* @param args - SmartDominantSpeakerParticipantsArgs
|
13946
|
-
* @returns VideoGalleryRemoteParticipant[] {@link @azure/communication-react#VideoGalleryRemoteParticipant}
|
13947
|
-
*/
|
13948
|
-
const smartDominantSpeakerParticipants = (args) => {
|
13949
|
-
const { participants, dominantSpeakers = [], lastVisibleParticipants = [], maxDominantSpeakers } = args;
|
13950
|
-
// Don't apply any logic if total number of video streams is less than max dominant speakers.
|
13951
|
-
if (participants.length <= maxDominantSpeakers) {
|
13952
|
-
return participants;
|
13953
|
-
}
|
13954
|
-
const participantsMap = participantsById(participants);
|
13955
|
-
// Only use the Max allowed dominant speakers that exist in participants
|
13956
|
-
const dominantSpeakerIds = dominantSpeakers.filter((id) => !!participantsMap[id]).slice(0, maxDominantSpeakers);
|
13957
|
-
const newVisibleParticipantIds = lastVisibleParticipants.map((p) => p.userId).slice(0, maxDominantSpeakers);
|
13958
|
-
const newDominantSpeakerIds = dominantSpeakerIds.filter((id) => !newVisibleParticipantIds.includes(id));
|
13959
|
-
// Remove participants that are no longer dominant and replace them with new dominant speakers.
|
13960
|
-
for (let index = 0; index < maxDominantSpeakers; index++) {
|
13961
|
-
const newVisibleParticipantId = newVisibleParticipantIds[index];
|
13962
|
-
if (newVisibleParticipantId === undefined || !dominantSpeakerIds.includes(newVisibleParticipantId)) {
|
13963
|
-
const replacement = newDominantSpeakerIds.shift();
|
13964
|
-
if (!replacement) {
|
13965
|
-
break;
|
13966
|
-
}
|
13967
|
-
newVisibleParticipantIds[index] = replacement;
|
13968
|
-
}
|
13969
|
-
}
|
13970
|
-
let newVisibleParticipants = newVisibleParticipantIds
|
13971
|
-
.map((participantId) => participantsMap[participantId])
|
13972
|
-
.filter((p) => p !== undefined);
|
13973
|
-
const newVisibleParticipantIdsSet = new Set(newVisibleParticipantIds);
|
13974
|
-
const remainingParticipants = participants.filter((p) => !newVisibleParticipantIdsSet.has(p.userId));
|
13975
|
-
newVisibleParticipants = newVisibleParticipants.concat(remainingParticipants);
|
13976
|
-
return newVisibleParticipants;
|
13977
|
-
};
|
13978
|
-
/**
|
13979
|
-
* maps the participants array to an object with userId as key
|
13980
14113
|
* @private
|
13981
14114
|
*/
|
13982
|
-
const
|
13983
|
-
|
13984
|
-
participants.forEach((p) => (response[p.userId] = p));
|
13985
|
-
return response;
|
14115
|
+
const rootLayoutStyle$1 = {
|
14116
|
+
root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }
|
13986
14117
|
};
|
13987
14118
|
|
13988
14119
|
// Copyright (c) Microsoft Corporation.
|
13989
14120
|
// Licensed under the MIT License.
|
13990
|
-
const DEFAULT_MAX_OVERFLOW_GALLERY_DOMINANT_SPEAKERS = 6;
|
13991
|
-
const DEFAULT_MAX_VIDEO_SREAMS = 4;
|
13992
|
-
/* @conditional-compile-remove(gallery-layouts) */
|
13993
|
-
const MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY = 9;
|
13994
|
-
const _useOrganizedParticipants = (props) => {
|
13995
|
-
const visibleGridParticipants = React.useRef([]);
|
13996
|
-
const visibleOverflowGalleryParticipants = React.useRef([]);
|
13997
|
-
const { remoteParticipants = [], localParticipant, dominantSpeakers = [], maxRemoteVideoStreams = DEFAULT_MAX_VIDEO_SREAMS, maxOverflowGalleryDominantSpeakers = DEFAULT_MAX_OVERFLOW_GALLERY_DOMINANT_SPEAKERS, isScreenShareActive = false, pinnedParticipantUserIds = [],
|
13998
|
-
/* @conditional-compile-remove(gallery-layouts) */
|
13999
|
-
layout } = props;
|
14000
|
-
const calculateMaxRemoteVideoStreams = () => {
|
14001
|
-
/* @conditional-compile-remove(gallery-layouts) */
|
14002
|
-
if (maxRemoteVideoStreams > MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY) {
|
14003
|
-
return MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY;
|
14004
|
-
}
|
14005
|
-
else {
|
14006
|
-
return maxRemoteVideoStreams;
|
14007
|
-
}
|
14008
|
-
};
|
14009
|
-
const maxRemoteVideoStreamsToUse = calculateMaxRemoteVideoStreams();
|
14010
|
-
const videoParticipants = remoteParticipants.filter((p) => { var _a; return (_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
|
14011
|
-
const participantsToSortTrampoline = () => {
|
14012
|
-
/* @conditional-compile-remove(gallery-layouts) */
|
14013
|
-
return layout !== 'floatingLocalVideo' ? putVideoParticipantsFirst(remoteParticipants) : videoParticipants;
|
14014
|
-
};
|
14015
|
-
visibleGridParticipants.current =
|
14016
|
-
pinnedParticipantUserIds.length > 0 || isScreenShareActive
|
14017
|
-
? []
|
14018
|
-
: smartDominantSpeakerParticipants({
|
14019
|
-
participants: participantsToSortTrampoline(),
|
14020
|
-
dominantSpeakers,
|
14021
|
-
lastVisibleParticipants: visibleGridParticipants.current,
|
14022
|
-
maxDominantSpeakers: maxRemoteVideoStreamsToUse
|
14023
|
-
}).slice(0, maxRemoteVideoStreamsToUse);
|
14024
|
-
/* @conditional-compile-remove(gallery-layouts) */
|
14025
|
-
const dominantSpeakerToGrid = layout === 'speaker'
|
14026
|
-
? dominantSpeakers && dominantSpeakers[0]
|
14027
|
-
? visibleGridParticipants.current.filter((p) => p.userId === dominantSpeakers[0])
|
14028
|
-
: [visibleGridParticipants.current[0]]
|
14029
|
-
: [];
|
14030
|
-
/* @conditional-compile-remove(gallery-layouts) */
|
14031
|
-
if (dominantSpeakerToGrid[0]) {
|
14032
|
-
visibleGridParticipants.current = dominantSpeakerToGrid;
|
14033
|
-
}
|
14034
|
-
const visibleGridParticipantsSet = new Set(visibleGridParticipants.current.map((p) => p.userId));
|
14035
|
-
const remoteParticipantsOrdered = putVideoParticipantsFirst(remoteParticipants);
|
14036
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14037
|
-
const callingParticipants = remoteParticipantsOrdered.filter((p) => p.state === ('Connecting' ));
|
14038
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14039
|
-
const callingParticipantsSet = new Set(callingParticipants.map((p) => p.userId));
|
14040
|
-
visibleOverflowGalleryParticipants.current = smartDominantSpeakerParticipants({
|
14041
|
-
participants: remoteParticipantsOrdered.filter((p) => !visibleGridParticipantsSet.has(p.userId) &&
|
14042
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !callingParticipantsSet.has(p.userId)),
|
14043
|
-
dominantSpeakers: dominantSpeakers,
|
14044
|
-
lastVisibleParticipants: visibleOverflowGalleryParticipants.current,
|
14045
|
-
maxDominantSpeakers: maxOverflowGalleryDominantSpeakers
|
14046
|
-
});
|
14047
|
-
const getGridParticipants = React.useCallback(() => {
|
14048
|
-
if (isScreenShareActive) {
|
14049
|
-
return [];
|
14050
|
-
}
|
14051
|
-
// if we have no grid participants we need to cap the max number of overflowGallery participants in the grid
|
14052
|
-
// we will use the max streams provided to the function to find the max participants that can go in the grid
|
14053
|
-
// if there are less participants than max streams then we will use all participants including joining in the grid
|
14054
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14055
|
-
return visibleGridParticipants.current.length > 0
|
14056
|
-
? visibleGridParticipants.current
|
14057
|
-
: visibleOverflowGalleryParticipants.current.length > maxRemoteVideoStreamsToUse
|
14058
|
-
? visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse)
|
14059
|
-
: visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse).concat(callingParticipants);
|
14060
|
-
}, [
|
14061
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,
|
14062
|
-
isScreenShareActive,
|
14063
|
-
maxRemoteVideoStreamsToUse
|
14064
|
-
]);
|
14065
|
-
const gridParticipants = getGridParticipants();
|
14066
|
-
const getOverflowGalleryRemoteParticipants = React.useCallback(() => {
|
14067
|
-
if (isScreenShareActive && localParticipant) {
|
14068
|
-
const localParticipantPlusOverflow = [localParticipant].concat(visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current));
|
14069
|
-
// If screen sharing is active, assign video and audio participants as overflow gallery participants
|
14070
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14071
|
-
return localParticipantPlusOverflow.concat(callingParticipants);
|
14072
|
-
}
|
14073
|
-
else if (isScreenShareActive) {
|
14074
|
-
// If screen sharing is active, assign video and audio participants as overflow gallery participants
|
14075
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14076
|
-
return visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current.concat(callingParticipants));
|
14077
|
-
}
|
14078
|
-
else {
|
14079
|
-
// If screen sharing is not active, then assign all video tiles as grid tiles.
|
14080
|
-
// If there are no video tiles, then assign audio tiles as grid tiles.
|
14081
|
-
// if there are more overflow tiles than max streams then find the tiles that don't fit in the grid and put them in overflow
|
14082
|
-
// overflow should be empty if total participants including calling participants is less than max streams
|
14083
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14084
|
-
return visibleGridParticipants.current.length > 0
|
14085
|
-
? visibleOverflowGalleryParticipants.current.concat(callingParticipants)
|
14086
|
-
: visibleOverflowGalleryParticipants.current.length > maxRemoteVideoStreamsToUse
|
14087
|
-
? visibleOverflowGalleryParticipants.current.slice(maxRemoteVideoStreamsToUse).concat(callingParticipants)
|
14088
|
-
: [];
|
14089
|
-
}
|
14090
|
-
}, [
|
14091
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,
|
14092
|
-
isScreenShareActive,
|
14093
|
-
localParticipant,
|
14094
|
-
maxRemoteVideoStreamsToUse
|
14095
|
-
]);
|
14096
|
-
const overflowGalleryParticipants = getOverflowGalleryRemoteParticipants();
|
14097
|
-
return { gridParticipants, overflowGalleryParticipants: overflowGalleryParticipants };
|
14098
|
-
};
|
14099
|
-
/* @conditional-compile-remove(pinned-participants) */
|
14100
|
-
const _useOrganizedParticipantsWithFocusedParticipants = (props) => {
|
14101
|
-
var _a, _b;
|
14102
|
-
// map remote participants by userId
|
14103
|
-
const remoteParticipantMap = props.remoteParticipants.reduce((map, remoteParticipant) => {
|
14104
|
-
map[remoteParticipant.userId] = remoteParticipant;
|
14105
|
-
return map;
|
14106
|
-
}, {});
|
14107
|
-
const spotlightedParticipantUserIds = (_a = props.spotlightedParticipantUserIds) !== null && _a !== void 0 ? _a : [];
|
14108
|
-
// declare focused participant user ids as spotlighted participants user ids followed by
|
14109
|
-
// pinned participants user ids
|
14110
|
-
const focusedParticipantUserIds = [
|
14111
|
-
...new Set(spotlightedParticipantUserIds.concat((_b = props.pinnedParticipantUserIds) !== null && _b !== void 0 ? _b : []))
|
14112
|
-
];
|
14113
|
-
// get focused participants from map of remote participants in the order of the user ids
|
14114
|
-
const focusedParticipants = [];
|
14115
|
-
focusedParticipantUserIds.forEach((id) => {
|
14116
|
-
const pinnedParticipant = remoteParticipantMap[id];
|
14117
|
-
if (pinnedParticipant) {
|
14118
|
-
focusedParticipants.push(pinnedParticipant);
|
14119
|
-
}
|
14120
|
-
});
|
14121
|
-
// get unfocused participants by filtering out set of focused participant user ids from all remote participants
|
14122
|
-
const focusedParticipantUserIdSet = new Set(focusedParticipantUserIds);
|
14123
|
-
const unfocusedParticipants = props.remoteParticipants.filter((p) => !focusedParticipantUserIdSet.has(p.userId));
|
14124
|
-
const useOrganizedParticipantsProps = Object.assign(Object.assign({}, props), {
|
14125
|
-
// if there are pinned participants then we should only consider unpinned participants
|
14126
|
-
remoteParticipants: unfocusedParticipants });
|
14127
|
-
const useOrganizedParticipantsResult = _useOrganizedParticipants(useOrganizedParticipantsProps);
|
14128
|
-
if (focusedParticipants.length === 0) {
|
14129
|
-
return useOrganizedParticipantsResult;
|
14130
|
-
}
|
14131
|
-
return {
|
14132
|
-
gridParticipants: props.isScreenShareActive ? [] : focusedParticipants,
|
14133
|
-
overflowGalleryParticipants: props.isScreenShareActive
|
14134
|
-
? focusedParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants)
|
14135
|
-
: useOrganizedParticipantsResult.gridParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants)
|
14136
|
-
};
|
14137
|
-
};
|
14138
|
-
const putVideoParticipantsFirst = (remoteParticipants) => {
|
14139
|
-
const videoParticipants = [];
|
14140
|
-
const audioParticipants = [];
|
14141
|
-
remoteParticipants.forEach((p) => {
|
14142
|
-
var _a;
|
14143
|
-
if ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) {
|
14144
|
-
videoParticipants.push(p);
|
14145
|
-
}
|
14146
|
-
else {
|
14147
|
-
audioParticipants.push(p);
|
14148
|
-
}
|
14149
|
-
});
|
14150
|
-
const remoteParticipantSortedByVideo = videoParticipants.concat(audioParticipants);
|
14151
|
-
return remoteParticipantSortedByVideo;
|
14152
|
-
};
|
14153
14121
|
/**
|
14154
|
-
* Hook to determine which participants should be in grid and overflow gallery and their order respectively
|
14155
14122
|
* @private
|
14156
14123
|
*/
|
14157
|
-
const
|
14158
|
-
|
14159
|
-
return _useOrganizedParticipantsWithFocusedParticipants(args);
|
14124
|
+
const videoGalleryLayoutGap = {
|
14125
|
+
childrenGap: '0.5rem'
|
14160
14126
|
};
|
14161
14127
|
|
14162
14128
|
// Copyright (c) Microsoft Corporation.
|
@@ -16233,7 +16199,9 @@ const VideoGallery = (props) => {
|
|
16233
16199
|
/* @conditional-compile-remove(rooms) */
|
16234
16200
|
localVideoTileSize = 'followDeviceOrientation',
|
16235
16201
|
/* @conditional-compile-remove(spotlight) */
|
16236
|
-
spotlightedParticipants
|
16202
|
+
spotlightedParticipants,
|
16203
|
+
/* @conditional-compile-remove(reaction) */
|
16204
|
+
reactionResources } = props;
|
16237
16205
|
const ids = useIdentifiers();
|
16238
16206
|
const theme = useTheme();
|
16239
16207
|
const localeStrings = useLocale$1().strings.videoGallery;
|
@@ -16307,7 +16275,9 @@ const VideoGallery = (props) => {
|
|
16307
16275
|
/* @conditional-compile-remove(reaction) */
|
16308
16276
|
reaction: localParticipant.reaction,
|
16309
16277
|
/* @conditional-compile-remove(spotlight) */
|
16310
|
-
isSpotlighted: isSpotlighted
|
16278
|
+
isSpotlighted: isSpotlighted,
|
16279
|
+
/* @conditional-compile-remove(reaction) */
|
16280
|
+
reactionResources: reactionResources })));
|
16311
16281
|
}, [
|
16312
16282
|
isNarrow,
|
16313
16283
|
localParticipant,
|
@@ -16332,7 +16302,9 @@ const VideoGallery = (props) => {
|
|
16332
16302
|
layout,
|
16333
16303
|
showLocalVideoTileLabel,
|
16334
16304
|
/* @conditional-compile-remove(spotlight) */
|
16335
|
-
spotlightedParticipants
|
16305
|
+
spotlightedParticipants,
|
16306
|
+
/* @conditional-compile-remove(reaction) */
|
16307
|
+
reactionResources
|
16336
16308
|
]);
|
16337
16309
|
/* @conditional-compile-remove(pinned-participants) */
|
16338
16310
|
const onPinParticipant = React.useCallback((userId) => {
|
@@ -16415,7 +16387,9 @@ const VideoGallery = (props) => {
|
|
16415
16387
|
/* @conditional-compile-remove(pinned-participants) */
|
16416
16388
|
toggleAnnouncerString: toggleAnnouncerString,
|
16417
16389
|
/* @conditional-compile-remove(spotlight) */
|
16418
|
-
isSpotlighted: isSpotlighted
|
16390
|
+
isSpotlighted: isSpotlighted,
|
16391
|
+
/* @conditional-compile-remove(reaction) */
|
16392
|
+
reactionResources: reactionResources }));
|
16419
16393
|
}, [
|
16420
16394
|
onCreateRemoteStreamView,
|
16421
16395
|
onDisposeRemoteVideoStreamView,
|
@@ -16432,7 +16406,8 @@ const VideoGallery = (props) => {
|
|
16432
16406
|
/* @conditional-compile-remove(pinned-participants) */ onUnpinParticipant,
|
16433
16407
|
/* @conditional-compile-remove(pinned-participants) */ toggleAnnouncerString,
|
16434
16408
|
/* @conditional-compile-remove(pinned-participants) */ onUpdateScalingMode,
|
16435
|
-
/* @conditional-compile-remove(spotlight) */ spotlightedParticipants
|
16409
|
+
/* @conditional-compile-remove(spotlight) */ spotlightedParticipants,
|
16410
|
+
/* @conditional-compile-remove(reaction) */ reactionResources
|
16436
16411
|
]);
|
16437
16412
|
const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
|
16438
16413
|
const localScreenShareStreamComponent = React.createElement(LocalScreenShare, { localParticipant: localParticipant });
|
@@ -16917,7 +16892,7 @@ const DevicesButton = (props) => {
|
|
16917
16892
|
|
16918
16893
|
// Copyright (c) Microsoft Corporation.
|
16919
16894
|
// Licensed under the MIT License.
|
16920
|
-
var __awaiter$
|
16895
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16921
16896
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16922
16897
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16923
16898
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16955,7 +16930,7 @@ const CameraButton = (props) => {
|
|
16955
16930
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
16956
16931
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
16957
16932
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
16958
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
16933
|
+
const onToggleClick = React.useCallback(() => __awaiter$w(void 0, void 0, void 0, function* () {
|
16959
16934
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
16960
16935
|
if (onToggleCamera) {
|
16961
16936
|
setWaitForCamera(true);
|
@@ -16969,7 +16944,7 @@ const CameraButton = (props) => {
|
|
16969
16944
|
}
|
16970
16945
|
}
|
16971
16946
|
}), [cameraOn, localVideoViewOptions, onToggleCamera, toggleAnnouncerString]);
|
16972
|
-
const onChangeCameraClick = React.useCallback((device) => __awaiter$
|
16947
|
+
const onChangeCameraClick = React.useCallback((device) => __awaiter$w(void 0, void 0, void 0, function* () {
|
16973
16948
|
// Throttle changing camera to prevent too many callbacks
|
16974
16949
|
if (onSelectCamera) {
|
16975
16950
|
setWaitForCamera(true);
|
@@ -17140,7 +17115,7 @@ const lightThemeCallButtonStyles = {
|
|
17140
17115
|
|
17141
17116
|
// Copyright (c) Microsoft Corporation.
|
17142
17117
|
// Licensed under the MIT License.
|
17143
|
-
var __awaiter$
|
17118
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17144
17119
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17145
17120
|
return new (P || (P = Promise))(function (resolve, reject) {
|
17146
17121
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -17181,7 +17156,7 @@ const MicrophoneButton = (props) => {
|
|
17181
17156
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
17182
17157
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
17183
17158
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
17184
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
17159
|
+
const onToggleClick = React.useCallback(() => __awaiter$v(void 0, void 0, void 0, function* () {
|
17185
17160
|
if (onToggleMicrophone) {
|
17186
17161
|
try {
|
17187
17162
|
yield onToggleMicrophone();
|
@@ -17702,12 +17677,13 @@ const playFrames = react.memoizeFunction(() => react.keyframes({
|
|
17702
17677
|
* @private
|
17703
17678
|
*/
|
17704
17679
|
const emojiStyles = (backgroundImage, animationPlayState) => {
|
17680
|
+
const imageResourceUrl = `url(${backgroundImage})`;
|
17705
17681
|
return {
|
17706
17682
|
display: 'flex',
|
17707
17683
|
flexDirection: 'column',
|
17708
17684
|
height: '100%',
|
17709
17685
|
width: '100%',
|
17710
|
-
backgroundImage:
|
17686
|
+
backgroundImage: imageResourceUrl,
|
17711
17687
|
animationName: playFrames(),
|
17712
17688
|
animationDuration: '8.12s',
|
17713
17689
|
animationTimingFunction: `steps(102)`,
|
@@ -17765,7 +17741,7 @@ const reactionToolTipHostStyle = () => {
|
|
17765
17741
|
* @beta
|
17766
17742
|
*/
|
17767
17743
|
const ReactionButton = (props) => {
|
17768
|
-
var _a, _b;
|
17744
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
17769
17745
|
const localeStrings = useLocale$1().strings.reactionButton;
|
17770
17746
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
17771
17747
|
const theme = react.useTheme();
|
@@ -17780,31 +17756,41 @@ const ReactionButton = (props) => {
|
|
17780
17756
|
['applause', strings.applauseReactionTooltipContent],
|
17781
17757
|
['surprised', strings.surprisedReactionTooltipContent]
|
17782
17758
|
]);
|
17759
|
+
const emojiResource = new Map([
|
17760
|
+
['like', (_a = props.reactionResources.likeReaction) === null || _a === void 0 ? void 0 : _a.url],
|
17761
|
+
['heart', (_b = props.reactionResources.heartReaction) === null || _b === void 0 ? void 0 : _b.url],
|
17762
|
+
['laugh', (_c = props.reactionResources.laughReaction) === null || _c === void 0 ? void 0 : _c.url],
|
17763
|
+
['applause', (_d = props.reactionResources.applauseReaction) === null || _d === void 0 ? void 0 : _d.url],
|
17764
|
+
['surprised', (_e = props.reactionResources.surprisedReaction) === null || _e === void 0 ? void 0 : _e.url]
|
17765
|
+
]);
|
17783
17766
|
const calloutStyle = { root: { padding: 0 }, calloutMain: { padding: '0.5rem' } };
|
17784
17767
|
const calloutProps = {
|
17785
17768
|
gapSpace: 4,
|
17786
17769
|
styles: calloutStyle,
|
17787
17770
|
backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''
|
17788
17771
|
};
|
17789
|
-
const renderEmoji = (item, dismissMenu) => (React.createElement("div", { style: reactionEmojiMenuStyles() }, emojis.map((emoji, index) =>
|
17790
|
-
|
17791
|
-
|
17792
|
-
|
17772
|
+
const renderEmoji = (item, dismissMenu) => (React.createElement("div", { style: reactionEmojiMenuStyles() }, emojis.map((emoji, index) => {
|
17773
|
+
const resourceUrl = emojiResource.get(emoji);
|
17774
|
+
return (React.createElement(react.TooltipHost, { key: index, "data-ui-id": index, hidden: props.disableTooltip, content: emojiButtonTooltip.get(emoji), styles: reactionToolTipHostStyle(), calloutProps: Object.assign({}, calloutProps) },
|
17775
|
+
React.createElement(react.IconButton, { key: index, onClick: () => {
|
17776
|
+
props.onReactionClicked(emoji);
|
17777
|
+
setIsHoveredMap((prevMap) => {
|
17778
|
+
return new Map(prevMap).set(emoji, false);
|
17779
|
+
});
|
17780
|
+
dismissMenu();
|
17781
|
+
}, style: emojiStyles(resourceUrl ? resourceUrl : '', isHoveredMap.get(emoji) ? 'running' : 'paused'), onMouseEnter: () => setIsHoveredMap((prevMap) => {
|
17782
|
+
return new Map(prevMap).set(emoji, true);
|
17783
|
+
}), onMouseLeave: () => setIsHoveredMap((prevMap) => {
|
17793
17784
|
return new Map(prevMap).set(emoji, false);
|
17794
|
-
});
|
17795
|
-
|
17796
|
-
}, style: emojiStyles(reactionEmoji.get(emoji), isHoveredMap.get(emoji) ? 'running' : 'paused'), onMouseEnter: () => setIsHoveredMap((prevMap) => {
|
17797
|
-
return new Map(prevMap).set(emoji, true);
|
17798
|
-
}), onMouseLeave: () => setIsHoveredMap((prevMap) => {
|
17799
|
-
return new Map(prevMap).set(emoji, false);
|
17800
|
-
}) }))))));
|
17785
|
+
}) })));
|
17786
|
+
})));
|
17801
17787
|
const emojiList = [
|
17802
17788
|
{ key: 'reactions', itemType: react.ContextualMenuItemType.Normal, onRender: renderEmoji }
|
17803
17789
|
];
|
17804
17790
|
return (React.createElement(ControlBarButton, Object.assign({}, props, { className: react.mergeStyles(styles, props.styles), menuProps: {
|
17805
17791
|
shouldFocusOnMount: true,
|
17806
17792
|
items: emojiList
|
17807
|
-
}, onRenderIcon: (
|
17793
|
+
}, onRenderIcon: (_f = props.onRenderIcon) !== null && _f !== void 0 ? _f : onRenderIcon, strings: strings, labelKey: (_g = props.labelKey) !== null && _g !== void 0 ? _g : 'reactionButtonLabel', onRenderMenuIcon: () => React.createElement("div", null), disabled: props.disabled })));
|
17808
17794
|
};
|
17809
17795
|
/* @conditional-compile-remove(reaction) */
|
17810
17796
|
const reactionButtonStyles = (theme) => ({
|
@@ -18356,7 +18342,7 @@ const dtmfFrequencies = {
|
|
18356
18342
|
|
18357
18343
|
// Copyright (c) Microsoft Corporation.
|
18358
18344
|
// Licensed under the MIT License.
|
18359
|
-
var __awaiter$
|
18345
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18360
18346
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18361
18347
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18362
18348
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18396,18 +18382,18 @@ const DtmfTones = [
|
|
18396
18382
|
const DialpadButton = (props) => {
|
18397
18383
|
var _a, _b, _c, _d;
|
18398
18384
|
const theme = react.useTheme();
|
18399
|
-
const { digit, index, onClick, onLongPress,
|
18385
|
+
const { digit, index, onClick, onLongPress, longPressTrigger, dtmfToneAudioContext, disableDtmfPlayback } = props;
|
18400
18386
|
const [buttonPressed, setButtonPressed] = React.useState(false);
|
18401
18387
|
const dtmfToneSound = React.useRef(new Tone(dtmfToneAudioContext, dtmfFrequencies[digit].f1, dtmfFrequencies[digit].f2));
|
18402
18388
|
const useLongPressProps = React.useMemo(() => ({
|
18403
|
-
onClick: () => __awaiter$
|
18389
|
+
onClick: () => __awaiter$u(void 0, void 0, void 0, function* () {
|
18404
18390
|
onClick(digit, index);
|
18405
18391
|
}),
|
18406
|
-
onLongPress: () => __awaiter$
|
18392
|
+
onLongPress: () => __awaiter$u(void 0, void 0, void 0, function* () {
|
18407
18393
|
onLongPress(digit, index);
|
18408
18394
|
}),
|
18409
|
-
touchEventsOnly:
|
18410
|
-
}), [digit, index,
|
18395
|
+
touchEventsOnly: longPressTrigger === 'touch'
|
18396
|
+
}), [digit, index, longPressTrigger, onClick, onLongPress]);
|
18411
18397
|
const longPressHandlers = useLongPress(useLongPressProps);
|
18412
18398
|
return (React.createElement(react.DefaultButton, Object.assign({ "data-test-id": `dialpad-button-${props.index}`, styles: react.concatStyleSets(buttonStyles$1(), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.button) }, longPressHandlers, { onKeyDown: (e) => {
|
18413
18399
|
if ((e.key === 'Enter' || e.key === ' ') && !buttonPressed) {
|
@@ -18418,6 +18404,13 @@ const DialpadButton = (props) => {
|
|
18418
18404
|
setButtonPressed(true);
|
18419
18405
|
return;
|
18420
18406
|
}
|
18407
|
+
if (e.key === 'Tab' ||
|
18408
|
+
e.key === 'ArrowLeft' ||
|
18409
|
+
e.key === 'ArrowRight' ||
|
18410
|
+
e.key === 'ArrowUp' ||
|
18411
|
+
e.key === 'ArrowDown') {
|
18412
|
+
dtmfToneSound.current.stop();
|
18413
|
+
}
|
18421
18414
|
longPressHandlers.onKeyDown();
|
18422
18415
|
}, onKeyUp: (e) => {
|
18423
18416
|
if ((e.key === 'Enter' || e.key === ' ') && buttonPressed) {
|
@@ -18452,7 +18445,7 @@ const DialpadButton = (props) => {
|
|
18452
18445
|
const DialpadContainer = (props) => {
|
18453
18446
|
var _a, _b;
|
18454
18447
|
const theme = react.useTheme();
|
18455
|
-
const { onSendDtmfTone, onClickDialpadButton, textFieldValue, onChange, showDeleteButton = true,
|
18448
|
+
const { onSendDtmfTone, onClickDialpadButton, textFieldValue, onChange, showDeleteButton = true, longPressTrigger = 'mouseAndTouch', disableDtmfPlayback, dialpadMode = 'dialer' } = props;
|
18456
18449
|
const dtmfToneAudioContext = React.useRef(new AudioContext());
|
18457
18450
|
const [plainTextValue, setPlainTextValue] = React.useState(textFieldValue !== null && textFieldValue !== void 0 ? textFieldValue : '');
|
18458
18451
|
const plainTextValuePreviousRenderValue = React.useRef(plainTextValue);
|
@@ -18528,7 +18521,7 @@ const DialpadContainer = (props) => {
|
|
18528
18521
|
then use this index to locate the corresponding dtmf tones
|
18529
18522
|
DtmfTones[index]
|
18530
18523
|
*/
|
18531
|
-
index: columnIndex + rowIndex * rows.length, digit: button.digit, letter: button.letter, styles: props.styles, onClick: onClickDialpad, onLongPress: onLongPressDialpad,
|
18524
|
+
index: columnIndex + rowIndex * rows.length, digit: button.digit, letter: button.letter, styles: props.styles, onClick: onClickDialpad, onLongPress: onLongPressDialpad, longPressTrigger: longPressTrigger, dtmfToneAudioContext: dtmfToneAudioContext.current, disableDtmfPlayback: disableDtmfPlayback })))));
|
18532
18525
|
}))));
|
18533
18526
|
};
|
18534
18527
|
/**
|
@@ -19548,7 +19541,7 @@ const _spokenLanguageToCaptionLanguage = {
|
|
19548
19541
|
|
19549
19542
|
// Copyright (c) Microsoft Corporation.
|
19550
19543
|
// Licensed under the MIT License.
|
19551
|
-
var __awaiter$
|
19544
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
19552
19545
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
19553
19546
|
return new (P || (P = Promise))(function (resolve, reject) {
|
19554
19547
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -19591,7 +19584,7 @@ const _CaptionsSettingsModal = (props) => {
|
|
19591
19584
|
onDismissCaptionsSettings();
|
19592
19585
|
}
|
19593
19586
|
}, [onDismissCaptionsSettings]);
|
19594
|
-
const onConfirm = React.useCallback(() => __awaiter$
|
19587
|
+
const onConfirm = React.useCallback(() => __awaiter$t(void 0, void 0, void 0, function* () {
|
19595
19588
|
const spokenLanguageCode = selectedSpokenLanguage.key.toString();
|
19596
19589
|
const captionLanguageCode = selectedCaptionLanguage.key.toString();
|
19597
19590
|
if (isCaptionsFeatureActive) {
|
@@ -20679,7 +20672,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
20679
20672
|
|
20680
20673
|
// Copyright (c) Microsoft Corporation.
|
20681
20674
|
// Licensed under the MIT License.
|
20682
|
-
var __awaiter$
|
20675
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20683
20676
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20684
20677
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20685
20678
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20702,35 +20695,35 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
|
|
20702
20695
|
let messageIterator = undefined;
|
20703
20696
|
let readReceiptIterator = undefined;
|
20704
20697
|
return {
|
20705
|
-
onSendMessage: (content, options) => __awaiter$
|
20698
|
+
onSendMessage: (content, options) => __awaiter$s(void 0, void 0, void 0, function* () {
|
20706
20699
|
const sendMessageRequest = {
|
20707
20700
|
content,
|
20708
20701
|
senderDisplayName: chatClient.getState().displayName
|
20709
20702
|
};
|
20710
20703
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
20711
20704
|
}),
|
20712
|
-
onUpdateMessage: (messageId, content, options) => __awaiter$
|
20705
|
+
onUpdateMessage: (messageId, content, options) => __awaiter$s(void 0, void 0, void 0, function* () {
|
20713
20706
|
const updatedMetadata = (options === null || options === void 0 ? void 0 : options.metadata) ? Object.assign({}, options.metadata) : {};
|
20714
20707
|
updatedMetadata.fileSharingMetadata = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachmentMetadata) || []);
|
20715
20708
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
20716
20709
|
}),
|
20717
|
-
onDeleteMessage: (messageId) => __awaiter$
|
20710
|
+
onDeleteMessage: (messageId) => __awaiter$s(void 0, void 0, void 0, function* () {
|
20718
20711
|
yield chatThreadClient.deleteMessage(messageId);
|
20719
20712
|
}),
|
20720
20713
|
// This handler is designed for chatThread to consume
|
20721
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
20714
|
+
onMessageSeen: (chatMessageId) => __awaiter$s(void 0, void 0, void 0, function* () {
|
20722
20715
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
20723
20716
|
}),
|
20724
|
-
onTyping: () => __awaiter$
|
20717
|
+
onTyping: () => __awaiter$s(void 0, void 0, void 0, function* () {
|
20725
20718
|
yield chatThreadClient.sendTypingNotification();
|
20726
20719
|
}),
|
20727
|
-
onRemoveParticipant: (userId) => __awaiter$
|
20720
|
+
onRemoveParticipant: (userId) => __awaiter$s(void 0, void 0, void 0, function* () {
|
20728
20721
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
20729
20722
|
}),
|
20730
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
20723
|
+
updateThreadTopicName: (topicName) => __awaiter$s(void 0, void 0, void 0, function* () {
|
20731
20724
|
yield chatThreadClient.updateTopic(topicName);
|
20732
20725
|
}),
|
20733
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
20726
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$s(void 0, void 0, void 0, function* () {
|
20734
20727
|
var _a, _b, _c;
|
20735
20728
|
if (messageIterator === undefined) {
|
20736
20729
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -21166,24 +21159,47 @@ const extractAttachmentUrl = (attachment) => {
|
|
21166
21159
|
return attachment.attachmentType === 'file' && attachment.previewUrl ? attachment.previewUrl : attachment.url || '';
|
21167
21160
|
};
|
21168
21161
|
const processChatMessageContent = (message) => {
|
21169
|
-
var _a, _b, _c
|
21162
|
+
var _a, _b, _c;
|
21163
|
+
let content = (_a = message.content) === null || _a === void 0 ? void 0 : _a.message;
|
21170
21164
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21171
|
-
if (
|
21172
|
-
const attachments = (
|
21165
|
+
if (content && ((_b = message.content) === null || _b === void 0 ? void 0 : _b.attachments) && sanitizedMessageContentType(message.type).includes('html')) {
|
21166
|
+
const attachments = (_c = message.content) === null || _c === void 0 ? void 0 : _c.attachments;
|
21167
|
+
// Fill in the src here
|
21168
|
+
const document = new DOMParser().parseFromString(content, 'text/html');
|
21169
|
+
document.querySelectorAll('img').forEach((img) => {
|
21170
|
+
var _a, _b, _c;
|
21171
|
+
const attachmentPreviewUrl = (_a = attachments.find((attachment) => attachment.id === img.id)) === null || _a === void 0 ? void 0 : _a.previewUrl;
|
21172
|
+
if (attachmentPreviewUrl) {
|
21173
|
+
const src = (_c = (_b = message.resourceCache) === null || _b === void 0 ? void 0 : _b[attachmentPreviewUrl]) !== null && _c !== void 0 ? _c : '';
|
21174
|
+
img.src = src;
|
21175
|
+
}
|
21176
|
+
});
|
21177
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21178
|
+
content = document.documentElement.innerHTML;
|
21173
21179
|
const teamsImageHtmlContent = attachments
|
21174
|
-
.filter((attachment) => {
|
21175
|
-
|
21180
|
+
.filter((attachment) => {
|
21181
|
+
var _a, _b;
|
21182
|
+
return attachment.attachmentType === 'image' &&
|
21183
|
+
attachment.previewUrl !== undefined &&
|
21184
|
+
!((_b = (_a = message.content) === null || _a === void 0 ? void 0 : _a.message) === null || _b === void 0 ? void 0 : _b.includes(attachment.id));
|
21185
|
+
})
|
21186
|
+
.map((attachment) => generateImageAttachmentImgHtml(message, attachment))
|
21176
21187
|
.join('');
|
21177
21188
|
if (teamsImageHtmlContent) {
|
21178
|
-
return (
|
21189
|
+
return (content !== null && content !== void 0 ? content : '') + teamsImageHtmlContent;
|
21179
21190
|
}
|
21180
21191
|
}
|
21181
|
-
return
|
21192
|
+
return content;
|
21182
21193
|
};
|
21183
21194
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21184
|
-
const generateImageAttachmentImgHtml = (attachment) => {
|
21185
|
-
|
21186
|
-
|
21195
|
+
const generateImageAttachmentImgHtml = (message, attachment) => {
|
21196
|
+
var _a, _b;
|
21197
|
+
if (attachment.previewUrl !== undefined) {
|
21198
|
+
const contentType = extractAttachmentContentTypeFromName(attachment.name);
|
21199
|
+
const src = (_b = (_a = message.resourceCache) === null || _a === void 0 ? void 0 : _a[attachment.previewUrl]) !== null && _b !== void 0 ? _b : '';
|
21200
|
+
return `\r\n<p><img alt="image" src="${src}" itemscope="${contentType}" id="${attachment.id}"></p>`;
|
21201
|
+
}
|
21202
|
+
return '';
|
21187
21203
|
};
|
21188
21204
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21189
21205
|
const extractAttachmentContentTypeFromName = (name) => {
|
@@ -21637,6 +21653,131 @@ const Constants = {
|
|
21637
21653
|
*/
|
21638
21654
|
const chatStatefulLogger = logger.createClientLogger('communication-react:chat-stateful');
|
21639
21655
|
|
21656
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21657
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21658
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
21659
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
21660
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
21661
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
21662
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
21663
|
+
});
|
21664
|
+
};
|
21665
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21666
|
+
/**
|
21667
|
+
* @private
|
21668
|
+
*/
|
21669
|
+
class ResourceDownloadQueue {
|
21670
|
+
constructor(context, credential) {
|
21671
|
+
this._messagesNeedingResourceRetrieval = [];
|
21672
|
+
this.isActive = false;
|
21673
|
+
this._context = context;
|
21674
|
+
this._credential = credential;
|
21675
|
+
}
|
21676
|
+
containsMessageWithSameAttachments(message) {
|
21677
|
+
var _a, _b, _c;
|
21678
|
+
let contains = false;
|
21679
|
+
const incomingAttachment = (_a = message.content) === null || _a === void 0 ? void 0 : _a.attachments;
|
21680
|
+
if (incomingAttachment) {
|
21681
|
+
for (const m of this._messagesNeedingResourceRetrieval) {
|
21682
|
+
const existingAttachment = (_c = (_b = m.content) === null || _b === void 0 ? void 0 : _b.attachments) !== null && _c !== void 0 ? _c : [];
|
21683
|
+
contains = incomingAttachment.every((element, index) => element === existingAttachment[index]);
|
21684
|
+
if (contains) {
|
21685
|
+
break;
|
21686
|
+
}
|
21687
|
+
}
|
21688
|
+
}
|
21689
|
+
return contains;
|
21690
|
+
}
|
21691
|
+
addMessage(message) {
|
21692
|
+
// make a copy of message and add to queue
|
21693
|
+
const copy = Object.assign({}, message);
|
21694
|
+
this._messagesNeedingResourceRetrieval.push(copy);
|
21695
|
+
}
|
21696
|
+
startQueue(threadId, operation) {
|
21697
|
+
return __awaiter$r(this, void 0, void 0, function* () {
|
21698
|
+
if (this.isActive) {
|
21699
|
+
return;
|
21700
|
+
}
|
21701
|
+
while (this._messagesNeedingResourceRetrieval.length > 0) {
|
21702
|
+
this.isActive = true;
|
21703
|
+
const message = this._messagesNeedingResourceRetrieval.shift();
|
21704
|
+
if (!message) {
|
21705
|
+
this.isActive = false;
|
21706
|
+
continue;
|
21707
|
+
}
|
21708
|
+
try {
|
21709
|
+
const newMessage = yield operation(message, this._credential);
|
21710
|
+
if (newMessage) {
|
21711
|
+
this.isActive = false;
|
21712
|
+
this._context.setChatMessage(threadId, newMessage);
|
21713
|
+
}
|
21714
|
+
}
|
21715
|
+
catch (error) {
|
21716
|
+
console.log('Downloading Resource error: ', error);
|
21717
|
+
}
|
21718
|
+
}
|
21719
|
+
});
|
21720
|
+
}
|
21721
|
+
}
|
21722
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21723
|
+
/**
|
21724
|
+
* @private
|
21725
|
+
*/
|
21726
|
+
const requestAttachments = (message, credential) => __awaiter$r(void 0, void 0, void 0, function* () {
|
21727
|
+
var _a;
|
21728
|
+
const attachments = (_a = message.content) === null || _a === void 0 ? void 0 : _a.attachments;
|
21729
|
+
if (message.type === 'html' && attachments) {
|
21730
|
+
if (message.resourceCache === undefined) {
|
21731
|
+
message.resourceCache = {};
|
21732
|
+
}
|
21733
|
+
for (const attachment of attachments) {
|
21734
|
+
if (attachment.previewUrl) {
|
21735
|
+
const previewUrl = attachment.previewUrl;
|
21736
|
+
try {
|
21737
|
+
const src = yield fetchImageSource(previewUrl, credential);
|
21738
|
+
message.resourceCache[previewUrl] = src;
|
21739
|
+
}
|
21740
|
+
catch (error) {
|
21741
|
+
throw new ResourceDownloadError(message);
|
21742
|
+
}
|
21743
|
+
}
|
21744
|
+
}
|
21745
|
+
}
|
21746
|
+
return message;
|
21747
|
+
});
|
21748
|
+
/**
|
21749
|
+
* @private
|
21750
|
+
*/
|
21751
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21752
|
+
const fetchImageSource = (src, credential) => __awaiter$r(void 0, void 0, void 0, function* () {
|
21753
|
+
function fetchWithAuthentication(url, token) {
|
21754
|
+
return __awaiter$r(this, void 0, void 0, function* () {
|
21755
|
+
const headers = new Headers();
|
21756
|
+
headers.append('Authorization', `Bearer ${token}`);
|
21757
|
+
try {
|
21758
|
+
return yield fetch(url, { headers });
|
21759
|
+
}
|
21760
|
+
catch (err) {
|
21761
|
+
throw new ChatError('ChatThreadClient.getMessage', err);
|
21762
|
+
}
|
21763
|
+
});
|
21764
|
+
}
|
21765
|
+
const accessToken = yield credential.getToken();
|
21766
|
+
const response = yield fetchWithAuthentication(src, accessToken.token);
|
21767
|
+
const blob = yield response.blob();
|
21768
|
+
return URL.createObjectURL(blob);
|
21769
|
+
});
|
21770
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21771
|
+
/**
|
21772
|
+
* @private
|
21773
|
+
*/
|
21774
|
+
class ResourceDownloadError extends Error {
|
21775
|
+
constructor(chatMessageWithStatus) {
|
21776
|
+
super();
|
21777
|
+
this.chatMessageWithStatus = chatMessageWithStatus;
|
21778
|
+
}
|
21779
|
+
}
|
21780
|
+
|
21640
21781
|
// Copyright (c) Microsoft Corporation.
|
21641
21782
|
// Licensed under the MIT License.
|
21642
21783
|
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
@@ -21655,7 +21796,8 @@ immer.enablePatches();
|
|
21655
21796
|
* @private
|
21656
21797
|
*/
|
21657
21798
|
let ChatContext$1 = class ChatContext {
|
21658
|
-
constructor(maxListeners
|
21799
|
+
constructor(maxListeners,
|
21800
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ credential) {
|
21659
21801
|
this._state = {
|
21660
21802
|
userId: { id: '' },
|
21661
21803
|
displayName: '',
|
@@ -21664,8 +21806,14 @@ let ChatContext$1 = class ChatContext {
|
|
21664
21806
|
};
|
21665
21807
|
this._batchMode = false;
|
21666
21808
|
this.typingIndicatorInterval = undefined;
|
21809
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21810
|
+
this._messageQueue = undefined;
|
21667
21811
|
this._logger = logger.createClientLogger('communication-react:chat-context');
|
21668
21812
|
this._emitter = new EventEmitter();
|
21813
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21814
|
+
if (credential) {
|
21815
|
+
this._messageQueue = new ResourceDownloadQueue(this, credential);
|
21816
|
+
}
|
21669
21817
|
if (maxListeners) {
|
21670
21818
|
this._emitter.setMaxListeners(maxListeners);
|
21671
21819
|
}
|
@@ -21887,6 +22035,8 @@ let ChatContext$1 = class ChatContext {
|
|
21887
22035
|
this.startTypingIndicatorCleanUp();
|
21888
22036
|
}
|
21889
22037
|
setChatMessage(threadId, message) {
|
22038
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
22039
|
+
this.parseAttachments(threadId, message);
|
21890
22040
|
const { id: messageId, clientMessageId } = message;
|
21891
22041
|
if (messageId || clientMessageId) {
|
21892
22042
|
this.modifyState((draft) => {
|
@@ -21905,6 +22055,20 @@ let ChatContext$1 = class ChatContext {
|
|
21905
22055
|
});
|
21906
22056
|
}
|
21907
22057
|
}
|
22058
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
22059
|
+
parseAttachments(threadId, message) {
|
22060
|
+
var _a, _b;
|
22061
|
+
const attachments = (_a = message.content) === null || _a === void 0 ? void 0 : _a.attachments;
|
22062
|
+
if (message.type === 'html' && ((_b = message.content) === null || _b === void 0 ? void 0 : _b.message) && attachments && attachments.length > 0) {
|
22063
|
+
if (this._messageQueue &&
|
22064
|
+
!this._messageQueue.containsMessageWithSameAttachments(message) &&
|
22065
|
+
message.resourceCache === undefined) {
|
22066
|
+
// Need to discuss retry logic in case of failure
|
22067
|
+
this._messageQueue.addMessage(message);
|
22068
|
+
this._messageQueue.startQueue(threadId, requestAttachments);
|
22069
|
+
}
|
22070
|
+
}
|
22071
|
+
}
|
21908
22072
|
/**
|
21909
22073
|
* Tees any errors encountered in an async function to the state.
|
21910
22074
|
*
|
@@ -22599,7 +22763,8 @@ const _createStatefulChatClientInner = (args, options, telemetryImplementationHi
|
|
22599
22763
|
* @internal
|
22600
22764
|
*/
|
22601
22765
|
const _createStatefulChatClientWithDeps = (chatClient, args, options) => {
|
22602
|
-
const context = new ChatContext$1(options === null || options === void 0 ? void 0 : options.maxStateChangeListeners
|
22766
|
+
const context = new ChatContext$1(options === null || options === void 0 ? void 0 : options.maxStateChangeListeners,
|
22767
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ args.credential);
|
22603
22768
|
let eventSubscriber;
|
22604
22769
|
context.updateChatConfig(communicationCommon.getIdentifierKind(args.userId), args.displayName);
|
22605
22770
|
const proxy = new Proxy(chatClient, proxyChatClient);
|
@@ -24345,17 +24510,6 @@ const ChatScreen = (props) => {
|
|
24345
24510
|
const onRenderFileDownloads = React.useCallback((userId, message) => (React.createElement(_FileDownloadCards, { userId: userId, fileMetadata: message.files || [], downloadHandler: fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler, onDownloadErrorMessage: (errorMessage) => {
|
24346
24511
|
setDownloadErrorMessage(errorMessage);
|
24347
24512
|
} })), [fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler]);
|
24348
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
24349
|
-
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$j(void 0, void 0, void 0, function* () {
|
24350
|
-
const entry = {};
|
24351
|
-
attachment.forEach((target) => {
|
24352
|
-
if (target.attachmentType === 'inlineImage' && target.previewUrl) {
|
24353
|
-
entry[target.id] = target.previewUrl;
|
24354
|
-
}
|
24355
|
-
});
|
24356
|
-
const blob = yield adapter.downloadAttachments({ attachmentUrls: entry });
|
24357
|
-
return blob;
|
24358
|
-
}), [adapter]);
|
24359
24513
|
/* @conditional-compile-remove(image-gallery) */
|
24360
24514
|
const onInlineImageClicked = React.useCallback((attachmentId, messageId) => __awaiter$j(void 0, void 0, void 0, function* () {
|
24361
24515
|
var _a, _b;
|
@@ -24394,6 +24548,7 @@ const ChatScreen = (props) => {
|
|
24394
24548
|
return;
|
24395
24549
|
}
|
24396
24550
|
if (attachment.attachmentType === 'inlineImage' && attachment.url) {
|
24551
|
+
// TBD: Need to begin investigating how to download HQ images.
|
24397
24552
|
const blob = yield adapter.downloadAttachments({ attachmentUrls: { [attachment.id]: attachment.url } });
|
24398
24553
|
if (blob[0]) {
|
24399
24554
|
const blobUrl = blob[0].blobUrl;
|
@@ -24444,8 +24599,6 @@ const ChatScreen = (props) => {
|
|
24444
24599
|
React.createElement(MessageThread, Object.assign({}, messageThreadProps, { onRenderAvatar: onRenderAvatarCallback, onRenderMessage: onRenderMessage,
|
24445
24600
|
/* @conditional-compile-remove(file-sharing) */
|
24446
24601
|
onRenderFileDownloads: onRenderFileDownloads,
|
24447
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
24448
|
-
onFetchAttachments: onRenderInlineAttachment,
|
24449
24602
|
/* @conditional-compile-remove(image-gallery) */
|
24450
24603
|
onInlineImageClicked: onInlineImageClicked, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles })),
|
24451
24604
|
React.createElement(react.Stack, { className: react.mergeStyles(sendboxContainerStyles) },
|
@@ -25763,6 +25916,10 @@ const getLatestCapabilitiesChangedInfo = (state) => {
|
|
25763
25916
|
* @private
|
25764
25917
|
*/
|
25765
25918
|
const getTargetCallees = (state) => state.targetCallees;
|
25919
|
+
/**
|
25920
|
+
* @private
|
25921
|
+
*/
|
25922
|
+
const getStartTime = (state) => { var _a; return (_a = state.call) === null || _a === void 0 ? void 0 : _a.startTime; };
|
25766
25923
|
|
25767
25924
|
// Copyright (c) Microsoft Corporation.
|
25768
25925
|
// Licensed under the MIT License.
|
@@ -25875,122 +26032,6 @@ const People = (props) => {
|
|
25875
26032
|
return (React.createElement(ControlBarButton, Object.assign({}, props, { "data-ui-id": "call-composite-participants-button", strings: strings, labelKey: 'peopleButtonLabelKey', onRenderOnIcon: onRenderOnIcon !== null && onRenderOnIcon !== void 0 ? onRenderOnIcon : icon$2, onRenderOffIcon: onRenderOffIcon !== null && onRenderOffIcon !== void 0 ? onRenderOffIcon : icon$2, onClick: onClick, styles: styles })));
|
25876
26033
|
};
|
25877
26034
|
|
25878
|
-
// Copyright (c) Microsoft Corporation.
|
25879
|
-
// Licensed under the MIT License.
|
25880
|
-
/**
|
25881
|
-
* @private
|
25882
|
-
*/
|
25883
|
-
const themeddialpadModalStyle$1 = (theme) => ({
|
25884
|
-
main: {
|
25885
|
-
borderRadius: theme.effects.roundedCorner6,
|
25886
|
-
padding: '1rem'
|
25887
|
-
}
|
25888
|
-
});
|
25889
|
-
/**
|
25890
|
-
* @private
|
25891
|
-
*/
|
25892
|
-
const themedDialpadStyle$1 = (isMobile, theme) => ({
|
25893
|
-
root: {
|
25894
|
-
padding: 0,
|
25895
|
-
marginLeft: 0,
|
25896
|
-
marginRight: 0,
|
25897
|
-
maxWidth: '100%'
|
25898
|
-
},
|
25899
|
-
textField: {
|
25900
|
-
root: {
|
25901
|
-
borderBottom: `1px solid ${theme.palette.neutralTertiaryAlt}`
|
25902
|
-
},
|
25903
|
-
field: {
|
25904
|
-
backgroundColor: theme.palette.white,
|
25905
|
-
fontSize: theme.fonts.large.fontSize,
|
25906
|
-
padding: '0 0.5rem ',
|
25907
|
-
textAlign: 'center',
|
25908
|
-
':active': {
|
25909
|
-
padding: '0 0.5rem'
|
25910
|
-
}
|
25911
|
-
}
|
25912
|
-
},
|
25913
|
-
digit: {
|
25914
|
-
color: theme.palette.themeDarkAlt
|
25915
|
-
}
|
25916
|
-
});
|
25917
|
-
|
25918
|
-
// Copyright (c) Microsoft Corporation.
|
25919
|
-
// Licensed under the MIT License.
|
25920
|
-
const DEFAULT_Z_INDEX = 1;
|
25921
|
-
const mainScreenContainerStyle = {
|
25922
|
-
height: '100%',
|
25923
|
-
width: '100%'
|
25924
|
-
};
|
25925
|
-
/**
|
25926
|
-
* @private
|
25927
|
-
*/
|
25928
|
-
const mainScreenContainerStyleDesktop = react.mergeStyles(Object.assign(Object.assign({}, mainScreenContainerStyle), { minWidth: '30rem', minHeight: '22rem' // max height of min-height of composite pages (Configuration page)
|
25929
|
-
}));
|
25930
|
-
/**
|
25931
|
-
* @private
|
25932
|
-
*/
|
25933
|
-
const mainScreenContainerStyleMobile = react.mergeStyles(Object.assign(Object.assign({}, mainScreenContainerStyle), { minWidth: '17.5rem', minHeight: '13rem' // max height of min-height of composite pages (Configuration page & Call page)
|
25934
|
-
}));
|
25935
|
-
/**
|
25936
|
-
* @private
|
25937
|
-
* Drawer styles to be used to house the _DrawerComponent on top of other content on the screen.
|
25938
|
-
* @param zIndex: this defaults to DEFAULT_Z_INDEX if unset
|
25939
|
-
*/
|
25940
|
-
const drawerContainerStyles = (zIndex = DEFAULT_Z_INDEX) => ({
|
25941
|
-
root: {
|
25942
|
-
position: 'absolute',
|
25943
|
-
top: 0,
|
25944
|
-
left: 0,
|
25945
|
-
width: '100%',
|
25946
|
-
height: '100%',
|
25947
|
-
// Any zIndex > 0 will work because this is the only absolutely
|
25948
|
-
// positioned element in the container.
|
25949
|
-
zIndex: zIndex
|
25950
|
-
}
|
25951
|
-
});
|
25952
|
-
/**
|
25953
|
-
* @private
|
25954
|
-
* Page container style for leaving page
|
25955
|
-
*/
|
25956
|
-
const leavingPageStyle = (palette) => ({
|
25957
|
-
background: palette.neutralLighterAlt
|
25958
|
-
});
|
25959
|
-
|
25960
|
-
// Copyright (c) Microsoft Corporation.
|
25961
|
-
// Licensed under the MIT License.
|
25962
|
-
/** @private */
|
25963
|
-
const SendDtmfDialpad = (props) => {
|
25964
|
-
const dialpadProps = usePropsFor$1(Dialpad);
|
25965
|
-
const { strings, isMobile, showDialpad, onDismissDialpad } = props;
|
25966
|
-
const theme = react.useTheme();
|
25967
|
-
const onDismissTriggered = () => {
|
25968
|
-
onDismissDialpad();
|
25969
|
-
};
|
25970
|
-
const [textFieldValue, setTextFieldValue] = React.useState();
|
25971
|
-
const onChange = (input) => {
|
25972
|
-
if (input.length > 25) {
|
25973
|
-
setTextFieldValue(input.slice(1));
|
25974
|
-
}
|
25975
|
-
else {
|
25976
|
-
setTextFieldValue(input);
|
25977
|
-
}
|
25978
|
-
};
|
25979
|
-
const dialpadModalStyle = React.useMemo(() => themeddialpadModalStyle$1(theme), [theme]);
|
25980
|
-
const dialpadStyle = React.useMemo(() => themedDialpadStyle$1(isMobile, theme), [theme, isMobile]);
|
25981
|
-
if (isMobile) {
|
25982
|
-
return (React.createElement(react.Stack, null, showDialpad && (React.createElement(react.Stack, { styles: drawerContainerStyles() },
|
25983
|
-
React.createElement(_DrawerSurface, { disableMaxHeight: true, onLightDismiss: onDismissTriggered },
|
25984
|
-
React.createElement(react.Stack, { style: { padding: '1rem' } },
|
25985
|
-
React.createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, textFieldValue: textFieldValue, onChange: onChange, strings: strings, isMobile: isMobile }))))))));
|
25986
|
-
}
|
25987
|
-
return (React.createElement(React.Fragment, null, React.createElement(react.Modal, { titleAriaId: strings.dialpadModalAriaLabel, isOpen: showDialpad, onDismiss: onDismissTriggered, isBlocking: true, styles: dialpadModalStyle },
|
25988
|
-
React.createElement(react.Stack, { horizontal: true, horizontalAlign: "end", verticalAlign: "center" },
|
25989
|
-
React.createElement(react.IconButton, { iconProps: { iconName: 'Cancel' }, ariaLabel: strings.dialpadCloseModalButtonAriaLabel, onClick: onDismissTriggered, style: { color: theme.palette.black } })),
|
25990
|
-
React.createElement(react.Stack, { style: { overflow: 'hidden' } },
|
25991
|
-
React.createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { textFieldValue: textFieldValue, onChange: onChange, showDeleteButton: false, strings: strings, isMobile: isMobile }))))));
|
25992
|
-
};
|
25993
|
-
|
25994
26035
|
// Copyright (c) Microsoft Corporation.
|
25995
26036
|
// Licensed under the MIT License.
|
25996
26037
|
/** @private */
|
@@ -26196,7 +26237,7 @@ const Reaction = (props) => {
|
|
26196
26237
|
const reactionButtonProps = usePropsFor$1(ReactionButton);
|
26197
26238
|
const styles = React.useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
26198
26239
|
const reactionButtonDisabled = isDisabled(props.option) || reactionButtonProps.disabled;
|
26199
|
-
return (React.createElement(ReactionButton, Object.assign({ "data-ui-id": "call-composite-reaction-button" }, reactionButtonProps, { showLabel: props.displayType !== 'compact', disabled: reactionButtonDisabled || props.disabled, styles: styles, disableTooltip: props.disableTooltip, persistMenu: true })));
|
26240
|
+
return (React.createElement(ReactionButton, Object.assign({ "data-ui-id": "call-composite-reaction-button" }, reactionButtonProps, { showLabel: props.displayType !== 'compact', disabled: reactionButtonDisabled || props.disabled, styles: styles, disableTooltip: props.disableTooltip, persistMenu: true, reactionResources: props.reactionResource })));
|
26200
26241
|
};
|
26201
26242
|
/* @conditional-compile-remove(reaction) */
|
26202
26243
|
const isDisabled = (option) => {
|
@@ -26253,12 +26294,6 @@ const CallControls = (props) => {
|
|
26253
26294
|
label: localeStrings.strings.call.moreButtonCallingLabel,
|
26254
26295
|
tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip
|
26255
26296
|
}), [localeStrings]);
|
26256
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
26257
|
-
const dialpadStrings = React.useMemo(() => ({
|
26258
|
-
dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,
|
26259
|
-
dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,
|
26260
|
-
placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText
|
26261
|
-
}), [localeStrings]);
|
26262
26297
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
26263
26298
|
const holdButtonProps = usePropsFor$1(HoldButton);
|
26264
26299
|
/* @conditional-compile-remove(raise-hand) */
|
@@ -26267,8 +26302,6 @@ const CallControls = (props) => {
|
|
26267
26302
|
const capabilitiesSelector = useSelector$1(capabilitySelector);
|
26268
26303
|
/* @conditional-compile-remove(reaction) */
|
26269
26304
|
const isReactionAllowed = !(capabilitiesSelector === null || capabilitiesSelector === void 0 ? void 0 : capabilitiesSelector.capabilities) || capabilitiesSelector.capabilities.useReactions.isPresent;
|
26270
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
26271
|
-
const alternateCallerId = useAdapter().getState().alternateCallerId;
|
26272
26305
|
const devicesButtonProps = usePropsFor$1(DevicesButton);
|
26273
26306
|
let numberOfButtons = 0;
|
26274
26307
|
const screenShareButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.screenShareButton);
|
@@ -26333,21 +26366,6 @@ const CallControls = (props) => {
|
|
26333
26366
|
['data-ui-id']: 'hold-button'
|
26334
26367
|
});
|
26335
26368
|
}
|
26336
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
26337
|
-
// dtmf tone sending only works for 1:1 PSTN call
|
26338
|
-
if (alternateCallerId) {
|
26339
|
-
items.push({
|
26340
|
-
key: 'showDialpadKey',
|
26341
|
-
text: localeStrings.strings.call.openDtmfDialpadLabel,
|
26342
|
-
onClick: () => {
|
26343
|
-
setShowDialpad(true);
|
26344
|
-
},
|
26345
|
-
iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },
|
26346
|
-
itemProps: {
|
26347
|
-
styles: buttonFlyoutIncreasedSizeStyles
|
26348
|
-
}
|
26349
|
-
});
|
26350
|
-
}
|
26351
26369
|
return items;
|
26352
26370
|
};
|
26353
26371
|
const customDrawerButtons = React.useMemo(() => generateCustomCallDesktopOverflowButtons(onFetchCustomButtonPropsTrampoline(typeof options === 'object' ? options : undefined), typeof options === 'object' ? options.displayType : undefined), [options]);
|
@@ -26366,6 +26384,8 @@ const CallControls = (props) => {
|
|
26366
26384
|
showDevicesButtonInControlBar = false;
|
26367
26385
|
showMoreButton = isEnabled$2(options === null || options === void 0 ? void 0 : options.moreButton);
|
26368
26386
|
}
|
26387
|
+
/* @conditional-compile-remove(reaction) */
|
26388
|
+
const reactionResources = adapter.getState().reactions;
|
26369
26389
|
/* @conditional-compile-remove(raise-hand) */
|
26370
26390
|
const raiseHandButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.raiseHandButton);
|
26371
26391
|
/* @conditional-compile-remove(raise-hand) */
|
@@ -26442,26 +26462,18 @@ const CallControls = (props) => {
|
|
26442
26462
|
} }, element));
|
26443
26463
|
});
|
26444
26464
|
}
|
26445
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
26446
|
-
const [showDialpad, setShowDialpad] = React.useState(false);
|
26447
26465
|
const theme = react.useTheme();
|
26448
26466
|
// when props.options is false then we want to hide the whole control bar.
|
26449
26467
|
if (props.options === false) {
|
26450
26468
|
return React.createElement(React.Fragment, null);
|
26451
26469
|
}
|
26452
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
26453
|
-
const onDismissDialpad = () => {
|
26454
|
-
setShowDialpad(false);
|
26455
|
-
};
|
26456
26470
|
return (React.createElement(react.Stack, { horizontalAlign: "center", className: callControlsContainerStyles },
|
26457
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
26458
|
-
React.createElement(SendDtmfDialpad, { isMobile: !!props.isMobile, strings: dialpadStrings, showDialpad: showDialpad, onDismissDialpad: onDismissDialpad }),
|
26459
26471
|
React.createElement(react.Stack.Item, null,
|
26460
26472
|
React.createElement(ControlBar, { layout: props.displayVertical ? 'vertical' : 'horizontal', styles: controlBarStyles(theme.semanticColors.bodyBackground) },
|
26461
26473
|
microphoneButtonIsEnabled && (React.createElement(Microphone, { displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$4(options === null || options === void 0 ? void 0 : options.microphoneButton) })),
|
26462
26474
|
cameraButtonIsEnabled && (React.createElement(Camera, { displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$4(options === null || options === void 0 ? void 0 : options.cameraButton) })),
|
26463
26475
|
/* @conditional-compile-remove(reaction) */
|
26464
|
-
showReactionButtonInControlBar && React.createElement(Reaction, { displayType: options === null || options === void 0 ? void 0 : options.displayType }),
|
26476
|
+
showReactionButtonInControlBar && reactionResources && (React.createElement(Reaction, { displayType: options === null || options === void 0 ? void 0 : options.displayType, reactionResource: reactionResources })),
|
26465
26477
|
/* @conditional-compile-remove(raise-hand) */ showRaiseHandButtonInControlBar &&
|
26466
26478
|
/* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (React.createElement(RaiseHand, { displayType: options === null || options === void 0 ? void 0 : options.displayType })),
|
26467
26479
|
screenShareButtonIsEnabled && (React.createElement(ScreenShare, { option: options === null || options === void 0 ? void 0 : options.screenShareButton, displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$4(options === null || options === void 0 ? void 0 : options.screenShareButton) })),
|
@@ -27196,6 +27208,8 @@ const CommonCallControlBar = (props) => {
|
|
27196
27208
|
const role = (_a = props.callAdapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
|
27197
27209
|
/*@conditional-compile-remove(rooms) */
|
27198
27210
|
const hideRaiseHandButtonInRoomsCall = props.callAdapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);
|
27211
|
+
/*@conditional-compile-remove(reaction) */
|
27212
|
+
const reactionResources = props.callAdapter.getState().reactions;
|
27199
27213
|
return (React.createElement("div", { ref: controlBarSizeRef },
|
27200
27214
|
React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
27201
27215
|
/* @conditional-compile-remove(close-captions) */ showCaptionsSettingsModal && (React.createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: showCaptionsSettingsModal, onDismissCaptionsSettings: onDismissCaptionsSettings, changeCaptionLanguage: props.isCaptionsOn }))),
|
@@ -27216,7 +27230,10 @@ const CommonCallControlBar = (props) => {
|
|
27216
27230
|
/* @conditional-compile-remove(video-background-effects) */
|
27217
27231
|
onClickVideoEffects: props.onClickVideoEffects, componentRef: props.cameraButtonRef, disableTooltip: props.mobileView })),
|
27218
27232
|
/* @conditional-compile-remove(reaction) */
|
27219
|
-
!props.mobileView &&
|
27233
|
+
!props.mobileView &&
|
27234
|
+
isReactionAllowed &&
|
27235
|
+
isEnabled$1(options.reactionButton) &&
|
27236
|
+
reactionResources && (React.createElement(Reaction, { displayType: options.displayType, styles: commonButtonStyles, disabled: props.disableButtonsForHoldScreen, reactionResource: reactionResources })),
|
27220
27237
|
/* @conditional-compile-remove(raise-hand) */ !props.mobileView &&
|
27221
27238
|
isEnabled$1(options.raiseHandButton) &&
|
27222
27239
|
/* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (React.createElement(RaiseHand, { displayType: options.displayType, styles: commonButtonStyles,
|
@@ -27908,6 +27925,48 @@ const PreparedMoreDrawer = (props) => {
|
|
27908
27925
|
return React.createElement(MoreDrawer, Object.assign({}, props, deviceProps, callHandlers, { strings: moreDrawerStrings }));
|
27909
27926
|
};
|
27910
27927
|
|
27928
|
+
// Copyright (c) Microsoft Corporation.
|
27929
|
+
// Licensed under the MIT License.
|
27930
|
+
const DEFAULT_Z_INDEX = 1;
|
27931
|
+
const mainScreenContainerStyle = {
|
27932
|
+
height: '100%',
|
27933
|
+
width: '100%'
|
27934
|
+
};
|
27935
|
+
/**
|
27936
|
+
* @private
|
27937
|
+
*/
|
27938
|
+
const mainScreenContainerStyleDesktop = react.mergeStyles(Object.assign(Object.assign({}, mainScreenContainerStyle), { minWidth: '30rem', minHeight: '22rem' // max height of min-height of composite pages (Configuration page)
|
27939
|
+
}));
|
27940
|
+
/**
|
27941
|
+
* @private
|
27942
|
+
*/
|
27943
|
+
const mainScreenContainerStyleMobile = react.mergeStyles(Object.assign(Object.assign({}, mainScreenContainerStyle), { minWidth: '17.5rem', minHeight: '13rem' // max height of min-height of composite pages (Configuration page & Call page)
|
27944
|
+
}));
|
27945
|
+
/**
|
27946
|
+
* @private
|
27947
|
+
* Drawer styles to be used to house the _DrawerComponent on top of other content on the screen.
|
27948
|
+
* @param zIndex: this defaults to DEFAULT_Z_INDEX if unset
|
27949
|
+
*/
|
27950
|
+
const drawerContainerStyles = (zIndex = DEFAULT_Z_INDEX) => ({
|
27951
|
+
root: {
|
27952
|
+
position: 'absolute',
|
27953
|
+
top: 0,
|
27954
|
+
left: 0,
|
27955
|
+
width: '100%',
|
27956
|
+
height: '100%',
|
27957
|
+
// Any zIndex > 0 will work because this is the only absolutely
|
27958
|
+
// positioned element in the container.
|
27959
|
+
zIndex: zIndex
|
27960
|
+
}
|
27961
|
+
});
|
27962
|
+
/**
|
27963
|
+
* @private
|
27964
|
+
* Page container style for leaving page
|
27965
|
+
*/
|
27966
|
+
const leavingPageStyle = (palette) => ({
|
27967
|
+
background: palette.neutralLighterAlt
|
27968
|
+
});
|
27969
|
+
|
27911
27970
|
// Copyright (c) Microsoft Corporation.
|
27912
27971
|
// Licensed under the MIT License.
|
27913
27972
|
const SIDE_PANE_PADDING_LR_REM = 0.25;
|
@@ -28365,7 +28424,7 @@ const CallingDialpad = (props) => {
|
|
28365
28424
|
const callButtonStyle = React.useMemo(() => themedCallButtonStyle(theme), [theme]);
|
28366
28425
|
const dialpadComponent = () => {
|
28367
28426
|
return (React.createElement(React.Fragment, null,
|
28368
|
-
React.createElement(Dialpad, { styles: dialpadStyle, onChange: setTextFieldInput,
|
28427
|
+
React.createElement(Dialpad, { styles: dialpadStyle, onChange: setTextFieldInput, longPressTrigger: isMobile ? 'touch' : 'mouseAndTouch' }),
|
28369
28428
|
React.createElement(react.PrimaryButton, { text: strings.dialpadStartCallButtonLabel, onRenderIcon: () => DialpadStartCallIconTrampoline(), onClick: onClickCall, styles: callButtonStyle, disabled: textFieldInput === '' })));
|
28370
28429
|
};
|
28371
28430
|
if (isMobile) {
|
@@ -29336,7 +29395,7 @@ const messageBarStyles = {
|
|
29336
29395
|
* @private
|
29337
29396
|
*/
|
29338
29397
|
const CallArrangement = (props) => {
|
29339
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
29398
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
29340
29399
|
const containerClassName = React.useMemo(() => {
|
29341
29400
|
return props.mobileView ? containerStyleMobile : containerStyleDesktop;
|
29342
29401
|
}, [props.mobileView]);
|
@@ -29412,14 +29471,6 @@ const CallArrangement = (props) => {
|
|
29412
29471
|
position: 'relative'
|
29413
29472
|
};
|
29414
29473
|
}, [isMobileWithActivePane, props.mobileView]);
|
29415
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
29416
|
-
const callWithChatStrings = useCallWithChatCompositeStrings();
|
29417
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
29418
|
-
const dialpadStrings = React.useMemo(() => ({
|
29419
|
-
dialpadModalAriaLabel: callWithChatStrings.dialpadModalAriaLabel,
|
29420
|
-
dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,
|
29421
|
-
placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
|
29422
|
-
}), [callWithChatStrings]);
|
29423
29474
|
/* @conditional-compile-remove(video-background-effects) */
|
29424
29475
|
const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;
|
29425
29476
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -29435,18 +29486,6 @@ const CallArrangement = (props) => {
|
|
29435
29486
|
setShowDrawer(false);
|
29436
29487
|
togglePeoplePane();
|
29437
29488
|
}, [togglePeoplePane]);
|
29438
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
29439
|
-
const alternateCallerId = useAdapter().getState().alternateCallerId;
|
29440
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
29441
|
-
const [showDtmfDialpad, setShowDtmfDialpad] = React.useState(false);
|
29442
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
29443
|
-
const onDismissDtmfDialpad = () => {
|
29444
|
-
setShowDtmfDialpad(false);
|
29445
|
-
};
|
29446
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
29447
|
-
const onClickShowDialpad = () => {
|
29448
|
-
setShowDtmfDialpad(true);
|
29449
|
-
};
|
29450
29489
|
const drawerContainerStylesValue = React.useMemo(() => drawerContainerStyles(DRAWER_Z_INDEX), []);
|
29451
29490
|
/* @conditional-compile-remove(rooms) */
|
29452
29491
|
const role = (_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.role;
|
@@ -29499,9 +29538,7 @@ const CallArrangement = (props) => {
|
|
29499
29538
|
/* @conditional-compile-remove(close-captions) */
|
29500
29539
|
isCaptionsOn: isCaptionsOn,
|
29501
29540
|
/* @conditional-compile-remove(video-background-effects) */
|
29502
|
-
onClickVideoEffects: onResolveVideoEffectDependency ? openVideoEffectsPane : undefined,
|
29503
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
29504
|
-
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined, displayVertical: verticalControlBar,
|
29541
|
+
onClickVideoEffects: onResolveVideoEffectDependency ? openVideoEffectsPane : undefined, displayVertical: verticalControlBar,
|
29505
29542
|
/* @conditional-compile-remove(gallery-layouts) */
|
29506
29543
|
onUserSetOverflowGalleryPositionChange: props.onUserSetOverflowGalleryPositionChange,
|
29507
29544
|
/* @conditional-compile-remove(gallery-layouts) */
|
@@ -29514,8 +29551,6 @@ const CallArrangement = (props) => {
|
|
29514
29551
|
dtmfDialerPresent: props.dtmfDialerPresent, peopleButtonRef: peopleButtonRef, cameraButtonRef: cameraButtonRef }))))),
|
29515
29552
|
((_g = props.callControlProps) === null || _g === void 0 ? void 0 : _g.options) !== false && showDrawer && (React.createElement(react.Stack, { styles: drawerContainerStylesValue },
|
29516
29553
|
React.createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
|
29517
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
29518
|
-
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
|
29519
29554
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
29520
29555
|
disableButtonsForHoldScreen: isInLocalHold,
|
29521
29556
|
/* @conditional-compile-remove(close-captions) */
|
@@ -29528,9 +29563,6 @@ const CallArrangement = (props) => {
|
|
29528
29563
|
onSetDialpadPage: props.onSetDialpadPage,
|
29529
29564
|
/* @conditional-compile-remove(dtmf-dialer) */
|
29530
29565
|
dtmfDialerPresent: props.dtmfDialerPresent }))),
|
29531
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
29532
|
-
((_h = props.callControlProps) === null || _h === void 0 ? void 0 : _h.options) !== false && showDtmfDialpad && (React.createElement(react.Stack, { styles: drawerContainerStylesValue },
|
29533
|
-
React.createElement(SendDtmfDialpad, { isMobile: props.mobileView, strings: dialpadStrings, showDialpad: showDtmfDialpad, onDismissDialpad: onDismissDtmfDialpad }))),
|
29534
29566
|
React.createElement(react.Stack, { horizontal: true, grow: true },
|
29535
29567
|
React.createElement(react.Stack.Item, { style: callCompositeContainerCSS },
|
29536
29568
|
React.createElement(react.Stack.Item, { styles: callGalleryStyles, grow: true },
|
@@ -29553,7 +29585,7 @@ const CallArrangement = (props) => {
|
|
29553
29585
|
maxWidth: isVideoPaneOpen ? `${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem` : undefined, minWidth: isVideoPaneOpen ? `${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem` : undefined, updateSidePaneRenderer: props.updateSidePaneRenderer, onPeopleButtonClicked: props.mobileView && !shouldShowPeopleTabHeaderButton(props.callControlProps.options)
|
29554
29586
|
? undefined
|
29555
29587
|
: togglePeoplePane, disablePeopleButton: typeof props.callControlProps.options !== 'boolean' &&
|
29556
|
-
isDisabled$4((
|
29588
|
+
isDisabled$4((_h = props.callControlProps.options) === null || _h === void 0 ? void 0 : _h.participantsButton), onChatButtonClicked: (_j = props.mobileChatTabHeader) === null || _j === void 0 ? void 0 : _j.onClick, disableChatButton: (_k = props.mobileChatTabHeader) === null || _k === void 0 ? void 0 : _k.disabled }),
|
29557
29589
|
props.mobileView && (React.createElement(ModalLocalAndRemotePIP, { modalLayerHostId: props.modalLayerHostId, hidden: !isSidePaneOpen, styles: pipStyles, strings: modalStrings, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition, onDismissSidePane: () => {
|
29558
29590
|
closePeoplePane();
|
29559
29591
|
if (props.onCloseChatPane) {
|
@@ -29628,6 +29660,8 @@ const MediaGallery = (props) => {
|
|
29628
29660
|
const containerHeight = _useContainerHeight(containerRef);
|
29629
29661
|
/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */
|
29630
29662
|
const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;
|
29663
|
+
/* @conditional-compile-remove(reaction) */
|
29664
|
+
const reactionResources = adapter.getState().reactions;
|
29631
29665
|
const layoutBasedOnTilePosition = localVideoTileLayoutTrampoline(
|
29632
29666
|
/* @conditional-compile-remove(click-to-call) */ (_b = props.localVideoTileOptions) === null || _b === void 0 ? void 0 : _b.position);
|
29633
29667
|
const cameraSwitcherProps = React.useMemo(() => {
|
@@ -29675,7 +29709,9 @@ const MediaGallery = (props) => {
|
|
29675
29709
|
? 'hidden'
|
29676
29710
|
: props.isMobile && containerAspectRatio < 1
|
29677
29711
|
? '9:16'
|
29678
|
-
: '16:9'
|
29712
|
+
: '16:9',
|
29713
|
+
/* @conditional-compile-remove(reaction) */
|
29714
|
+
reactionResources: reactionResources })));
|
29679
29715
|
}, [
|
29680
29716
|
videoGalleryProps,
|
29681
29717
|
props.isMobile,
|
@@ -29695,7 +29731,9 @@ const MediaGallery = (props) => {
|
|
29695
29731
|
containerAspectRatio,
|
29696
29732
|
/* @conditional-compile-remove(gallery-layouts) */
|
29697
29733
|
props.userSetGalleryLayout,
|
29698
|
-
layoutBasedOnTilePosition
|
29734
|
+
layoutBasedOnTilePosition,
|
29735
|
+
/* @conditional-compile-remove(reaction) */
|
29736
|
+
reactionResources
|
29699
29737
|
]);
|
29700
29738
|
return (React.createElement("div", { ref: containerRef, style: mediaGalleryContainerStyles },
|
29701
29739
|
React.createElement(Announcer$1, { announcementString: announcerString, ariaLive: 'polite' }),
|
@@ -29963,15 +30001,19 @@ const DtmfDialpadPageContent = (props) => {
|
|
29963
30001
|
React.createElement(Dialpad, { onSendDtmfTone: (tone) => __awaiter$b(void 0, void 0, void 0, function* () {
|
29964
30002
|
/* @conditional-compile-remove(dtmf-dialer) */
|
29965
30003
|
yield adapter.sendDtmfTone(tone);
|
29966
|
-
}), dialpadMode: 'dtmf' }))));
|
30004
|
+
}), longPressTrigger: props.mobileView ? 'touch' : 'mouseAndTouch', dialpadMode: 'dtmf' }))));
|
29967
30005
|
};
|
29968
30006
|
const DtmfDialerContentTimer = () => {
|
29969
30007
|
const [time, setTime] = React.useState(0);
|
29970
30008
|
const elapsedTime = getReadableTime$1(time);
|
29971
|
-
const
|
30009
|
+
const statefulStartTime = useSelector$1(getStartTime);
|
30010
|
+
const startTime = React.useMemo(() => {
|
30011
|
+
return statefulStartTime !== null && statefulStartTime !== void 0 ? statefulStartTime : new Date(Date.now());
|
30012
|
+
}, [statefulStartTime]);
|
29972
30013
|
React.useEffect(() => {
|
29973
30014
|
const interval = setInterval(() => {
|
29974
|
-
|
30015
|
+
var _a;
|
30016
|
+
setTime((_a = new Date(Date.now()).getTime() - (startTime === null || startTime === void 0 ? void 0 : startTime.getTime())) !== null && _a !== void 0 ? _a : 0);
|
29975
30017
|
}, 10);
|
29976
30018
|
return () => {
|
29977
30019
|
clearInterval(interval);
|
@@ -32731,7 +32773,8 @@ class CallContext {
|
|
32731
32773
|
onResolveVideoEffectDependency: (_c = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _c === void 0 ? void 0 : _c.onResolveDependency,
|
32732
32774
|
/* @conditional-compile-remove(video-background-effects) */ selectedVideoBackgroundEffect: undefined,
|
32733
32775
|
cameraStatus: undefined,
|
32734
|
-
/* @conditional-compile-remove(calling-sounds) */ sounds: options === null || options === void 0 ? void 0 : options.callingSounds
|
32776
|
+
/* @conditional-compile-remove(calling-sounds) */ sounds: options === null || options === void 0 ? void 0 : options.callingSounds,
|
32777
|
+
/* @conditional-compile-remove(reaction) */ reactions: options === null || options === void 0 ? void 0 : options.reactionResources
|
32735
32778
|
};
|
32736
32779
|
this.emitter.setMaxListeners((_d = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _d !== void 0 ? _d : 50);
|
32737
32780
|
this.bindPublicMethods();
|