@azure/communication-react 1.4.2-alpha-202211220015.0 → 1.4.2-alpha-202211230015.0

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.
Files changed (47) hide show
  1. package/dist/communication-react.d.ts +34 -4
  2. package/dist/dist-cjs/communication-react/index.js +84 -37
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +1 -0
  7. package/dist/dist-esm/calling-component-bindings/src/index.js +2 -0
  8. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -0
  10. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +12 -0
  11. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  12. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +5 -0
  13. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  14. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -0
  15. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +7 -0
  16. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  17. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +19 -0
  18. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js +1 -2
  20. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js.map +1 -1
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +5 -6
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +7 -6
  24. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +17 -10
  25. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  26. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +20 -0
  27. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -0
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +6 -1
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +1 -1
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +8 -1
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +5 -0
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +5 -0
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +8 -1
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +8 -4
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  41. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -1
  42. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +10 -5
  43. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  44. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +3 -0
  45. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +3 -1
  46. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  47. package/package.json +8 -8
@@ -44,6 +44,7 @@ import { DeviceAccess } from '@azure/communication-calling';
44
44
  import { DeviceManager } from '@azure/communication-calling';
45
45
  import { DominantSpeakersInfo } from '@azure/communication-calling';
46
46
  import { DtmfTone as DtmfTone_2 } from '@azure/communication-calling';
47
+ import { EnvironmentInfo } from '@azure/communication-calling';
47
48
  import { GroupCallLocator } from '@azure/communication-calling';
48
49
  import { IButtonProps } from '@fluentui/react';
49
50
  import { IButtonStyles } from '@fluentui/react';
@@ -290,6 +291,10 @@ export declare type AzureCommunicationCallAdapterOptions = {
290
291
  * {@link CallComposite}. The true role of the user will be synced with ACS services when a Rooms call starts.
291
292
  */
292
293
  roleHint?: Role;
294
+ /**
295
+ * Optional feature flags to be enabled in the CallAdapter.
296
+ */
297
+ features?: CallAdapterOptionalFeatures;
293
298
  };
294
299
 
295
300
  /**
@@ -304,6 +309,7 @@ export declare type AzureCommunicationCallWithChatAdapterArgs = {
304
309
  credential: CommunicationTokenCredential;
305
310
  locator: CallAndChatLocator | TeamsMeetingLinkLocator;
306
311
  alternateCallerId?: string;
312
+ callAdapterOptions?: AzureCommunicationCallAdapterOptions;
307
313
  };
308
314
 
309
315
  /**
@@ -695,6 +701,14 @@ export declare type CallAdapterClientState = {
695
701
  * Azure communications Phone number to make PSTN calls with.
696
702
  */
697
703
  alternateCallerId?: string;
704
+ /**
705
+ * Environment information about system the adapter is made on
706
+ */
707
+ environmentInfo?: EnvironmentInfo;
708
+ /**
709
+ * Optional features that are to be enabled through the adapter.
710
+ */
711
+ features?: CallAdapterOptionalFeatures;
698
712
  /**
699
713
  * Use this to hint the role of the user when the role is not available before a Rooms call is started. This value
700
714
  * should be obtained using the Rooms API. This role will determine permissions in the configuration page of the
@@ -787,6 +801,18 @@ export declare interface CallAdapterDeviceManagement {
787
801
  */
788
802
  export declare type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator | /* @conditional-compile-remove(rooms) */ RoomCallLocator | /* @conditional-compile-remove(teams-adhoc-call) */ /* @conditional-compile-remove(PSTN-calls) */ CallParticipantsLocator;
789
803
 
