@azure/communication-react 1.7.0-alpha-202307070015 → 1.7.0-alpha-202307110015
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 +63 -3
- package/dist/dist-cjs/communication-react/index.js +156 -92
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/ErrorBar.js +11 -2
- package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +21 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +31 -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 +44 -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.d.ts +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +6 -6
- 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/ConfigurationPageErrorBar.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +16 -21
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +7 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/ErrorTracking.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/ErrorTracking.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/ErrorTracking.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackErrors.d.ts +21 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackErrors.js +43 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackErrors.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +2 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -14
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/index.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +11 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +4 -4
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +5 -7
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
- package/package.json +8 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/videoBackgroundErrorsSelector.d.ts +0 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/videoBackgroundErrorsSelector.js +0 -14
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/videoBackgroundErrorsSelector.js.map +0 -1
@@ -178,7 +178,7 @@ const _isValidIdentifier = (identifier) => {
|
|
178
178
|
// Copyright (c) Microsoft Corporation.
|
179
179
|
// Licensed under the MIT license.
|
180
180
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
181
|
-
var telemetryVersion = '1.7.0-alpha-
|
181
|
+
var telemetryVersion = '1.7.0-alpha-202307110015';
|
182
182
|
|
183
183
|
// Copyright (c) Microsoft Corporation.
|
184
184
|
/**
|
@@ -379,7 +379,7 @@ const getIdentifier = (state) => toFlatCommunicationIdentifier(state.userId);
|
|
379
379
|
/**
|
380
380
|
* @private
|
381
381
|
*/
|
382
|
-
const getLatestErrors$
|
382
|
+
const getLatestErrors$1 = (state) => state.latestErrors;
|
383
383
|
/**
|
384
384
|
* @private
|
385
385
|
*/
|
@@ -5299,13 +5299,17 @@ const ErrorBar = (props) => {
|
|
5299
5299
|
var _a;
|
5300
5300
|
const localeStrings = useLocale$1().strings.errorBar;
|
5301
5301
|
const strings = (_a = props.strings) !== null && _a !== void 0 ? _a : localeStrings;
|
5302
|
+
const trackDismissedErrorsInternally = !props.onDismissError;
|
5302
5303
|
// Timestamp for when this comopnent is first mounted.
|
5303
5304
|
// Never updated through the lifecycle of this component.
|
5304
5305
|
const mountTimestamp = React.useRef(new Date(Date.now()));
|
5305
5306
|
const [dismissedErrors, setDismissedErrors] = React.useState([]);
|
5306
5307
|
// dropDismissalsForInactiveErrors only returns a new object if `dismissedErrors` actually changes.
|
5307
5308
|
// Without this behaviour, this `useEffect` block would cause a render loop.
|
5308
|
-
React.useEffect(() =>
|
5309
|
+
React.useEffect(() => {
|
5310
|
+
trackDismissedErrorsInternally &&
|
5311
|
+
setDismissedErrors(dropDismissalsForInactiveErrors(props.activeErrorMessages, dismissedErrors));
|
5312
|
+
}, [props.activeErrorMessages, dismissedErrors, trackDismissedErrorsInternally]);
|
5309
5313
|
const toShow = errorsToShow(props.activeErrorMessages, dismissedErrors, props.ignorePremountErrors ? mountTimestamp.current : undefined);
|
5310
5314
|
return (React__default['default'].createElement(react.Stack, { "data-ui-id": "error-bar-stack" }, toShow.map((error) => (React__default['default'].createElement(react.MessageBar, Object.assign({}, props, { styles: {
|
5311
5315
|
innerText: {
|
@@ -5321,7 +5325,12 @@ const ErrorBar = (props) => {
|
|
5321
5325
|
height: 0,
|
5322
5326
|
paddingTop: '0.8rem'
|
5323
5327
|
}
|
5324
|
-
}, key: error.type, messageBarType: messageBarType(error.type), messageBarIconProps: messageBarIconProps(error.type), onDismiss: () =>
|
5328
|
+
}, key: error.type, messageBarType: messageBarType(error.type), messageBarIconProps: messageBarIconProps(error.type), onDismiss: () => {
|
5329
|
+
var _a;
|
5330
|
+
return trackDismissedErrorsInternally
|
5331
|
+
? setDismissedErrors(dismissError(dismissedErrors, error))
|
5332
|
+
: (_a = props.onDismissError) === null || _a === void 0 ? void 0 : _a.call(props, error);
|
5333
|
+
}, dismissButtonAriaLabel: strings.dismissButtonAriaLabel, dismissIconProps: { iconName: 'ErrorBarClear' } }), strings[error.type])))));
|
5325
5334
|
};
|
5326
5335
|
|
5327
5336
|
// Copyright (c) Microsoft Corporation.
|
@@ -16783,7 +16792,7 @@ const useSelector$4 = (selector, selectorProps) => {
|
|
16783
16792
|
*
|
16784
16793
|
* @public
|
16785
16794
|
*/
|
16786
|
-
const errorBarSelector$1 = reselect.createSelector([getLatestErrors$
|
16795
|
+
const errorBarSelector$1 = reselect.createSelector([getLatestErrors$1, getDiagnostics, getDeviceManager$1, getEnvironmentInfo], (latestErrors, diagnostics, deviceManager, environmentInfo) => {
|
16787
16796
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
16788
16797
|
// The order in which the errors are returned is significant: The `ErrorBar` shows errors on the UI in that order.
|
16789
16798
|
// There are several options for the ordering:
|
@@ -17239,7 +17248,7 @@ const getTypingIndicators = (state, props) => {
|
|
17239
17248
|
/**
|
17240
17249
|
* @private
|
17241
17250
|
*/
|
17242
|
-
const getLatestErrors
|
17251
|
+
const getLatestErrors = (state) => state.latestErrors;
|
17243
17252
|
|
17244
17253
|
// Copyright (c) Microsoft Corporation.
|
17245
17254
|
/**
|
@@ -17688,7 +17697,7 @@ const chatParticipantListSelector = reselect__namespace.createSelector([getUserI
|
|
17688
17697
|
*
|
17689
17698
|
* @public
|
17690
17699
|
*/
|
17691
|
-
const errorBarSelector = reselect.createSelector([getLatestErrors
|
17700
|
+
const errorBarSelector = reselect.createSelector([getLatestErrors], (latestErrors) => {
|
17692
17701
|
var _a;
|
17693
17702
|
// The order in which the errors are returned is significant: The `ErrorBar` shows errors on the UI in that order.
|
17694
17703
|
// There are several options for the ordering:
|
@@ -20808,6 +20817,49 @@ const adaptCompositeState = (compositeState) => {
|
|
20808
20817
|
compositeState.environmentInfo);
|
20809
20818
|
};
|
20810
20819
|
|
20820
|
+
// Copyright (c) Microsoft Corporation.
|
20821
|
+
// Licensed under the MIT license.
|
20822
|
+
/**
|
20823
|
+
* Take the set of active errors, and filter to only those that are newer than previously dismissed errors or have never been dismissed.
|
20824
|
+
*
|
20825
|
+
* @private
|
20826
|
+
*/
|
20827
|
+
const filterLatestErrors = (activeErrors, trackedErrors) => {
|
20828
|
+
const filteredErrors = activeErrors.filter((activeError) => {
|
20829
|
+
const trackedError = trackedErrors[activeError.type];
|
20830
|
+
return (!trackedError || !trackedError.lastDismissedAt || trackedError.lastDismissedAt < trackedError.mostRecentlyActive);
|
20831
|
+
});
|
20832
|
+
return filteredErrors;
|
20833
|
+
};
|
20834
|
+
/**
|
20835
|
+
* Maintain a record of the most recently active error for each error type.
|
20836
|
+
*
|
20837
|
+
* @private
|
20838
|
+
*/
|
20839
|
+
const updateTrackedErrorsWithActiveErrors = (existingTrackedErrors, activeErrors) => {
|
20840
|
+
var _a, _b;
|
20841
|
+
const trackedErrors = {};
|
20842
|
+
// Only care about active errors. If errors are no longer active we do not track that they have been previously dismissed.
|
20843
|
+
for (const activeError of activeErrors) {
|
20844
|
+
const existingTrackedError = existingTrackedErrors[activeError.type];
|
20845
|
+
trackedErrors[activeError.type] = {
|
20846
|
+
mostRecentlyActive: (_b = (_a = activeError.timestamp) !== null && _a !== void 0 ? _a : existingTrackedError === null || existingTrackedError === void 0 ? void 0 : existingTrackedError.mostRecentlyActive) !== null && _b !== void 0 ? _b : new Date(Date.now()),
|
20847
|
+
lastDismissedAt: existingTrackedError === null || existingTrackedError === void 0 ? void 0 : existingTrackedError.lastDismissedAt
|
20848
|
+
};
|
20849
|
+
}
|
20850
|
+
return trackedErrors;
|
20851
|
+
};
|
20852
|
+
/**
|
20853
|
+
* Create a record for when the error was most recently dismissed for tracking dismissed errors.
|
20854
|
+
*
|
20855
|
+
* @private
|
20856
|
+
*/
|
20857
|
+
const trackErrorAsDismissed = (errorType, trackedErrors) => {
|
20858
|
+
const now = new Date(Date.now());
|
20859
|
+
const existingError = trackedErrors[errorType];
|
20860
|
+
return Object.assign(Object.assign({}, trackedErrors), { [errorType]: Object.assign(Object.assign({}, (existingError || {})), { lastDismissedAt: now }) });
|
20861
|
+
};
|
20862
|
+
|
20811
20863
|
// Copyright (c) Microsoft Corporation.
|
20812
20864
|
// Licensed under the MIT license.
|
20813
20865
|
/**
|
@@ -21147,19 +21199,6 @@ const createParticipantModifier = (createModifiedParticipant) => {
|
|
21147
21199
|
? Object.assign(Object.assign({}, state.call), { remoteParticipants: modifiedParticipants }) : undefined });
|
21148
21200
|
};
|
21149
21201
|
};
|
21150
|
-
/**
|
21151
|
-
* @private
|
21152
|
-
*/
|
21153
|
-
const dismissVideoEffectsError = (toDismiss) => {
|
21154
|
-
var _a;
|
21155
|
-
const now = new Date(Date.now());
|
21156
|
-
const toDismissTimestamp = (_a = toDismiss.timestamp) !== null && _a !== void 0 ? _a : now;
|
21157
|
-
// Record that this error was dismissed for the first time right now.
|
21158
|
-
return {
|
21159
|
-
dismissedAt: now > toDismissTimestamp ? now : toDismissTimestamp,
|
21160
|
-
activeSince: toDismiss.timestamp
|
21161
|
-
};
|
21162
|
-
};
|
21163
21202
|
/* @conditional-compile-remove(video-background-effects) */
|
21164
21203
|
/** @private */
|
21165
21204
|
const getBackgroundEffectFromSelectedEffect = (selectedEffect) => (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'blur'
|
@@ -21167,7 +21206,6 @@ const getBackgroundEffectFromSelectedEffect = (selectedEffect) => (selectedEffec
|
|
21167
21206
|
: (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'replacement'
|
21168
21207
|
? new communicationCallingEffects.BackgroundReplacementEffect({ backgroundImageUrl: selectedEffect.backgroundImageUrl })
|
21169
21208
|
: undefined;
|
21170
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21171
21209
|
/**
|
21172
21210
|
* @remarks this logic should mimic the onToggleCamera in the common call handlers.
|
21173
21211
|
* @private
|
@@ -21771,10 +21809,6 @@ const getSelectedVideoEffect = (state) => state.selectedVideoBackgroundEffect;
|
|
21771
21809
|
* @private
|
21772
21810
|
*/
|
21773
21811
|
const getIsTeamsCall = (state) => state.isTeamsCall;
|
21774
|
-
/**
|
21775
|
-
* @private
|
21776
|
-
*/
|
21777
|
-
const getLatestErrors = (state) => state.latestErrors;
|
21778
21812
|
|
21779
21813
|
// Copyright (c) Microsoft Corporation.
|
21780
21814
|
/**
|
@@ -23942,7 +23976,7 @@ var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
23942
23976
|
const VideoEffectsPaneContent = (props) => {
|
23943
23977
|
const { onDismissError, activeVideoEffectError,
|
23944
23978
|
/* @conditional-compile-remove(video-background-effects) */
|
23945
|
-
|
23979
|
+
activeVideoEffectChange } = props;
|
23946
23980
|
/* @conditional-compile-remove(video-background-effects) */
|
23947
23981
|
const locale = useLocale();
|
23948
23982
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -23997,7 +24031,7 @@ const VideoEffectsPaneContent = (props) => {
|
|
23997
24031
|
effectName: effectKey
|
23998
24032
|
};
|
23999
24033
|
adapter.updateSelectedVideoBackgroundEffect(blurEffect);
|
24000
|
-
|
24034
|
+
activeVideoEffectChange({
|
24001
24035
|
type: 'blur',
|
24002
24036
|
timestamp: new Date(Date.now())
|
24003
24037
|
});
|
@@ -24021,14 +24055,14 @@ const VideoEffectsPaneContent = (props) => {
|
|
24021
24055
|
backgroundImageUrl: backgroundImg.backgroundProps.url
|
24022
24056
|
};
|
24023
24057
|
adapter.updateSelectedVideoBackgroundEffect(replaceEffect);
|
24024
|
-
|
24058
|
+
activeVideoEffectChange({
|
24025
24059
|
type: 'replacement',
|
24026
24060
|
timestamp: new Date(Date.now())
|
24027
24061
|
});
|
24028
24062
|
yield adapter.startVideoBackgroundEffect(replaceEffect);
|
24029
24063
|
}
|
24030
24064
|
}
|
24031
|
-
}), [adapter,
|
24065
|
+
}), [adapter, activeVideoEffectChange, selectableVideoEffects]);
|
24032
24066
|
return VideoEffectsPaneTrampoline(onDismissError, activeVideoEffectError,
|
24033
24067
|
/* @conditional-compile-remove(video-background-effects) */
|
24034
24068
|
selectableVideoEffects,
|
@@ -24036,8 +24070,6 @@ const VideoEffectsPaneContent = (props) => {
|
|
24036
24070
|
onEffectChange);
|
24037
24071
|
};
|
24038
24072
|
const VideoEffectsPaneTrampoline = (onDismissError, activeVideoEffectError, selectableVideoEffects, onEffectChange) => {
|
24039
|
-
/* @conditional-compile-remove(video-background-effects) */
|
24040
|
-
const videoEffectError = activeVideoEffectError && activeVideoEffectError();
|
24041
24073
|
/* @conditional-compile-remove(video-background-effects) */
|
24042
24074
|
const selectedEffect = useSelector$1(activeVideoBackgroundEffectSelector);
|
24043
24075
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -24048,7 +24080,7 @@ const VideoEffectsPaneTrampoline = (onDismissError, activeVideoEffectError, sele
|
|
24048
24080
|
const locale = useLocale();
|
24049
24081
|
/* @conditional-compile-remove(video-background-effects) */
|
24050
24082
|
return (React__default['default'].createElement(react.Stack, { horizontalAlign: "center" },
|
24051
|
-
|
24083
|
+
activeVideoEffectError && isCameraOn && (React__default['default'].createElement(react.MessageBar, { messageBarType: react.MessageBarType.error, onDismiss: () => onDismissError(activeVideoEffectError) }, locale.strings.call.unableToStartVideoEffect)),
|
24052
24084
|
showWarning && (React__default['default'].createElement(react.MessageBar, { messageBarType: react.MessageBarType.warning }, locale.strings.call.cameraOffBackgroundEffectWarningText)),
|
24053
24085
|
React__default['default'].createElement(_VideoBackgroundEffectsPicker, { label: locale.strings.call.videoEffectsPaneBackgroundSelectionTitle, styles: backgroundPickerStyles, options: selectableVideoEffects !== null && selectableVideoEffects !== void 0 ? selectableVideoEffects : [], onChange: onEffectChange, selectedEffectKey: selectedEffect })));
|
24054
24086
|
};
|
@@ -24061,24 +24093,13 @@ const backgroundPickerStyles = {
|
|
24061
24093
|
}
|
24062
24094
|
};
|
24063
24095
|
|
24064
|
-
// Copyright (c) Microsoft Corporation.
|
24065
|
-
/**
|
24066
|
-
* @private
|
24067
|
-
*/
|
24068
|
-
const videoBackgroundErrorsSelector = reselect__namespace.createSelector([getLatestErrors], (errors) => {
|
24069
|
-
if (errors && errors['VideoEffectsFeature.startEffects']) {
|
24070
|
-
return errors['VideoEffectsFeature.startEffects'];
|
24071
|
-
}
|
24072
|
-
return undefined;
|
24073
|
-
});
|
24074
|
-
|
24075
24096
|
// Copyright (c) Microsoft Corporation.
|
24076
24097
|
/** @private */
|
24077
24098
|
const VIDEO_EFFECTS_SIDE_PANE_ID = 'videoeffects';
|
24078
24099
|
/** @private */
|
24079
24100
|
const VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM = 17.5;
|
24080
24101
|
/** @private */
|
24081
|
-
const useVideoEffectsPane = (updateSidePaneRenderer, mobileView) => {
|
24102
|
+
const useVideoEffectsPane = (updateSidePaneRenderer, mobileView, latestErrors, onDismissError) => {
|
24082
24103
|
const closePane = React.useCallback(() => {
|
24083
24104
|
updateSidePaneRenderer(undefined);
|
24084
24105
|
}, [updateSidePaneRenderer]);
|
@@ -24092,23 +24113,21 @@ const useVideoEffectsPane = (updateSidePaneRenderer, mobileView) => {
|
|
24092
24113
|
/* @conditional-compile-remove(video-background-effects) */
|
24093
24114
|
dismissSidePaneButtonAriaLabel: (_b = (_a = locale.strings.call.dismissSidePaneButtonLabel) !== null && _a !== void 0 ? _a : locale.strings.callWithChat.dismissSidePaneButtonLabel) !== null && _b !== void 0 ? _b : 'Close', mobileView: mobileView }));
|
24094
24115
|
}, [closePane, /* @conditional-compile-remove(video-background-effects) */ locale.strings, mobileView]);
|
24095
|
-
|
24096
|
-
const
|
24097
|
-
const onDismissVideoEffectError = React.useCallback((error) => {
|
24098
|
-
setDismissedVideoEffectsError(dismissVideoEffectsError(error));
|
24099
|
-
}, []);
|
24100
|
-
const latestVideoEffectError = useSelector$1(videoBackgroundErrorsSelector);
|
24101
|
-
const activeVideoEffectError = React.useCallback(() => {
|
24102
|
-
if (latestVideoEffectError &&
|
24103
|
-
(!dismissedVideoEffectsError || latestVideoEffectError.timestamp > dismissedVideoEffectsError.dismissedAt) &&
|
24104
|
-
(!activeVideoEffect || latestVideoEffectError.timestamp > activeVideoEffect.timestamp)) {
|
24105
|
-
return latestVideoEffectError;
|
24106
|
-
}
|
24107
|
-
return undefined;
|
24108
|
-
}, [dismissedVideoEffectsError, latestVideoEffectError, activeVideoEffect]);
|
24116
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24117
|
+
const latestVideoEffectError = latestErrors.find((error) => error.type === 'unableToStartVideoEffect');
|
24109
24118
|
const onRenderContent = React.useCallback(() => {
|
24110
|
-
return (React__default['default'].createElement(VideoEffectsPaneContent, { onDismissError:
|
24111
|
-
|
24119
|
+
return (React__default['default'].createElement(VideoEffectsPaneContent, { onDismissError: onDismissError,
|
24120
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24121
|
+
activeVideoEffectError: latestVideoEffectError, activeVideoEffectChange: () => {
|
24122
|
+
// Clear any existing video effects error when the user clicks on a new video effect
|
24123
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24124
|
+
latestVideoEffectError && (onDismissError === null || onDismissError === void 0 ? void 0 : onDismissError(latestVideoEffectError));
|
24125
|
+
} }));
|
24126
|
+
}, [
|
24127
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24128
|
+
latestVideoEffectError,
|
24129
|
+
onDismissError
|
24130
|
+
]);
|
24112
24131
|
const sidePaneRenderer = React.useMemo(() => ({
|
24113
24132
|
headerRenderer: onRenderHeader,
|
24114
24133
|
contentRenderer: onRenderContent,
|
@@ -24482,7 +24501,7 @@ const CallArrangement = (props) => {
|
|
24482
24501
|
placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
|
24483
24502
|
}), [callWithChatStrings]);
|
24484
24503
|
/* @conditional-compile-remove(video-background-effects) */
|
24485
|
-
const { openVideoEffectsPane } = useVideoEffectsPane(props.updateSidePaneRenderer, props.mobileView);
|
24504
|
+
const { openVideoEffectsPane } = useVideoEffectsPane(props.updateSidePaneRenderer, props.mobileView, props.latestErrors, props.onDismissError);
|
24486
24505
|
const [showDrawer, setShowDrawer] = React.useState(false);
|
24487
24506
|
const onMoreButtonClicked = React.useCallback(() => {
|
24488
24507
|
setShowDrawer(true);
|
@@ -24512,19 +24531,19 @@ const CallArrangement = (props) => {
|
|
24512
24531
|
let canUnmute = true;
|
24513
24532
|
/* @conditional-compile-remove(rooms) */
|
24514
24533
|
canUnmute = rolePermissions.microphoneButton;
|
24515
|
-
let
|
24534
|
+
let filteredLatestErrors = props.errorBarProps !== false ? props.latestErrors : [];
|
24516
24535
|
/* @conditional-compile-remove(video-background-effects) */
|
24517
24536
|
const isCameraOn = useSelector$1(localVideoSelector).isAvailable;
|
24518
24537
|
/* @conditional-compile-remove(rooms) */
|
24519
24538
|
// TODO: move this logic to the error bar selector once role is plumbed from the headless SDK
|
24520
24539
|
if (!rolePermissions.cameraButton && props.errorBarProps) {
|
24521
|
-
|
24540
|
+
filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari');
|
24522
24541
|
}
|
24523
24542
|
/* @conditional-compile-remove(video-background-effects) */
|
24524
24543
|
const isVideoPaneOpen = useIsParticularSidePaneOpen(VIDEO_EFFECTS_SIDE_PANE_ID);
|
24525
24544
|
/* @conditional-compile-remove(video-background-effects) */
|
24526
24545
|
if ((isVideoPaneOpen || !isCameraOn) && props.errorBarProps) {
|
24527
|
-
|
24546
|
+
filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'unableToStartVideoEffect');
|
24528
24547
|
}
|
24529
24548
|
/* @conditional-compile-remove(close-captions) */
|
24530
24549
|
const isTeamsCall = useSelector$1(getIsTeamsCall);
|
@@ -24566,8 +24585,8 @@ const CallArrangement = (props) => {
|
|
24566
24585
|
React__default['default'].createElement(react.Stack.Item, { styles: notificationsContainerStyles },
|
24567
24586
|
React__default['default'].createElement(react.Stack, { styles: bannerNotificationStyles },
|
24568
24587
|
React__default['default'].createElement(_ComplianceBanner, Object.assign({}, props.complianceBannerProps))),
|
24569
|
-
errorBarProps !== false && (React__default['default'].createElement(react.Stack, { styles: bannerNotificationStyles },
|
24570
|
-
React__default['default'].createElement(ErrorBar, Object.assign({}, errorBarProps)))),
|
24588
|
+
props.errorBarProps !== false && (React__default['default'].createElement(react.Stack, { styles: bannerNotificationStyles },
|
24589
|
+
React__default['default'].createElement(ErrorBar, Object.assign({}, props.errorBarProps, { onDismissError: props.onDismissError, activeErrorMessages: filteredLatestErrors })))),
|
24571
24590
|
canUnmute && !!props.mutedNotificationProps && (React__default['default'].createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps)))),
|
24572
24591
|
props.onRenderGalleryContent && props.onRenderGalleryContent(),
|
24573
24592
|
/* @conditional-compile-remove(close-captions) */
|
@@ -25047,9 +25066,7 @@ const CallPage = (props) => {
|
|
25047
25066
|
// Reduce the controls shown when mobile view is enabled.
|
25048
25067
|
const callControlOptions = mobileView ? reduceCallControlsForMobile(options === null || options === void 0 ? void 0 : options.callControls) : options === null || options === void 0 ? void 0 : options.callControls;
|
25049
25068
|
const drawerMenuHostId = reactHooks.useId('drawerMenuHost');
|
25050
|
-
return (React__default['default'].createElement(CallArrangement, { id: drawerMenuHostId, complianceBannerProps: Object.assign(Object.assign({}, complianceBannerProps), { strings }),
|
25051
|
-
// Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.
|
25052
|
-
errorBarProps: (options === null || options === void 0 ? void 0 : options.errorBar) !== false && Object.assign(Object.assign({}, errorBarProps), { ignorePremountErrors: true }), mutedNotificationProps: mutedNotificationProps, callControlProps: {
|
25069
|
+
return (React__default['default'].createElement(CallArrangement, { id: drawerMenuHostId, complianceBannerProps: Object.assign(Object.assign({}, complianceBannerProps), { strings }), errorBarProps: (options === null || options === void 0 ? void 0 : options.errorBar) !== false && errorBarProps, mutedNotificationProps: mutedNotificationProps, callControlProps: {
|
25053
25070
|
callInvitationURL: callInvitationURL,
|
25054
25071
|
onFetchParticipantMenuItems: onFetchParticipantMenuItems,
|
25055
25072
|
options: callControlOptions,
|
@@ -25060,7 +25077,7 @@ const CallPage = (props) => {
|
|
25060
25077
|
/* @conditional-compile-remove(pinned-participants) */
|
25061
25078
|
remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenu, drawerMenuHostId: drawerMenuHostId,
|
25062
25079
|
/* @conditional-compile-remove(click-to-call) */
|
25063
|
-
localVideoTileOptions: options === null || options === void 0 ? void 0 : options.localVideoTile }))) : (React__default['default'].createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps)))) : (React__default['default'].createElement(React__default['default'].Fragment, null)), updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, dataUiId: 'call-page' }));
|
25080
|
+
localVideoTileOptions: options === null || options === void 0 ? void 0 : options.localVideoTile }))) : (React__default['default'].createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps)))) : (React__default['default'].createElement(React__default['default'].Fragment, null)), updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, dataUiId: 'call-page', latestErrors: props.latestErrors, onDismissError: props.onDismissError }));
|
25064
25081
|
};
|
25065
25082
|
/**
|
25066
25083
|
* @private
|
@@ -25665,9 +25682,9 @@ const ConfigurationPageErrorBar = (props) => {
|
|
25665
25682
|
};
|
25666
25683
|
/* @conditional-compile-remove(call-readiness) */
|
25667
25684
|
if (showTroubleShootingErrorBar) {
|
25668
|
-
return (React__default['default'].createElement(_TroubleshootingGuideErrorBar, Object.assign({ troubleshootingGuideStrings: permissionTroubleshootingGuideStrings, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick, onNetworkingTroubleshootingClick: onNetworkingTroubleShootingClick, permissionsState: permissionsState }, errorBarProps)));
|
25685
|
+
return (React__default['default'].createElement(_TroubleshootingGuideErrorBar, Object.assign({ troubleshootingGuideStrings: permissionTroubleshootingGuideStrings, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick, onNetworkingTroubleshootingClick: onNetworkingTroubleShootingClick, permissionsState: permissionsState }, errorBarProps, { onDismissError: props.onDismissError })));
|
25669
25686
|
}
|
25670
|
-
return React__default['default'].createElement(ErrorBar, Object.assign({}, errorBarProps));
|
25687
|
+
return React__default['default'].createElement(ErrorBar, Object.assign({}, errorBarProps, { onDismissError: props.onDismissError }));
|
25671
25688
|
};
|
25672
25689
|
|
25673
25690
|
// Copyright (c) Microsoft Corporation.
|
@@ -25893,7 +25910,7 @@ const ConfigurationPage = (props) => {
|
|
25893
25910
|
const [audioState, setAudioState] = React.useState(undefined);
|
25894
25911
|
/* @conditional-compile-remove(call-readiness) */
|
25895
25912
|
getDevicePermissionState(setVideoState, setAudioState);
|
25896
|
-
|
25913
|
+
const errorBarProps = usePropsFor$1(ErrorBar);
|
25897
25914
|
const adapter = useAdapter();
|
25898
25915
|
const deviceState = adapter.getState().devices;
|
25899
25916
|
/* @conditional-compile-remove(unsupported-browser) */
|
@@ -25903,14 +25920,15 @@ const ConfigurationPage = (props) => {
|
|
25903
25920
|
const rolePermissions = _usePermissions();
|
25904
25921
|
/* @conditional-compile-remove(video-background-effects) */
|
25905
25922
|
const isCameraOn = useSelector$1(localVideoSelector).isAvailable;
|
25923
|
+
let filteredLatestErrors = props.latestErrors;
|
25906
25924
|
/* @conditional-compile-remove(rooms) */
|
25907
25925
|
// TODO: move this logic to the error bar selector once role is plumbed from the headless SDK
|
25908
25926
|
if (!rolePermissions.cameraButton) {
|
25909
|
-
|
25927
|
+
filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari');
|
25910
25928
|
}
|
25911
25929
|
/* @conditional-compile-remove(video-background-effects) */
|
25912
25930
|
if ((useIsParticularSidePaneOpen('videoeffects') || !isCameraOn) && errorBarProps) {
|
25913
|
-
|
25931
|
+
filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'unableToStartVideoEffect');
|
25914
25932
|
}
|
25915
25933
|
/* @conditional-compile-remove(rooms) */
|
25916
25934
|
if (!rolePermissions.microphoneButton) {
|
@@ -25972,7 +25990,7 @@ const ConfigurationPage = (props) => {
|
|
25972
25990
|
/* @conditional-compile-remove(call-readiness) */
|
25973
25991
|
const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;
|
25974
25992
|
/* @conditional-compile-remove(video-background-effects) */
|
25975
|
-
const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(props.updateSidePaneRenderer, mobileView);
|
25993
|
+
const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(props.updateSidePaneRenderer, mobileView, props.latestErrors, props.onDismissError);
|
25976
25994
|
const startCall = React.useCallback(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
25977
25995
|
/* @conditional-compile-remove(video-background-effects) */
|
25978
25996
|
closeVideoEffectsPane();
|
@@ -25981,6 +25999,7 @@ const ConfigurationPage = (props) => {
|
|
25981
25999
|
const panelLayerProps = React.useMemo(() => ({
|
25982
26000
|
hostId: modalLayerHostId
|
25983
26001
|
}), [modalLayerHostId]);
|
26002
|
+
const filteredErrorBarProps = React.useMemo(() => (Object.assign(Object.assign({}, errorBarProps), { activeErrorMessages: filteredLatestErrors })), [errorBarProps, filteredLatestErrors]);
|
25984
26003
|
return (React__default['default'].createElement(react.Stack, { className: mobileView ? configurationContainerStyleMobile : configurationContainerStyleDesktop },
|
25985
26004
|
React__default['default'].createElement(react.Stack, { styles: bannerNotificationStyles },
|
25986
26005
|
React__default['default'].createElement(ConfigurationPageErrorBar
|
@@ -25995,7 +26014,7 @@ const ConfigurationPage = (props) => {
|
|
25995
26014
|
/* @conditional-compile-remove(call-readiness) */
|
25996
26015
|
onNetworkingTroubleShootingClick: onNetworkingTroubleShootingClick,
|
25997
26016
|
/* @conditional-compile-remove(call-readiness) */
|
25998
|
-
onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick, errorBarProps:
|
26017
|
+
onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick, errorBarProps: filteredErrorBarProps, onDismissError: props.onDismissError })),
|
25999
26018
|
/* @conditional-compile-remove(call-readiness) */
|
26000
26019
|
// show the following screen if permission API is availible (not unsupported) and videoState, audioState is assigned values
|
26001
26020
|
videoState && videoState !== 'unsupported' && audioState && audioState !== 'unsupported' && (React__default['default'].createElement(CallReadinessModal, { modalLayerHostId: modalLayerHostId, mobileView: mobileView,
|
@@ -26175,12 +26194,10 @@ const LobbyPage = (props) => {
|
|
26175
26194
|
? reduceCallControlsForMobile((_b = props.options) === null || _b === void 0 ? void 0 : _b.callControls)
|
26176
26195
|
: (_c = props.options) === null || _c === void 0 ? void 0 : _c.callControls;
|
26177
26196
|
callControlOptions = disableCallControls(callControlOptions, ['screenShareButton', 'participantsButton']);
|
26178
|
-
return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: { strings },
|
26179
|
-
// Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.
|
26180
|
-
errorBarProps: ((_d = props.options) === null || _d === void 0 ? void 0 : _d.errorBar) !== false && Object.assign(Object.assign({}, errorBarProps), { ignorePremountErrors: true }), callControlProps: {
|
26197
|
+
return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: { strings }, errorBarProps: ((_d = props.options) === null || _d === void 0 ? void 0 : _d.errorBar) !== false && errorBarProps, callControlProps: {
|
26181
26198
|
options: callControlOptions,
|
26182
26199
|
increaseFlyoutItemSize: props.mobileView
|
26183
|
-
}, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => (React__default['default'].createElement(LobbyTile, Object.assign({}, lobbyProps, { overlayProps: overlayProps(strings, inLobby, Object.values(participants)) }))), dataUiId: 'lobby-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader }));
|
26200
|
+
}, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => (React__default['default'].createElement(LobbyTile, Object.assign({}, lobbyProps, { overlayProps: overlayProps(strings, inLobby, Object.values(participants)) }))), dataUiId: 'lobby-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError }));
|
26184
26201
|
};
|
26185
26202
|
const overlayProps = (strings, inLobby, remoteParticipants) => {
|
26186
26203
|
/**
|
@@ -26334,14 +26351,14 @@ const TransferPage = (props) => {
|
|
26334
26351
|
React__default['default'].createElement(Announcer$1, { announcementString: announcerString, ariaLive: "polite" }),
|
26335
26352
|
React__default['default'].createElement(CallArrangement, { complianceBannerProps: { strings },
|
26336
26353
|
// Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.
|
26337
|
-
errorBarProps: ((_e = props.options) === null || _e === void 0 ? void 0 : _e.errorBar) !== false &&
|
26354
|
+
errorBarProps: ((_e = props.options) === null || _e === void 0 ? void 0 : _e.errorBar) !== false && errorBarProps, callControlProps: {
|
26338
26355
|
options: callControlOptions,
|
26339
26356
|
increaseFlyoutItemSize: props.mobileView
|
26340
26357
|
}, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => (React__default['default'].createElement(TransferTile, { userId: transferTileParticipant ? toFlatCommunicationIdentifier(transferTileParticipant === null || transferTileParticipant === void 0 ? void 0 : transferTileParticipant.identifier) : undefined, displayName: transferParticipantDisplayName, initialsName: transferParticipantDisplayName,
|
26341
26358
|
/* @conditional-compile-remove(call-transfer) */
|
26342
26359
|
statusText: pageSubject === 'transferTarget'
|
26343
26360
|
? strings.transferPageTransferTargetText
|
26344
|
-
: strings.transferPageTransferorText, onRenderAvatar: props.onRenderAvatar, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData })), dataUiId: 'transfer-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader })));
|
26361
|
+
: strings.transferPageTransferorText, onRenderAvatar: props.onRenderAvatar, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData })), dataUiId: 'transfer-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError })));
|
26345
26362
|
};
|
26346
26363
|
const TransferTile = (props) => {
|
26347
26364
|
const { displayName, initialsName, userId, onRenderAvatar, onFetchAvatarPersonaData, statusText } = props;
|
@@ -26557,12 +26574,10 @@ const HoldPage = (props) => {
|
|
26557
26574
|
/* @conditional-compile-remove(one-to-n-calling) */
|
26558
26575
|
'holdButton'
|
26559
26576
|
]);
|
26560
|
-
return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: { strings },
|
26561
|
-
// Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.
|
26562
|
-
errorBarProps: ((_c = props.options) === null || _c === void 0 ? void 0 : _c.errorBar) !== false && Object.assign(Object.assign({}, errorBarProps), { ignorePremountErrors: true }), callControlProps: {
|
26577
|
+
return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: { strings }, errorBarProps: ((_c = props.options) === null || _c === void 0 ? void 0 : _c.errorBar) !== false && errorBarProps, callControlProps: {
|
26563
26578
|
options: callControlOptions,
|
26564
26579
|
increaseFlyoutItemSize: props.mobileView
|
26565
|
-
}, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => React__default['default'].createElement(HoldPane, null), dataUiId: 'hold-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader }));
|
26580
|
+
}, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => React__default['default'].createElement(HoldPane, null), dataUiId: 'hold-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError }));
|
26566
26581
|
};
|
26567
26582
|
|
26568
26583
|
// Copyright (c) Microsoft Corporation.
|
@@ -26645,6 +26660,18 @@ const MainScreen = (props) => {
|
|
26645
26660
|
React.useEffect(() => {
|
26646
26661
|
onSidePaneIdChange === null || onSidePaneIdChange === void 0 ? void 0 : onSidePaneIdChange(sidePaneRenderer === null || sidePaneRenderer === void 0 ? void 0 : sidePaneRenderer.id);
|
26647
26662
|
}, [sidePaneRenderer === null || sidePaneRenderer === void 0 ? void 0 : sidePaneRenderer.id, onSidePaneIdChange]);
|
26663
|
+
// Track the last dismissed errors of any error kind to prevent errors from re-appearing on subsequent page navigation
|
26664
|
+
// This works by tracking the most recent timestamp of any active error type.
|
26665
|
+
// And then tracking when that error type was last dismissed.
|
26666
|
+
const activeErrors = usePropsFor$1(ErrorBar).activeErrorMessages;
|
26667
|
+
const [trackedErrors, setTrackedErrors] = React.useState({});
|
26668
|
+
React.useEffect(() => {
|
26669
|
+
setTrackedErrors((prev) => updateTrackedErrorsWithActiveErrors(prev, activeErrors));
|
26670
|
+
}, [activeErrors]);
|
26671
|
+
const onDismissError = React.useCallback((error) => {
|
26672
|
+
setTrackedErrors((prev) => trackErrorAsDismissed(error.type, prev));
|
26673
|
+
}, []);
|
26674
|
+
const latestErrors = React.useMemo(() => filterLatestErrors(activeErrors, trackedErrors), [activeErrors, trackedErrors]);
|
26648
26675
|
const adapter = useAdapter();
|
26649
26676
|
const locale = useLocale();
|
26650
26677
|
const palette = useTheme().palette;
|
@@ -26665,7 +26692,7 @@ const MainScreen = (props) => {
|
|
26665
26692
|
case 'configuration':
|
26666
26693
|
pageElement = (React__default['default'].createElement(ConfigurationPage, { mobileView: props.mobileView, startCallHandler: () => {
|
26667
26694
|
adapter.joinCall();
|
26668
|
-
}, updateSidePaneRenderer: setSidePaneRenderer, modalLayerHostId: props.modalLayerHostId,
|
26695
|
+
}, updateSidePaneRenderer: setSidePaneRenderer, latestErrors: latestErrors, onDismissError: onDismissError, modalLayerHostId: props.modalLayerHostId,
|
26669
26696
|
/* @conditional-compile-remove(call-readiness) */
|
26670
26697
|
deviceChecks: (_a = props.options) === null || _a === void 0 ? void 0 : _a.deviceChecks,
|
26671
26698
|
/* @conditional-compile-remove(call-readiness) */
|
@@ -26691,18 +26718,18 @@ const MainScreen = (props) => {
|
|
26691
26718
|
break;
|
26692
26719
|
}
|
26693
26720
|
case 'lobby':
|
26694
|
-
pageElement = (React__default['default'].createElement(LobbyPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader }));
|
26721
|
+
pageElement = (React__default['default'].createElement(LobbyPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: latestErrors, onDismissError: onDismissError }));
|
26695
26722
|
break;
|
26696
26723
|
/* @conditional-compile-remove(call-transfer) */
|
26697
26724
|
case 'transferring':
|
26698
|
-
pageElement = (React__default['default'].createElement(TransferPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onRenderAvatar: onRenderAvatar, onFetchAvatarPersonaData: onFetchAvatarPersonaData }));
|
26725
|
+
pageElement = (React__default['default'].createElement(TransferPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onRenderAvatar: onRenderAvatar, onFetchAvatarPersonaData: onFetchAvatarPersonaData, latestErrors: latestErrors, onDismissError: onDismissError }));
|
26699
26726
|
break;
|
26700
26727
|
case 'call':
|
26701
|
-
pageElement = (React__default['default'].createElement(CallPage, { onRenderAvatar: onRenderAvatar, callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader }));
|
26728
|
+
pageElement = (React__default['default'].createElement(CallPage, { onRenderAvatar: onRenderAvatar, callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: latestErrors, onDismissError: onDismissError }));
|
26702
26729
|
break;
|
26703
26730
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
26704
26731
|
case 'hold':
|
26705
|
-
pageElement = (React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(HoldPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader })));
|
26732
|
+
pageElement = (React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(HoldPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: latestErrors, onDismissError: onDismissError })));
|
26706
26733
|
break;
|
26707
26734
|
}
|
26708
26735
|
/* @conditional-compile-remove(unsupported-browser) */
|
@@ -27248,6 +27275,7 @@ class AzureCommunicationCallAdapter {
|
|
27248
27275
|
this.getState.bind(this);
|
27249
27276
|
this.dispose.bind(this);
|
27250
27277
|
this.joinCall.bind(this);
|
27278
|
+
this.joinCallWithOptions.bind(this);
|
27251
27279
|
this.leaveCall.bind(this);
|
27252
27280
|
this.setCamera.bind(this);
|
27253
27281
|
this.setMicrophone.bind(this);
|
@@ -27368,6 +27396,32 @@ class AzureCommunicationCallAdapter {
|
|
27368
27396
|
return call;
|
27369
27397
|
});
|
27370
27398
|
}
|
27399
|
+
joinCallWithOptions(options) {
|
27400
|
+
var _a, _b;
|
27401
|
+
if (_isInCall((_b = (_a = this.getState().call) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : 'None')) {
|
27402
|
+
throw new Error('You are already in the call!');
|
27403
|
+
}
|
27404
|
+
const { microphoneOn, cameraOn } = options !== null && options !== void 0 ? options : {};
|
27405
|
+
return this.teeErrorToEventEmitter(() => {
|
27406
|
+
const audioOptions = { muted: !(microphoneOn !== null && microphoneOn !== void 0 ? microphoneOn : this.getState().isLocalPreviewMicrophoneEnabled) };
|
27407
|
+
const selectedCamera = getSelectedCameraFromAdapterState(this.getState());
|
27408
|
+
const localStream = selectedCamera ? new communicationCalling.LocalVideoStream(selectedCamera) : undefined;
|
27409
|
+
const videoOptions = localStream && cameraOn ? { localVideoStreams: [localStream] } : {};
|
27410
|
+
/* @conditional-compile-remove(teams-adhoc-call) */
|
27411
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
27412
|
+
if (isOutboundCall(this.locator)) {
|
27413
|
+
const phoneNumber = this.getState().alternateCallerId;
|
27414
|
+
return this.startCall(this.locator.participantIds, {
|
27415
|
+
alternateCallerId: phoneNumber ? { phoneNumber: phoneNumber } : undefined,
|
27416
|
+
audioOptions,
|
27417
|
+
videoOptions
|
27418
|
+
});
|
27419
|
+
}
|
27420
|
+
const call = this._joinCall(audioOptions, videoOptions);
|
27421
|
+
this.processNewCall(call);
|
27422
|
+
return call;
|
27423
|
+
});
|
27424
|
+
}
|
27371
27425
|
_joinCall(audioOptions, videoOptions) {
|
27372
27426
|
const isTeamsMeeting = 'meetingLink' in this.locator;
|
27373
27427
|
/* @conditional-compile-remove(rooms) */
|
@@ -28081,6 +28135,7 @@ beforeDispose) => {
|
|
28081
28135
|
*/
|
28082
28136
|
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$3(void 0, void 0, void 0, function* () {
|
28083
28137
|
const deviceManager = (yield callClient.getDeviceManager());
|
28138
|
+
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones(), deviceManager.getSpeakers()]);
|
28084
28139
|
/* @conditional-compile-remove(unsupported-browser) */
|
28085
28140
|
yield callClient.feature(communicationCalling.Features.DebugInfo).getEnvironmentInfo();
|
28086
28141
|
return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager,
|
@@ -28097,6 +28152,7 @@ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, lo
|
|
28097
28152
|
*/
|
28098
28153
|
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$3(void 0, void 0, void 0, function* () {
|
28099
28154
|
const deviceManager = (yield callClient.getDeviceManager());
|
28155
|
+
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones(), deviceManager.getSpeakers()]);
|
28100
28156
|
/* @conditional-compile-remove(unsupported-browser) */
|
28101
28157
|
yield callClient.feature(communicationCalling.Features.DebugInfo).getEnvironmentInfo();
|
28102
28158
|
return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager, options);
|
@@ -28195,6 +28251,9 @@ class CallWithChatBackedCallAdapter {
|
|
28195
28251
|
this.joinCall = (microphoneOn) => {
|
28196
28252
|
return this.callWithChatAdapter.joinCall(microphoneOn);
|
28197
28253
|
};
|
28254
|
+
this.joinCallWithOptions = (options) => {
|
28255
|
+
return this.callWithChatAdapter.joinCallWithOptions(options);
|
28256
|
+
};
|
28198
28257
|
this.leaveCall = (forEveryone) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(forEveryone); });
|
28199
28258
|
this.startCall = (participants, options) => {
|
28200
28259
|
let communicationParticipants = participants;
|
@@ -28951,6 +29010,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
28951
29010
|
}
|
28952
29011
|
bindPublicMethods() {
|
28953
29012
|
this.joinCall.bind(this);
|
29013
|
+
this.joinCallWithOptions.bind(this);
|
28954
29014
|
this.leaveCall.bind(this);
|
28955
29015
|
this.startCall.bind(this);
|
28956
29016
|
this.onStateChange.bind(this);
|
@@ -29026,6 +29086,10 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29026
29086
|
joinCall(microphoneOn) {
|
29027
29087
|
return this.callAdapter.joinCall(microphoneOn);
|
29028
29088
|
}
|
29089
|
+
/** Join existing Call. */
|
29090
|
+
joinCallWithOptions(options) {
|
29091
|
+
return this.callAdapter.joinCallWithOptions(options);
|
29092
|
+
}
|
29029
29093
|
/** Leave current Call. */
|
29030
29094
|
leaveCall(forEveryone) {
|
29031
29095
|
return __awaiter(this, void 0, void 0, function* () {
|