804
+ /**
805
+ * options object to enable opt in features for the CallAdapter
806
+ *
807
+ * @beta
808
+ */
809
+ export declare type CallAdapterOptionalFeatures = {
810
+ /**
811
+ * Feature flag for enabling the unsupported environment logic in the CallAdapter.
812
+ */
813
+ unsupportedEnvironment?: boolean;
814
+ };
815
+
790
816
  /**
791
817
  * {@link CallAdapter} state.
792
818
  *
@@ -1056,6 +1082,10 @@ export declare interface CallClientState {
1056
1082
  * be used as the caller id in the PSTN call.
1057
1083
  */
1058
1084
  alternateCallerId?: string;
1085
+ /**
1086
+ * state to track the environment that the stateful client was made in is supported
1087
+ */
1088
+ environmentInfo?: EnvironmentInfo;
1059
1089
  }
1060
1090
 
1061
1091
  /**
@@ -2262,6 +2292,8 @@ export declare interface CallWithChatClientState {
2262
2292
  isTeamsCall: boolean;
2263
2293
  /** alternateCallerId for PSTN call */
2264
2294
  alternateCallerId?: string | undefined;
2295
+ /** Environment information for system adapter is made on */
2296
+ environmentInfo?: EnvironmentInfo;
2265
2297
  }
2266
2298
 
2267
2299
  /**
@@ -3999,9 +4031,7 @@ export declare const createAzureCommunicationCallAdapter: ({ userId, displayName
3999
4031
  *
4000
4032
  * @public
4001
4033
  */
4002
- export declare const createAzureCommunicationCallAdapterFromClient: (callClient: StatefulCallClient, callAgent: CallAgent, locator: CallAdapterLocator, options?: {
4003
- roleHint?: Role;
4004
- }) => Promise<CallAdapter>;
4034
+ export declare const createAzureCommunicationCallAdapterFromClient: (callClient: StatefulCallClient, callAgent: CallAgent, locator: CallAdapterLocator, options?: AzureCommunicationCallAdapterOptions) => Promise<CallAdapter>;
4005
4035
 
4006
4036
  /**
4007
4037
  * Create a CallWithChatAdapter backed by Azure Communication services
@@ -4009,7 +4039,7 @@ export declare const createAzureCommunicationCallAdapterFromClient: (callClient:
4009
4039
  *
4010
4040
  * @public
4011
4041
  */
4012
- export declare const createAzureCommunicationCallWithChatAdapter: ({ userId, displayName, credential, endpoint, locator, alternateCallerId }: AzureCommunicationCallWithChatAdapterArgs) => Promise<CallWithChatAdapter>;
4042
+ export declare const createAzureCommunicationCallWithChatAdapter: ({ userId, displayName, credential, endpoint, locator, alternateCallerId, callAdapterOptions }: AzureCommunicationCallWithChatAdapterArgs) => Promise<CallWithChatAdapter>;
4013
4043
 
4014
4044
  /**
4015
4045
  * Create a {@link CallWithChatAdapter} using the provided {@link StatefulChatClient} and {@link StatefulCallClient}.
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var communicationCommon = require('@azure/communication-common');
6
6
  var reselect = require('reselect');
7
- var memoizeOne = require('memoize-one');
8
7
  var communicationCalling = require('@azure/communication-calling');
8
+ var memoizeOne = require('memoize-one');
9
9
  var logger = require('@azure/logger');
10
10
  var EventEmitter = require('events');
11
11
  var produce = require('immer');
@@ -202,7 +202,7 @@ const _toCommunicationIdentifier = (id) => {
202
202
  // Copyright (c) Microsoft Corporation.
203
203
  // Licensed under the MIT license.
204
204
  // GENERATED FILE. DO NOT EDIT MANUALLY.
205
- var telemetryVersion = '1.4.2-alpha-202211220015.0';
205
+ var telemetryVersion = '1.4.2-alpha-202211230015.0';
206
206
 
207
207
  // Copyright (c) Microsoft Corporation.
208
208
  /**
@@ -1239,6 +1239,7 @@ class CallContext$2 {
1239
1239
  },
1240
1240
  callAgent: undefined,
1241
1241
  userId: userId,
1242
+ /* @conditional-compile-remove(unsupported-browser) */ environmentInfo: undefined,
1242
1243
  /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: alternateCallerId,
1243
1244
  latestErrors: {}
1244
1245
  };
@@ -1348,6 +1349,12 @@ class CallContext$2 {
1348
1349
  }
1349
1350
  });
1350
1351
  }
1352
+ /* @conditional-compile-remove(unsupported-browser) */
1353
+ setEnvironmentInfo(envInfo) {
1354
+ this.modifyState((draft) => {
1355
+ draft.environmentInfo = envInfo;
1356
+ });
1357
+ }
1351
1358
  setCallIsScreenSharingOn(callId, isScreenSharingOn) {
1352
1359
  this.modifyState((draft) => {
1353
1360
  const call = draft.calls[this._callIdHistory.latestCallId(callId)];
@@ -3625,6 +3632,23 @@ class ProxyCallClient {
3625
3632
  return this._deviceManager;
3626
3633
  }), 'CallClient.getDeviceManager');
3627
3634
  }
3635
+ case 'feature': {
3636
+ /* @conditional-compile-remove(unsupported-browser) */
3637
+ return this._context.withErrorTeedToState((...args) => {
3638
+ if (args[0] === communicationCalling.Features.DebugInfo) {
3639
+ const feature = target.feature(communicationCalling.Features.DebugInfo);
3640
+ /**
3641
+ * add to this object if we want to proxy anything else off the DebugInfo feature object.
3642
+ */
3643
+ return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$p(this, void 0, void 0, function* () {
3644
+ const environmentInfo = yield feature.getEnvironmentInfo();
3645
+ this._context.setEnvironmentInfo(environmentInfo);
3646
+ return environmentInfo;
3647
+ }) });
3648
+ }
3649
+ return Reflect.get(target, prop);
3650
+ }, 'CallClient.feature');
3651
+ }
3628
3652
  default:
3629
3653
  return Reflect.get(target, prop);
3630
3654
  }
@@ -10667,10 +10691,10 @@ const DrawerContentContainer = (props) => {
10667
10691
  const theme = react.useTheme();
10668
10692
  const backgroundColor = theme.palette.white;
10669
10693
  const borderRadius = theme.effects.roundedCorner4;
10670
- const rootStyles = react.mergeStyles(containerStyles$3(backgroundColor, borderRadius), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root);
10694
+ const rootStyles = react.mergeStyles(containerStyles$4(backgroundColor, borderRadius), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root);
10671
10695
  return React__default['default'].createElement(react.Stack, { className: rootStyles }, props.children);
10672
10696
  };
10673
- const containerStyles$3 = (backgroundColor, borderRadius) => (Object.assign({ background: backgroundColor, borderTopRightRadius: borderRadius, borderTopLeftRadius: borderRadius }, react.AnimationStyles.slideUpIn10));
10697
+ const containerStyles$4 = (backgroundColor, borderRadius) => (Object.assign({ background: backgroundColor, borderTopRightRadius: borderRadius, borderTopLeftRadius: borderRadius }, react.AnimationStyles.slideUpIn10));
10674
10698
 
10675
10699
  // Copyright (c) Microsoft Corporation.
10676
10700
  /**
@@ -11004,7 +11028,7 @@ function determineStates(previous, current) {
11004
11028
  /**
11005
11029
  * @private
11006
11030
  */
11007
- const containerStyles$2 = (theme) => {
11031
+ const containerStyles$3 = (theme) => {
11008
11032
  return {
11009
11033
  maxWidth: '16rem',
11010
11034
  textAlign: 'center',
@@ -11298,7 +11322,7 @@ const DialpadContainer = (props) => {
11298
11322
  const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);
11299
11323
  setText(modifiedInput);
11300
11324
  };
11301
- return (React__default['default'].createElement("div", { className: react.mergeStyles(containerStyles$2(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), "data-test-id": "dialpadContainer", "data-ui-id": "dialpadContainer" },
11325
+ return (React__default['default'].createElement("div", { className: react.mergeStyles(containerStyles$3(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), "data-test-id": "dialpadContainer", "data-ui-id": "dialpadContainer" },
11302
11326
  React__default['default'].createElement(react.TextField, { styles: react.concatStyleSets(textFieldStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.textField), value: textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue),
11303
11327
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11304
11328
  onChange: (e) => {
@@ -11407,10 +11431,9 @@ const linkTextStyles = {
11407
11431
  /**
11408
11432
  * @internal
11409
11433
  */
11410
- const containerStyles$1 = {
11434
+ const containerStyles$2 = {
11411
11435
  root: {
11412
- padding: '2rem',
11413
- maxWidth: '25.374rem'
11436
+ padding: '2rem'
11414
11437
  }
11415
11438
  };
11416
11439
  /**
@@ -11426,7 +11449,7 @@ const iconStyles$1 = {
11426
11449
  /* @conditional-compile-remove(unsupported-browser) */
11427
11450
  const UnsupportedBrowserContainer = (props) => {
11428
11451
  const { onTroubleshootingClick, strings } = props;
11429
- return (React__default['default'].createElement(react.Stack, { styles: containerStyles$1 },
11452
+ return (React__default['default'].createElement(react.Stack, { styles: containerStyles$2 },
11430
11453
  React__default['default'].createElement(react.Icon, { styles: iconStyles$1, iconName: "UnsupportedBrowserWarning", "data-ui-id": "unsupportedBrowserIcon" }),
11431
11454
  React__default['default'].createElement(react.Text, { styles: mainTextStyles }, strings.primaryText),
11432
11455
  React__default['default'].createElement(react.Text, { styles: secondaryTextStyles }, strings.secondaryText),
@@ -15701,11 +15724,15 @@ const getCallEndReason = (call) => {
15701
15724
  *
15702
15725
  * @private
15703
15726
  */
15704
- const getCallCompositePage = (call, previousCall) => {
15705
- // Must check for ongoing call *before* looking at any previous calls.
15706
- // If the composite completes one call and joins another, the previous calls
15707
- // will be populated, but not relevant for determining the page.
15727
+ const getCallCompositePage = (call, previousCall, environmentInfo, features) => {
15728
+ /* @conditional-compile-remove(unsupported-browser) */
15729
+ if ((features === null || features === void 0 ? void 0 : features.unsupportedEnvironment) && (environmentInfo === null || environmentInfo === void 0 ? void 0 : environmentInfo.isSupportedBrowser) === false) {
15730
+ return 'unsupportedEnvironment';
15731
+ }
15708
15732
  if (call) {
15733
+ // Must check for ongoing call *before* looking at any previous calls.
15734
+ // If the composite completes one call and joins another, the previous calls
15735
+ // will be populated, but not relevant for determining the page.
15709
15736
  // `_isInLobbyOrConnecting` needs to be checked first because `_isInCall` also returns true when call is in lobby.
15710
15737
  if (_isInLobbyOrConnecting(call === null || call === void 0 ? void 0 : call.state)) {
15711
15738
  return 'lobby';
@@ -17760,7 +17787,7 @@ const OVERLAY_CONTENT_ZINDEX = OVERLAY_BACKGROUND_ZINDEX + 1;
17760
17787
  /**
17761
17788
  * @private
17762
17789
  */
17763
- const containerStyles = {
17790
+ const containerStyles$1 = {
17764
17791
  root: {
17765
17792
  height: '100%',
17766
17793
  width: '100%',
@@ -17816,7 +17843,7 @@ const ExpandedLocalVideoTile = (props) => {
17816
17843
  props.onCreateLocalStreamView(localVideoViewOptions$1).catch((err) => console.log('Can not render video', err));
17817
17844
  }
17818
17845
  }, [isVideoReady, videoStream, props, renderElement]);
17819
- return (React__default['default'].createElement(react.Stack, { horizontalAlign: "center", verticalAlign: "center", styles: containerStyles, grow: true },
17846
+ return (React__default['default'].createElement(react.Stack, { horizontalAlign: "center", verticalAlign: "center", styles: containerStyles$1, grow: true },
17820
17847
  React__default['default'].createElement(VideoTile, { styles: videoTileStyles, renderElement: renderElement ? React__default['default'].createElement(StreamMedia, { videoStreamElement: renderElement }) : undefined, onRenderPlaceholder: onRenderEmptyPlaceholder }, props.overlayContent && (React__default['default'].createElement(React__default['default'].Fragment, null,
17821
17848
  React__default['default'].createElement(react.Stack, { className: react.mergeStyles(overlayBackgroundStyles(palette, isVideoReady)) }),
17822
17849
  React__default['default'].createElement(react.Stack, { horizontalAlign: "center", verticalAlign: "center", className: react.mergeStyles(overlayContentStyles) }, props.overlayContent))))));
@@ -19141,9 +19168,16 @@ const UnsupportedBrowserPage = (props) => {
19141
19168
  /* @conditional-compile-remove(unsupported-browser) */
19142
19169
  const unsupportedBrowserStrings = locale.component.strings.UnsupportedBrowser;
19143
19170
  /* @conditional-compile-remove(unsupported-browser) */
19144
- return (React__default['default'].createElement(react.Stack, { styles: { root: { margin: 'auto', paddingTop: '3rem' } } },
19171
+ return (React__default['default'].createElement(react.Stack, { styles: containerStyles },
19145
19172
  React__default['default'].createElement(UnsupportedBrowser, { onTroubleshootingClick: onTroubleshootingClick, strings: unsupportedBrowserStrings })));
19146
19173
  };
19174
+ /* @conditional-compile-remove(unsupported-browser) */
19175
+ const containerStyles = {
19176
+ root: {
19177
+ margin: 'auto',
19178
+ paddingTop: '3rem'
19179
+ }
19180
+ };
19147
19181
 
19148
19182
  // Copyright (c) Microsoft Corporation.
19149
19183
  // Licensed under the MIT license.
@@ -19215,10 +19249,14 @@ const MainScreen = (props) => {
19215
19249
  pageElement = (React__default['default'].createElement(React__default['default'].Fragment, null,
19216
19250
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ React__default['default'].createElement(HoldPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options })));
19217
19251
  break;
19218
- case unsupportedEnvironmentPageTrampoline():
19252
+ }
19253
+ /* @conditional-compile-remove(unsupported-browser) */
19254
+ switch (page) {
19255
+ case 'unsupportedEnvironment':
19219
19256
  pageElement = (React__default['default'].createElement(React__default['default'].Fragment, null,
19220
19257
  /* @conditional-compile-remove(unsupported-browser) */
19221
19258
  React__default['default'].createElement(UnsupportedBrowserPage, { onTroubleshootingClick: (_e = props.options) === null || _e === void 0 ? void 0 : _e.onEnvironmentInfoTroubleshootingClick })));
19259
+ break;
19222
19260
  }
19223
19261
  if (!pageElement) {
19224
19262
  throw new Error('Invalid call composite page');
@@ -19285,10 +19323,6 @@ const holdPageTrampoline = () => {
19285
19323
  /* @conditional-compile-remove(PSTN-calls) */
19286
19324
  return 'hold';
19287
19325
  };
19288
- const unsupportedEnvironmentPageTrampoline = () => {
19289
- /* @conditional-compile-remove(unsupported-browser) */
19290
- return 'unsupportedEnvironment';
19291
- };
19292
19326
  const getQueryOptions = (options) => {
19293
19327
  /* @conditional-compile-remove(rooms) */
19294
19328
  if (options.role === 'Consumer') {
@@ -19398,6 +19432,8 @@ class CallContext {
19398
19432
  latestErrors: clientState.latestErrors,
19399
19433
  isTeamsCall,
19400
19434
  /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: clientState.alternateCallerId,
19435
+ /* @conditional-compile-remove(unsupported-browser) */ environmentInfo: clientState.environmentInfo,
19436
+ /* @conditional-compile-remove(unsupported-browser) */ features: options === null || options === void 0 ? void 0 : options.features,
19401
19437
  /* @conditional-compile-remove(rooms) */ roleHint: options === null || options === void 0 ? void 0 : options.roleHint
19402
19438
  };
19403
19439
  this.emitter.setMaxListeners((_b = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _b !== void 0 ? _b : 50);
@@ -19434,7 +19470,11 @@ class CallContext {
19434
19470
  const latestEndedCall = findLatestEndedCall(clientState.callsEnded);
19435
19471
  // As the state is transitioning to a new state, trigger appropriate callback events.
19436
19472
  const oldPage = this.state.page;
19437
- const newPage = getCallCompositePage(call, latestEndedCall);
19473
+ /* @conditional-compile-remove(unsupported-browser) */
19474
+ const environmentInfo = this.state.environmentInfo;
19475
+ const newPage = getCallCompositePage(call, latestEndedCall,
19476
+ /* @conditional-compile-remove(unsupported-browser) */ environmentInfo,
19477
+ /* @conditional-compile-remove(unsupported-browser) */ this.state.features);
19438
19478
  if (!IsCallEndedPage(oldPage) && IsCallEndedPage(newPage)) {
19439
19479
  this.emitter.emit('callEnded', { callId: this.callId });
19440
19480
  // Reset the callId to undefined as the call has ended.
@@ -19465,8 +19505,7 @@ const findLatestEndedCall = (calls) => {
19465
19505
  * @private
19466
19506
  */
19467
19507
  class AzureCommunicationCallAdapter {
19468
- constructor(callClient, locator, callAgent, deviceManager,
19469
- /* @conditional-compile-remove(rooms) */ options) {
19508
+ constructor(callClient, locator, callAgent, deviceManager, options) {
19470
19509
  this.participantSubscribers = new Map();
19471
19510
  this.emitter = new EventEmitter.EventEmitter();
19472
19511
  this.isMyMutedChanged = () => {
@@ -19476,14 +19515,14 @@ class AzureCommunicationCallAdapter {
19476
19515
  isMuted: (_a = this.call) === null || _a === void 0 ? void 0 : _a.isMuted
19477
19516
  });
19478
19517
  };
19518
+ console.log(options);
19479
19519
  this.bindPublicMethods();
19480
19520
  this.callClient = callClient;
19481
19521
  this.callAgent = callAgent;
19482
19522
  this.locator = locator;
19483
19523
  this.deviceManager = deviceManager;
19484
19524
  const isTeamsMeeting = 'meetingLink' in this.locator;
19485
- this.context = new CallContext(callClient.getState(), isTeamsMeeting,
19486
- /* @conditional-compile-remove(rooms) */ options);
19525
+ this.context = new CallContext(callClient.getState(), isTeamsMeeting, options);
19487
19526
  this.context.onCallEnded((endCallData) => this.emitter.emit('callEnded', endCallData));
19488
19527
  const onStateChange = (clientState) => {
19489
19528
  var _a;
@@ -20061,11 +20100,12 @@ beforeDispose) => {
20061
20100
  *
20062
20101
  * @public
20063
20102
  */
20064
- const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator,
20065
- /* @conditional-compile-remove(rooms) */ options) => __awaiter$4(void 0, void 0, void 0, function* () {
20103
+ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$4(void 0, void 0, void 0, function* () {
20066
20104
  const deviceManager = (yield callClient.getDeviceManager());
20067
- /* @conditional-compile-remove(rooms) */
20068
- return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager, options);
20105
+ /* @conditional-compile-remove(unsupported-browser) */
20106
+ yield callClient.feature(communicationCalling.Features.DebugInfo).getEnvironmentInfo();
20107
+ return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager,
20108
+ /* @conditional-compile-remove(rooms) */ options);
20069
20109
  });
20070
20110
  const isCallError = (e) => {
20071
20111
  return e['target'] !== undefined && e['innerError'] !== undefined;
@@ -21259,7 +21299,9 @@ function callWithChatAdapterStateFromBackingStates(callAdapter, chatAdapter) {
21259
21299
  /* @conditional-compile-remove(file-sharing) */
21260
21300
  fileUploads: chatAdapterState.fileUploads,
21261
21301
  /* @conditional-compile-remove(PSTN-calls) */
21262
- alternateCallerId: callAdapterState.alternateCallerId
21302
+ alternateCallerId: callAdapterState.alternateCallerId,
21303
+ /* @conditional-compile-remove(unsupported-browser) */
21304
+ environmentInfo: callAdapterState.environmentInfo
21263
21305
  };
21264
21306
  }
21265
21307
  /**
@@ -21779,14 +21821,16 @@ class AzureCommunicationCallWithChatAdapter {
21779
21821
  * @public
21780
21822
  */
21781
21823
  const createAzureCommunicationCallWithChatAdapter = ({ userId, displayName, credential, endpoint, locator,
21782
- /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId }) => __awaiter(void 0, void 0, void 0, function* () {
21824
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
21825
+ /* @conditional-compile-remove(unsupported-browser) */ callAdapterOptions }) => __awaiter(void 0, void 0, void 0, function* () {
21783
21826
  const callAdapterLocator = isTeamsMeetingLinkLocator(locator) ? locator : locator.callLocator;
21784
21827
  const createCallAdapterPromise = createAzureCommunicationCallAdapter({
21785
21828
  userId,
21786
21829
  displayName,
21787
21830
  credential,
21788
21831
  locator: callAdapterLocator,
21789
- /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId
21832
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
21833
+ /* @conditional-compile-remove(unsupported-browser) */ options: callAdapterOptions
21790
21834
  });
21791
21835
  const threadId = isTeamsMeetingLinkLocator(locator)
21792
21836
  ? getChatThreadFromTeamsLink(locator.meetingLink)
@@ -21836,7 +21880,8 @@ afterCreate,
21836
21880
  */
21837
21881
  beforeDispose) => {
21838
21882
  const { credential, displayName, endpoint, locator, userId,
21839
- /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId } = args;
21883
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
21884
+ /* @conditional-compile-remove(unsupported-browser) */ callAdapterOptions } = args;
21840
21885
  // State update needed to rerender the parent component when a new adapter is created.
21841
21886
  const [adapter, setAdapter] = React.useState(undefined);
21842
21887
  // Ref needed for cleanup to access the old adapter created asynchronously.
@@ -21872,7 +21917,8 @@ beforeDispose) => {
21872
21917
  endpoint,
21873
21918
  locator,
21874
21919
  userId,
21875
- /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId
21920
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
21921
+ /* @conditional-compile-remove(unsupported-browser) */ callAdapterOptions
21876
21922
  });
21877
21923
  if (afterCreateRef.current) {
21878
21924
  newAdapter = yield afterCreateRef.current(newAdapter);
@@ -21891,7 +21937,8 @@ beforeDispose) => {
21891
21937
  displayName,
21892
21938
  endpoint,
21893
21939
  locator,
21894
- userId
21940
+ userId,
21941
+ /* @conditional-compile-remove(unsupported-browser) */ callAdapterOptions
21895
21942
  ]);
21896
21943
  // Dispose any existing adapter when the component unmounts.
21897
21944
  React.useEffect(() => {