@azure/communication-react 1.7.1-alpha-202308240011 → 1.7.1-alpha-202308250012

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 (93) hide show
  1. package/dist/communication-react.d.ts +161 -48
  2. package/dist/dist-cjs/communication-react/index.js +323 -95
  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/captionsSelector.d.ts +6 -4
  7. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +12 -4
  8. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -2
  10. package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  12. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +6 -1
  13. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  14. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +2 -0
  15. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +10 -0
  16. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -1
  17. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +0 -7
  18. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -10
  19. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  20. package/dist/dist-esm/calling-stateful-client/src/index.d.ts +0 -1
  21. package/dist/dist-esm/calling-stateful-client/src/index.js +0 -2
  22. package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
  23. package/dist/dist-esm/communication-react/src/index.d.ts +1 -1
  24. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +11 -4
  26. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +73 -28
  27. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js.map +1 -1
  28. package/dist/dist-esm/react-components/src/components/ImageGallery.js +1 -1
  29. package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -1
  30. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +1 -1
  31. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +3 -3
  33. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -1
  34. package/dist/dist-esm/react-components/src/index.d.ts +2 -1
  35. package/dist/dist-esm/react-components/src/index.js +2 -0
  36. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  37. package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -0
  38. package/dist/dist-esm/react-components/src/theming/icons.js +3 -1
  39. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  40. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +87 -2
  41. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js +47 -1
  42. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +18 -6
  44. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  45. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +12 -1
  46. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +37 -1
  47. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  48. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +47 -0
  49. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  50. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +2 -1
  51. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  52. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +5 -1
  53. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  54. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +2 -1
  55. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  56. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +6 -0
  57. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  58. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +5 -1
  59. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +16 -0
  60. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  61. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +6 -2
  62. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  63. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +18 -10
  64. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  65. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +1 -1
  66. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  67. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.d.ts +1 -0
  68. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js +10 -6
  69. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +1 -1
  70. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -0
  71. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -4
  72. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  73. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +2 -2
  74. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  75. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.d.ts +20 -0
  76. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.js +38 -0
  77. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.js.map +1 -0
  78. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +6 -0
  79. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +56 -18
  80. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js +3 -1
  82. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  83. package/dist/dist-esm/react-composites/src/composites/common/Drawer/captionSettingsDrawer.styles.d.ts +7 -0
  84. package/dist/dist-esm/react-composites/src/composites/common/Drawer/{SpokenLanguageDrawer.styles.js → captionSettingsDrawer.styles.js} +2 -2
  85. package/dist/dist-esm/react-composites/src/composites/common/Drawer/captionSettingsDrawer.styles.js.map +1 -0
  86. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -0
  87. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +41 -4
  88. package/package.json +8 -8
  89. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.d.ts +0 -19
  90. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js +0 -55
  91. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js.map +0 -1
  92. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.d.ts +0 -7
  93. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.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.1-alpha-202308240011';
181
+ var telemetryVersion = '1.7.1-alpha-202308250012';
182
182
 
183
183
  // Copyright (c) Microsoft Corporation.
184
184
  /**
@@ -431,7 +431,7 @@ const getCaptions = (state, props) => {
431
431
  };
432
432
  /* @conditional-compile-remove(close-captions) */
433
433
  /** @private */
434
- const getCaptionsStatus = (state, props) => {
434
+ const getCaptionsStatus$1 = (state, props) => {
435
435
  var _a;
436
436
  return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.isCaptionsFeatureActive;
437
437
  };
@@ -455,6 +455,12 @@ const getCurrentSpokenLanguage = (state, props) => {
455
455
  };
456
456
  /* @conditional-compile-remove(close-captions) */
457
457
  /** @private */
458
+ const getSupportedCaptionLanguages = (state, props) => {
459
+ var _a;
460
+ return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.supportedCaptionLanguages;
461
+ };
462
+ /* @conditional-compile-remove(close-captions) */
463
+ /** @private */
458
464
  const getSupportedSpokenLanguages = (state, props) => {
459
465
  var _a;
460
466
  return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.supportedSpokenLanguages;
@@ -1191,21 +1197,29 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
1191
1197
  *
1192
1198
  * @internal
1193
1199
  */
1194
- const _startCaptionsButtonSelector = reselect__namespace.createSelector([getCaptionsStatus, getCurrentCaptionLanguage, getCurrentSpokenLanguage], (isCaptionsFeatureActive, currentCaptionLanguage, currentSpokenLanguage) => {
1200
+ const _startCaptionsButtonSelector = reselect__namespace.createSelector([getCaptionsStatus$1, getCurrentCaptionLanguage, getCurrentSpokenLanguage], (isCaptionsFeatureActive, currentCaptionLanguage, currentSpokenLanguage) => {
1195
1201
  return {
1196
1202
  checked: isCaptionsFeatureActive !== null && isCaptionsFeatureActive !== void 0 ? isCaptionsFeatureActive : false,
1197
- currentCaptionLanguage: currentCaptionLanguage !== null && currentCaptionLanguage !== void 0 ? currentCaptionLanguage : 'en-us',
1203
+ currentCaptionLanguage: currentCaptionLanguage !== null && currentCaptionLanguage !== void 0 ? currentCaptionLanguage : '',
1198
1204
  currentSpokenLanguage: currentSpokenLanguage !== null && currentSpokenLanguage !== void 0 ? currentSpokenLanguage : 'en-us'
1199
1205
  };
1200
1206
  });
1201
1207
  /* @conditional-compile-remove(close-captions) */
1202
1208
  /**
1203
- * Selector for {@link ChangeSpokenLanguageButton} component.
1209
+ * Selector for Changing caption language and spoken language
1204
1210
  *
1205
1211
  * @internal
1206
1212
  */
1207
- const _changeSpokenLanguageSelector = reselect__namespace.createSelector([getSupportedSpokenLanguages, getCurrentSpokenLanguage, getCaptionsStatus], (supportedSpokenLanguages, currentSpokenLanguage, isCaptionsFeatureActive) => {
1213
+ const _captionSettingsSelector = reselect__namespace.createSelector([
1214
+ getSupportedCaptionLanguages,
1215
+ getCurrentCaptionLanguage,
1216
+ getSupportedSpokenLanguages,
1217
+ getCurrentSpokenLanguage,
1218
+ getCaptionsStatus$1
1219
+ ], (supportedCaptionLanguages, currentCaptionLanguage, supportedSpokenLanguages, currentSpokenLanguage, isCaptionsFeatureActive) => {
1208
1220
  return {
1221
+ supportedCaptionLanguages: supportedCaptionLanguages !== null && supportedCaptionLanguages !== void 0 ? supportedCaptionLanguages : [],
1222
+ currentCaptionLanguage: currentCaptionLanguage !== null && currentCaptionLanguage !== void 0 ? currentCaptionLanguage : '',
1209
1223
  supportedSpokenLanguages: supportedSpokenLanguages !== null && supportedSpokenLanguages !== void 0 ? supportedSpokenLanguages : ['en-us'],
1210
1224
  currentSpokenLanguage: currentSpokenLanguage !== null && currentSpokenLanguage !== void 0 ? currentSpokenLanguage : 'en-us',
1211
1225
  isCaptionsFeatureActive: isCaptionsFeatureActive !== null && isCaptionsFeatureActive !== void 0 ? isCaptionsFeatureActive : false
@@ -1217,7 +1231,7 @@ const _changeSpokenLanguageSelector = reselect__namespace.createSelector([getSup
1217
1231
  *
1218
1232
  * @internal
1219
1233
  */
1220
- const _captionsBannerSelector = reselect__namespace.createSelector([getCaptions, getCaptionsStatus, getStartCaptionsInProgress], (captions, isCaptionsFeatureActive, startCaptionsInProgress) => {
1234
+ const _captionsBannerSelector = reselect__namespace.createSelector([getCaptions, getCaptionsStatus$1, getStartCaptionsInProgress], (captions, isCaptionsFeatureActive, startCaptionsInProgress) => {
1221
1235
  // Following Teams app logic, no matter how many 'Partial' captions come,
1222
1236
  // we only pick first one according to start time, and all the other partial captions will be filtered out
1223
1237
  // This will give customers a stable captions experience when others talking over the dominant speaker
@@ -2346,7 +2360,12 @@ class CallContext$2 {
2346
2360
  this.modifyState((draft) => {
2347
2361
  const call = draft.calls[this._callIdHistory.latestCallId(callId)];
2348
2362
  if (call) {
2349
- this.processNewCaption(call.captionsFeature.captions, convertFromSDKToCaptionInfoState(caption));
2363
+ const currentCaptionLanguage = call.captionsFeature.currentCaptionLanguage;
2364
+ if (caption.captionLanguage.toUpperCase() === currentCaptionLanguage.toUpperCase() ||
2365
+ currentCaptionLanguage === '' ||
2366
+ currentCaptionLanguage === undefined) {
2367
+ this.processNewCaption(call.captionsFeature.captions, convertFromSDKToCaptionInfoState(caption));
2368
+ }
2350
2369
  }
2351
2370
  });
2352
2371
  }
@@ -2504,10 +2523,14 @@ class CaptionsSubscriber {
2504
2523
  this.subscribe = () => {
2505
2524
  this._captions.on('CaptionsActiveChanged', this.isCaptionsActiveChanged);
2506
2525
  this._captions.on('CaptionsReceived', this.onCaptionsReceived);
2526
+ this._captions.on('CaptionLanguageChanged', this.isCaptionLanguageChanged);
2527
+ this._captions.on('SpokenLanguageChanged', this.isSpokenLanguageChanged);
2507
2528
  };
2508
2529
  this.unsubscribe = () => {
2509
2530
  this._captions.off('CaptionsActiveChanged', this.isCaptionsActiveChanged);
2510
2531
  this._captions.off('CaptionsReceived', this.onCaptionsReceived);
2532
+ this._captions.off('CaptionLanguageChanged', this.isCaptionLanguageChanged);
2533
+ this._captions.off('SpokenLanguageChanged', this.isSpokenLanguageChanged);
2511
2534
  };
2512
2535
  this.onCaptionsReceived = (caption) => {
2513
2536
  this._context.addCaption(this._callIdRef.callId, caption);
@@ -2515,6 +2538,12 @@ class CaptionsSubscriber {
2515
2538
  this.isCaptionsActiveChanged = () => {
2516
2539
  this._context.setIsCaptionActive(this._callIdRef.callId, this._captions.isCaptionsFeatureActive);
2517
2540
  };
2541
+ this.isCaptionLanguageChanged = () => {
2542
+ this._context.setSelectedCaptionLanguage(this._callIdRef.callId, this._captions.activeCaptionLanguage);
2543
+ };
2544
+ this.isSpokenLanguageChanged = () => {
2545
+ this._context.setSelectedSpokenLanguage(this._callIdRef.callId, this._captions.activeSpokenLanguage);
2546
+ };
2518
2547
  this._callIdRef = callIdRef;
2519
2548
  this._context = context;
2520
2549
  this._captions = captions;
@@ -6245,6 +6274,8 @@ const DEFAULT_COMPONENT_ICONS = {
6245
6274
  CaptionsSettingsIcon: React__default['default'].createElement(reactIcons.Settings20Regular, null),
6246
6275
  /* @conditional-compile-remove(close-captions) */
6247
6276
  ChangeSpokenLanguageIcon: React__default['default'].createElement(reactIcons.PersonVoice20Regular, null),
6277
+ /* @conditional-compile-remove(close-captions) */
6278
+ ChangeCaptionLanguageIcon: React__default['default'].createElement(reactIcons.Translate20Regular, null),
6248
6279
  ContextMenuCameraIcon: React__default['default'].createElement(reactIcons.Video20Regular, null),
6249
6280
  ContextMenuMicIcon: React__default['default'].createElement(reactIcons.Mic20Regular, null),
6250
6281
  ContextMenuSpeakerIcon: React__default['default'].createElement(reactIcons.Speaker220Regular, null)
@@ -8708,7 +8739,7 @@ const ImageGallery = (props) => {
8708
8739
  // Ensure when the focus trap has focus, the light dismiss area can still be clicked with mouse to dismiss.
8709
8740
  // Note: this still correctly captures keyboard focus, this just allows mouse click outside of the focus trap.
8710
8741
  isClickableOutsideFocusTrap: true, className: react.mergeStyles(bodyFocusZone) },
8711
- React__default['default'].createElement("img", { src: image.imageUrl, className: react.mergeStyles(imageStyle), alt: image.altText || 'image', onError: (event) => {
8742
+ React__default['default'].createElement("img", { src: image.imageUrl, className: react.mergeStyles(imageStyle), alt: image.altText || 'image', "aria-label": 'image-gallery-main-image', onError: (event) => {
8712
8743
  setIsImageLoaded(false);
8713
8744
  onError && onError(event);
8714
8745
  }, onClick: (event) => event.stopPropagation() }))));
@@ -17356,7 +17387,7 @@ const themedCaptionsSettingsModalStyle = (theme) => ({
17356
17387
  borderRadius: theme.effects.roundedCorner6,
17357
17388
  padding: _pxToRem(24),
17358
17389
  width: _pxToRem(440),
17359
- height: _pxToRem(268),
17390
+ height: 'fit-content',
17360
17391
  overflow: 'hidden'
17361
17392
  }
17362
17393
  });
@@ -17378,7 +17409,6 @@ const titleContainerClassName = react.mergeStyles({
17378
17409
  * @private
17379
17410
  */
17380
17411
  const dropdownContainerClassName = react.mergeStyles({
17381
- paddingBottom: _pxToRem(16),
17382
17412
  paddingTop: _pxToRem(16)
17383
17413
  });
17384
17414
  /**
@@ -17388,7 +17418,8 @@ const dropdownInfoTextStyle = (theme) => react.mergeStyles({
17388
17418
  fontWeight: 400,
17389
17419
  fontSize: _pxToRem(12),
17390
17420
  lineHeight: _pxToRem(16),
17391
- color: theme.palette.neutralSecondary
17421
+ color: theme.palette.neutralSecondary,
17422
+ paddingBottom: _pxToRem(24)
17392
17423
  });
17393
17424
  /**
17394
17425
  * @private
@@ -17429,6 +17460,56 @@ const dropdownStyles = {
17429
17460
  callout: Object.assign({ height: _pxToRem(300), overflow: 'auto' }, scrollbarStyles)
17430
17461
  };
17431
17462
 
17463
+ // Copyright (c) Microsoft Corporation.
17464
+ // Licensed under the MIT license.
17465
+ /**
17466
+ * @internal
17467
+ * mapping between caption language and spoken language codes
17468
+ */
17469
+ const _spokenLanguageToCaptionLanguage = {
17470
+ 'ar-ae': 'ar',
17471
+ 'ar-sa': 'ar',
17472
+ 'da-dk': 'da',
17473
+ 'de-de': 'de',
17474
+ 'en-au': 'en',
17475
+ 'en-ca': 'en',
17476
+ 'en-gb': 'en',
17477
+ 'en-in': 'en',
17478
+ 'en-nz': 'en',
17479
+ 'en-us': 'en',
17480
+ 'es-es': 'es',
17481
+ 'es-mx': 'es',
17482
+ 'fi-fi': 'fi',
17483
+ 'fr-ca': 'fr-ca',
17484
+ 'fr-fr': 'fr',
17485
+ 'hi-in': 'hi',
17486
+ 'it-it': 'it',
17487
+ 'ja-jp': 'ja',
17488
+ 'ko-kr': 'ko',
17489
+ 'nb-no': 'nb',
17490
+ 'nl-be': 'nl',
17491
+ 'nl-nl': 'nl',
17492
+ 'pl-pl': 'pl',
17493
+ 'pt-br': 'pt',
17494
+ 'ru-ru': 'ru',
17495
+ 'sv-se': 'sv',
17496
+ 'zh-cn': 'zh-Hans',
17497
+ 'zh-hk': 'zh-Hant',
17498
+ 'cs-cz': 'cs',
17499
+ 'pt-pt': 'pt-pt',
17500
+ 'tr-tr': 'tr',
17501
+ 'vi-vn': 'vi',
17502
+ 'th-th': 'th',
17503
+ 'he-il': 'he',
17504
+ 'cy-gb': 'cy',
17505
+ 'uk-ua': 'uk',
17506
+ 'el-gr': 'el',
17507
+ 'hu-hu': 'hu',
17508
+ 'ro-ro': 'ro',
17509
+ 'sk-sk': 'sk',
17510
+ 'zh-tw': 'zh-Hant'
17511
+ };
17512
+
17432
17513
  var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17433
17514
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17434
17515
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -17443,65 +17524,109 @@ var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments,
17443
17524
  * a component for setting spoken languages
17444
17525
  */
17445
17526
  const _CaptionsSettingsModal = (props) => {
17446
- const { supportedSpokenLanguages, currentSpokenLanguage, isCaptionsFeatureActive, showModal, onSetSpokenLanguage, onDismissCaptionsSettings, onStartCaptions, strings, captionsAvailableLanguageStrings } = props;
17527
+ const { supportedSpokenLanguages, supportedCaptionLanguages, currentSpokenLanguage, currentCaptionLanguage, isCaptionsFeatureActive, showModal, onSetSpokenLanguage, onSetCaptionLanguage, onDismissCaptionsSettings, onStartCaptions, strings, spokenLanguageStrings, captionLanguageStrings, changeCaptionLanguage = false } = props;
17447
17528
  const theme = react.useTheme();
17448
- const [selectedItem, setSelectedItem] = React.useState({
17529
+ const [hasSetSpokenLanguage, setHasSetSpokenLanguage] = React.useState(false);
17530
+ const [selectedSpokenLanguage, setSelectedSpokenLanguage] = React.useState({
17449
17531
  key: currentSpokenLanguage !== '' ? currentSpokenLanguage : defaultSpokenLanguage,
17450
17532
  text: currentSpokenLanguage !== '' ? currentSpokenLanguage : defaultSpokenLanguage
17451
17533
  });
17452
- const [hasSetSpokenLanguage, setHasSetSpokenLanguage] = React.useState(false);
17453
- const onDismiss = React.useCallback(() => {
17454
- if (onDismissCaptionsSettings) {
17455
- onDismissCaptionsSettings();
17456
- }
17457
- }, [onDismissCaptionsSettings]);
17534
+ const [selectedCaptionLanguage, setSelectedCaptionLanguage] = React.useState({
17535
+ key: currentCaptionLanguage !== ''
17536
+ ? currentCaptionLanguage
17537
+ : _spokenLanguageToCaptionLanguage[selectedSpokenLanguage.key],
17538
+ text: currentCaptionLanguage !== ''
17539
+ ? currentCaptionLanguage
17540
+ : _spokenLanguageToCaptionLanguage[selectedSpokenLanguage.key]
17541
+ });
17458
17542
  React.useEffect(() => {
17459
17543
  // set spoken language when start captions with a spoken language specified.
17460
17544
  // this is to fix the bug when a second user starts captions with a new spoken language, captions bot ignore that spoken language
17461
17545
  if (isCaptionsFeatureActive && !hasSetSpokenLanguage) {
17462
- onSetSpokenLanguage(selectedItem.key.toString());
17546
+ onSetSpokenLanguage(selectedSpokenLanguage.key.toString());
17463
17547
  // we only need to call set spoken language once when first starting captions
17464
17548
  setHasSetSpokenLanguage(true);
17465
17549
  }
17466
- }, [isCaptionsFeatureActive, onSetSpokenLanguage, selectedItem.key, hasSetSpokenLanguage]);
17550
+ }, [isCaptionsFeatureActive, onSetSpokenLanguage, selectedSpokenLanguage.key, hasSetSpokenLanguage]);
17551
+ const onDismiss = React.useCallback(() => {
17552
+ if (onDismissCaptionsSettings) {
17553
+ onDismissCaptionsSettings();
17554
+ }
17555
+ }, [onDismissCaptionsSettings]);
17467
17556
  const onConfirm = React.useCallback(() => __awaiter$r(void 0, void 0, void 0, function* () {
17468
- const languageCode = selectedItem.key.toString();
17557
+ const spokenLanguageCode = selectedSpokenLanguage.key.toString();
17558
+ const captionLanguageCode = selectedCaptionLanguage.key.toString();
17469
17559
  if (isCaptionsFeatureActive) {
17470
- onSetSpokenLanguage(languageCode);
17560
+ onSetSpokenLanguage(spokenLanguageCode);
17561
+ onSetCaptionLanguage(captionLanguageCode);
17471
17562
  }
17472
17563
  else {
17473
- yield onStartCaptions({ spokenLanguage: languageCode });
17564
+ yield onStartCaptions({ spokenLanguage: spokenLanguageCode });
17474
17565
  }
17475
17566
  onDismiss();
17476
- }), [onDismiss, isCaptionsFeatureActive, onSetSpokenLanguage, onStartCaptions, selectedItem.key]);
17477
- const dropdownOptions = React.useMemo(() => {
17567
+ }), [
17568
+ onDismiss,
17569
+ isCaptionsFeatureActive,
17570
+ onSetSpokenLanguage,
17571
+ onSetCaptionLanguage,
17572
+ onStartCaptions,
17573
+ selectedSpokenLanguage.key,
17574
+ selectedCaptionLanguage.key
17575
+ ]);
17576
+ const spokenLanguageDropdownOptions = React.useMemo(() => {
17478
17577
  return supportedSpokenLanguages.map((languageCode) => {
17479
17578
  return {
17480
17579
  key: languageCode,
17481
- text: captionsAvailableLanguageStrings ? captionsAvailableLanguageStrings[languageCode] : languageCode
17580
+ text: spokenLanguageStrings ? spokenLanguageStrings[languageCode] : languageCode
17581
+ };
17582
+ });
17583
+ }, [supportedSpokenLanguages, spokenLanguageStrings]);
17584
+ const captionLanguageDropdownOptions = React.useMemo(() => {
17585
+ return supportedCaptionLanguages.map((languageCode) => {
17586
+ return {
17587
+ key: languageCode,
17588
+ text: captionLanguageStrings ? captionLanguageStrings[languageCode] : languageCode
17482
17589
  };
17483
17590
  });
17484
- }, [supportedSpokenLanguages, captionsAvailableLanguageStrings]);
17485
- const onChange = (event, option) => {
17591
+ }, [supportedCaptionLanguages, captionLanguageStrings]);
17592
+ const onSpokenLanguageChange = (event, option) => {
17486
17593
  if (option) {
17487
- setSelectedItem(option);
17594
+ setSelectedSpokenLanguage(option);
17595
+ }
17596
+ };
17597
+ const onCaptionLanguageChange = (event, option) => {
17598
+ if (option) {
17599
+ setSelectedCaptionLanguage(option);
17488
17600
  }
17489
17601
  };
17490
17602
  const calloutProps = React.useMemo(() => ({
17491
17603
  preventDismissOnEvent: _preventDismissOnEvent
17492
17604
  }), []);
17493
17605
  const CaptionsSettingsComponent = React.useCallback(() => {
17606
+ const placeholderSpokenLanguage = currentSpokenLanguage !== '' ? currentSpokenLanguage : defaultSpokenLanguage;
17607
+ const placeholderCaptionLanguage = currentCaptionLanguage !== ''
17608
+ ? currentCaptionLanguage
17609
+ : _spokenLanguageToCaptionLanguage[placeholderSpokenLanguage];
17494
17610
  return (React__default['default'].createElement(react.Stack, null,
17495
- React__default['default'].createElement(react.Dropdown, { label: strings === null || strings === void 0 ? void 0 : strings.captionsSettingsDropdownLabel, selectedKey: selectedItem ? selectedItem.key : undefined, onChange: onChange, calloutProps: calloutProps, placeholder: currentSpokenLanguage !== '' ? currentSpokenLanguage : defaultSpokenLanguage, options: dropdownOptions, styles: dropdownStyles }),
17496
- React__default['default'].createElement(react.Text, { className: dropdownInfoTextStyle(theme) }, strings === null || strings === void 0 ? void 0 : strings.captionsSettingsDropdownInfoText)));
17611
+ React__default['default'].createElement(react.Dropdown, { label: strings === null || strings === void 0 ? void 0 : strings.captionsSettingsSpokenLanguageDropdownLabel, selectedKey: selectedSpokenLanguage ? selectedSpokenLanguage.key : undefined, onChange: onSpokenLanguageChange, calloutProps: calloutProps, placeholder: placeholderSpokenLanguage, options: spokenLanguageDropdownOptions, styles: dropdownStyles }),
17612
+ React__default['default'].createElement(react.Text, { className: dropdownInfoTextStyle(theme) }, strings === null || strings === void 0 ? void 0 : strings.captionsSettingsSpokenLanguageDropdownInfoText),
17613
+ changeCaptionLanguage && (React__default['default'].createElement(React__default['default'].Fragment, null,
17614
+ React__default['default'].createElement(react.Dropdown, { label: strings === null || strings === void 0 ? void 0 : strings.captionsSettingsCaptionLanguageDropdownLabel, selectedKey: selectedCaptionLanguage ? selectedCaptionLanguage.key : undefined, onChange: onCaptionLanguageChange, calloutProps: calloutProps, placeholder: placeholderCaptionLanguage, options: captionLanguageDropdownOptions, styles: dropdownStyles }),
17615
+ React__default['default'].createElement(react.Text, { className: dropdownInfoTextStyle(theme) }, strings === null || strings === void 0 ? void 0 : strings.captionsSettingsCaptionLanguageDropdownInfoText)))));
17497
17616
  }, [
17498
17617
  calloutProps,
17499
17618
  currentSpokenLanguage,
17500
- dropdownOptions,
17501
- selectedItem,
17502
- strings === null || strings === void 0 ? void 0 : strings.captionsSettingsDropdownInfoText,
17503
- strings === null || strings === void 0 ? void 0 : strings.captionsSettingsDropdownLabel,
17504
- theme
17619
+ currentCaptionLanguage,
17620
+ spokenLanguageDropdownOptions,
17621
+ captionLanguageDropdownOptions,
17622
+ selectedCaptionLanguage,
17623
+ selectedSpokenLanguage,
17624
+ strings === null || strings === void 0 ? void 0 : strings.captionsSettingsSpokenLanguageDropdownInfoText,
17625
+ strings === null || strings === void 0 ? void 0 : strings.captionsSettingsCaptionLanguageDropdownLabel,
17626
+ strings === null || strings === void 0 ? void 0 : strings.captionsSettingsSpokenLanguageDropdownLabel,
17627
+ strings === null || strings === void 0 ? void 0 : strings.captionsSettingsCaptionLanguageDropdownInfoText,
17628
+ theme,
17629
+ changeCaptionLanguage
17505
17630
  ]);
17506
17631
  const CaptionsSettingsModalStyle = React.useMemo(() => themedCaptionsSettingsModalStyle(theme), [theme]);
17507
17632
  return (React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(react.Modal, { titleAriaId: strings === null || strings === void 0 ? void 0 : strings.captionsSettingsModalAriaLabel, isOpen: showModal, onDismiss: onDismiss, isBlocking: true, styles: CaptionsSettingsModalStyle },
@@ -20163,7 +20288,7 @@ const CallCompositeIcon = (props) => (React__default['default'].createElement(re
20163
20288
  */
20164
20289
  const CallWithChatCompositeIcon = (props) => (React__default['default'].createElement(react.FontIcon, Object.assign({}, props)));
20165
20290
 
20166
- var call$k={cameraLabel:"Camera",noCamerasLabel:"No cameras found",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",chatButtonLabel:"Chat",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied",defaultPlaceHolder:"Select an option",dismissSidePaneButtonLabel:"Close",videoEffectsPaneTitle:"Effects",videoEffectsPaneBackgroundSelectionTitle:"Background",configurationPageVideoEffectsButtonLabel:"Effects",unableToStartVideoEffect:"Unable to apply video effect.",blurBackgroundEffectButtonLabel:"Blur",blurBackgroundTooltip:"Blur Background",removeBackgroundEffectButtonLabel:"None",removeBackgroundTooltip:"Remove Background",cameraOffBackgroundEffectWarningText:"Your camera is off. Turn on camera to see video effect.",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leavingCallTitle:"Leaving...",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby.",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",deniedPermissionToRoomDetails:"You do not have permission to join this room.",deniedPermissionToRoomTitle:"Permission denied to room",peopleButtonLabel:"People",selectedPeopleButtonLabel:"People Button Selected",peoplePaneTitle:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call {numberOfPeople}",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",roomNotFoundDetails:"Room ID provided is not valid.",roomNotFoundTitle:"Room not found",soundLabel:"Sound",noMicrophonesLabel:"No microphones found",noSpeakersLabel:"No speakers found",startCallButtonLabel:"Start call",openDialpadButtonLabel:"Dial phone number",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close dialpad",moreButtonCallingLabel:"More",resumeCallButtonLabel:"Resume",resumingCallButtonLabel:"Resuming...",resumeCallButtonAriaLabel:"Resume call",resumingCallButtonAriaLabel:"Resume call",holdScreenLabel:"You're on hold",openDtmfDialpadLabel:"Show dialpad",dtmfDialpadPlaceholderText:"Enter number",outboundCallingNoticeString:"Calling...",participantJoinedNoticeString:"{displayName} joined",twoParticipantJoinedNoticeString:"{displayName1} and {displayName2} have joined",threeParticipantJoinedNoticeString:"{displayName1}, {displayName2} and {displayName3} have joined",participantLeftNoticeString:"{displayName} left",twoParticipantLeftNoticeString:"{displayName1} and {displayName2} have left",threeParticipantLeftNoticeString:"{displayName1}, {displayName2} and {displayName3} have left",unnamedParticipantString:"unnamed participant",manyUnnamedParticipantsJoined:"unnamed participant and {numOfParticipants} other participants joined",manyUnnamedParticipantsLeft:"unnamed participant and {numOfParticipants} other participants left",manyParticipantsJoined:"{displayName1}, {displayName2}, {displayName3} and {numOfParticipants} other participants joined",manyParticipantsLeft:"{displayName1}, {displayName2}, {displayName3} and {numOfParticipants} other participants left",liveCaptionsLabel:"Live captions",captionsSettingsLabel:"Caption settings",startCaptionsButtonOnLabel:"Turn on captions",startCaptionsButtonOffLabel:"Turn off captions",startCaptionsButtonTooltipOnContent:"Turn off captions",startCaptionsButtonTooltipOffContent:"Turn on captions",captionsSettingsModalTitle:"What language is being spoken?",captionsSettingsDropdownLabel:"Spoken language",captionsSettingsDropdownInfoText:"Language that everyone on this call is speaking.",captionsSettingsConfirmButtonLabel:"Confirm",captionsSettingsCancelButtonLabel:"Cancel",captionsSettingsModalAriaLabel:"Captions Setting Modal",captionsSettingsCloseModalButtonAriaLabel:"Close Captions Setting",captionsBannerMoreButtonCallingLabel:"More",captionsBannerMoreButtonTooltip:"More options",captionsAvailableLanguageStrings:{"ar-ae":"Arabic - U.A.E.","ar-sa":"Arabic - Saudi Arabia","da-dk":"Danish","de-de":"German - Germany","en-au":"English - Australia","en-ca":"English - Canada","en-gb":"English - United Kingdom","en-in":"English - India","en-nz":"English - New Zealand","en-us":"English - United States","es-es":"Spanish - Spain (Modern Sort)","es-mx":"Spanish - Mexico","fi-fi":"Finnish","fr-ca":"French - Canada","fr-fr":"French - France","hi-in":"Hindi","it-it":"Italian - Italy","ja-jp":"Japanese","ko-kr":"Korean","nb-no":"Norwegian (Bokmål)","nl-be":"Dutch - Belgium","nl-nl":"Dutch - Netherlands","pl-pl":"Polish","pt-br":"Portuguese - Brazil","ru-ru":"Russian","sv-se":"Swedish","zh-cn":"Chinese - People's Republic of China","zh-hk":"Chinese - Hong Kong SAR","cs-cz":"Czech","pt-pt":"Portuguese - Portugal","tr-tr":"Turkish","vi-vn":"Vietnamese","th-th":"Thai","he-il":"Hebrew","cy-gb":"Welsh","uk-ua":"Ukrainian","el-gr":"Greek","hu-hu":"Hungarian","ro-ro":"Romanian","sk-sk":"Slovak","zh-tw":"Chinese - Taiwan"},captionsBannerSpinnerText:"Starting captions...",transferPageTransferorText:"Transferring...",transferPageTransferTargetText:"Connecting...",transferPageUnknownTransferorDisplayName:"Unknown",transferPageUnknownTransferTargetDisplayName:"Unknown",transferPageNoticeString:"You are being transferred",participantCouldNotBeReachedTitle:"Target participant is currently not available",participantCouldNotBeReachedMoreDetails:"Please contact participant when they are available",permissionToReachTargetParticipantNotAllowedTitle:"Permission to reach target participant is not allowed",permissionToReachTargetParticipantNotAllowedMoreDetails:"Please check that the target participant is in the same tenant",unableToResolveTenantTitle:"Unable to resolve tenant id for the target participant",unableToResolveTenantMoreDetails:"Please check the participant id is entered correctly",participantIdIsMalformedTitle:"Participant id is not in the correct format",participantIdIsMalformedMoreDetails:"Please check that the participant id is in the correct format",moreButtonGalleryControlLabel:"Gallery options",moreButtonGalleryPositionToggleLabel:"Move gallery to top",moreButtonGallerySpeakerLayoutLabel:"Speaker layout",moreButtonGalleryFloatingLocalLayoutLabel:"Dynamic layout",moreButtonGalleryDefaultLayoutLabel:"Gallery layout",moreButtonGalleryFocusedContentLayoutLabel:"Focused content"};var chat$k={chatListHeader:"In this chat",uploadFile:"Upload File"};var callWithChat$k={chatButtonLabel:"Chat",chatButtonNewMessageNotificationLabel:"New Message",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipClose:"Hide chat",chatButtonTooltipOpen:"Show chat",chatPaneTitle:"Chat",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied",dismissSidePaneButtonLabel:"Close",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",moreDrawerCaptionsMenuTitle:"Live captions",moreDrawerSpokenLanguageMenuTitle:"Spoken language",peopleButtonLabel:"People",selectedPeopleButtonLabel:"People Button Selected",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call",peoplePaneTitle:"People",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",openDialpadButtonLabel:"Dial phone number",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close dialpad",openDtmfDialpadLabel:"Show dialpad",dtmfDialpadPlaceholderText:"Enter number"};var en_US = {call:call$k,chat:chat$k,callWithChat:callWithChat$k};
20291
+ var call$k={cameraLabel:"Camera",noCamerasLabel:"No cameras found",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",chatButtonLabel:"Chat",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied",defaultPlaceHolder:"Select an option",dismissSidePaneButtonLabel:"Close",videoEffectsPaneTitle:"Effects",videoEffectsPaneBackgroundSelectionTitle:"Background",configurationPageVideoEffectsButtonLabel:"Effects",unableToStartVideoEffect:"Unable to apply video effect.",blurBackgroundEffectButtonLabel:"Blur",blurBackgroundTooltip:"Blur Background",removeBackgroundEffectButtonLabel:"None",removeBackgroundTooltip:"Remove Background",cameraOffBackgroundEffectWarningText:"Your camera is off. Turn on camera to see video effect.",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leavingCallTitle:"Leaving...",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby.",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",deniedPermissionToRoomDetails:"You do not have permission to join this room.",deniedPermissionToRoomTitle:"Permission denied to room",peopleButtonLabel:"People",selectedPeopleButtonLabel:"People Button Selected",peoplePaneTitle:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call {numberOfPeople}",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",roomNotFoundDetails:"Room ID provided is not valid.",roomNotFoundTitle:"Room not found",soundLabel:"Sound",noMicrophonesLabel:"No microphones found",noSpeakersLabel:"No speakers found",startCallButtonLabel:"Start call",openDialpadButtonLabel:"Dial phone number",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close dialpad",moreButtonCallingLabel:"More",resumeCallButtonLabel:"Resume",resumingCallButtonLabel:"Resuming...",resumeCallButtonAriaLabel:"Resume call",resumingCallButtonAriaLabel:"Resume call",holdScreenLabel:"You're on hold",openDtmfDialpadLabel:"Show dialpad",dtmfDialpadPlaceholderText:"Enter number",outboundCallingNoticeString:"Calling...",participantJoinedNoticeString:"{displayName} joined",twoParticipantJoinedNoticeString:"{displayName1} and {displayName2} have joined",threeParticipantJoinedNoticeString:"{displayName1}, {displayName2} and {displayName3} have joined",participantLeftNoticeString:"{displayName} left",twoParticipantLeftNoticeString:"{displayName1} and {displayName2} have left",threeParticipantLeftNoticeString:"{displayName1}, {displayName2} and {displayName3} have left",unnamedParticipantString:"unnamed participant",manyUnnamedParticipantsJoined:"unnamed participant and {numOfParticipants} other participants joined",manyUnnamedParticipantsLeft:"unnamed participant and {numOfParticipants} other participants left",manyParticipantsJoined:"{displayName1}, {displayName2}, {displayName3} and {numOfParticipants} other participants joined",manyParticipantsLeft:"{displayName1}, {displayName2}, {displayName3} and {numOfParticipants} other participants left",liveCaptionsLabel:"Live captions",captionsSettingsLabel:"Caption settings",startCaptionsButtonOnLabel:"Turn on captions",startCaptionsButtonOffLabel:"Turn off captions",startCaptionsButtonTooltipOnContent:"Turn off captions",startCaptionsButtonTooltipOffContent:"Turn on captions",captionsSettingsModalTitle:"Captions Settings",captionsSettingsSpokenLanguageDropdownLabel:"Spoken language",captionsSettingsCaptionLanguageDropdownLabel:"Captions language",captionsSettingsSpokenLanguageDropdownInfoText:"Language that everyone on this call is speaking.",captionsSettingsCaptionLanguageDropdownInfoText:"Captions will appear in this langugage.",captionsSettingsConfirmButtonLabel:"Confirm",captionsSettingsCancelButtonLabel:"Cancel",captionsSettingsModalAriaLabel:"Captions Setting Modal",captionsSettingsCloseModalButtonAriaLabel:"Close Captions Setting",captionsBannerMoreButtonCallingLabel:"More",captionsBannerMoreButtonTooltip:"More options",spokenLanguageStrings:{"ar-ae":"Arabic - U.A.E.","ar-sa":"Arabic - Saudi Arabia","da-dk":"Danish","de-de":"German - Germany","en-au":"English - Australia","en-ca":"English - Canada","en-gb":"English - United Kingdom","en-in":"English - India","en-nz":"English - New Zealand","en-us":"English - United States","es-es":"Spanish - Spain (Modern Sort)","es-mx":"Spanish - Mexico","fi-fi":"Finnish","fr-ca":"French - Canada","fr-fr":"French - France","hi-in":"Hindi","it-it":"Italian - Italy","ja-jp":"Japanese","ko-kr":"Korean","nb-no":"Norwegian (Bokmål)","nl-be":"Dutch - Belgium","nl-nl":"Dutch - Netherlands","pl-pl":"Polish","pt-br":"Portuguese - Brazil","ru-ru":"Russian","sv-se":"Swedish","zh-cn":"Chinese - People's Republic of China","zh-hk":"Chinese - Hong Kong SAR","cs-cz":"Czech","pt-pt":"Portuguese - Portugal","tr-tr":"Turkish","vi-vn":"Vietnamese","th-th":"Thai","he-il":"Hebrew","cy-gb":"Welsh","uk-ua":"Ukrainian","el-gr":"Greek","hu-hu":"Hungarian","ro-ro":"Romanian","sk-sk":"Slovak","zh-tw":"Chinese - Taiwan"},captionLanguageStrings:{ar:"Arabic",da:"Danish",de:"German",en:"English",es:"Spanish",fi:"Finnish","fr-ca":"French - Canada",fr:"French - France",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",nb:"Norwegian (Bokmål)",nl:"Dutch",pl:"Polish",pt:"Portuguese - Brazil",ru:"Russian",sv:"Swedish","zh-Hans":"Chinese (Simplified)","zh-Hant":"Chinese (Traditional)",cs:"Czech","pt-pt":"Portuguese - Portugal",tr:"Turkish",vi:"Vietnamese",th:"Thai",he:"Hebrew",cy:"Welsh",uk:"Ukrainian",el:"Greek",hu:"Hungarian",ro:"Romanian",sk:"Slovak"},captionsBannerSpinnerText:"Starting captions...",transferPageTransferorText:"Transferring...",transferPageTransferTargetText:"Connecting...",transferPageUnknownTransferorDisplayName:"Unknown",transferPageUnknownTransferTargetDisplayName:"Unknown",transferPageNoticeString:"You are being transferred",participantCouldNotBeReachedTitle:"Target participant is currently not available",participantCouldNotBeReachedMoreDetails:"Please contact participant when they are available",permissionToReachTargetParticipantNotAllowedTitle:"Permission to reach target participant is not allowed",permissionToReachTargetParticipantNotAllowedMoreDetails:"Please check that the target participant is in the same tenant",unableToResolveTenantTitle:"Unable to resolve tenant id for the target participant",unableToResolveTenantMoreDetails:"Please check the participant id is entered correctly",participantIdIsMalformedTitle:"Participant id is not in the correct format",participantIdIsMalformedMoreDetails:"Please check that the participant id is in the correct format",moreButtonGalleryControlLabel:"Gallery options",moreButtonGalleryPositionToggleLabel:"Move gallery to top",moreButtonGallerySpeakerLayoutLabel:"Speaker layout",moreButtonGalleryFloatingLocalLayoutLabel:"Dynamic layout",moreButtonGalleryDefaultLayoutLabel:"Gallery layout",moreButtonGalleryFocusedContentLayoutLabel:"Focused content"};var chat$k={chatListHeader:"In this chat",uploadFile:"Upload File"};var callWithChat$k={chatButtonLabel:"Chat",chatButtonNewMessageNotificationLabel:"New Message",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipClose:"Hide chat",chatButtonTooltipOpen:"Show chat",chatPaneTitle:"Chat",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied",dismissSidePaneButtonLabel:"Close",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",moreDrawerCaptionsMenuTitle:"Live captions",moreDrawerSpokenLanguageMenuTitle:"Spoken language",moreDrawerCaptionLanguageMenuTitle:"Caption language",peopleButtonLabel:"People",selectedPeopleButtonLabel:"People Button Selected",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call",peoplePaneTitle:"People",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",openDialpadButtonLabel:"Dial phone number",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close dialpad",openDtmfDialpadLabel:"Show dialpad",dtmfDialpadPlaceholderText:"Enter number"};var en_US = {call:call$k,chat:chat$k,callWithChat:callWithChat$k};
20167
20292
 
20168
20293
  var call$j={cameraLabel:"Camera",noCamerasLabel:"No cameras found",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",chatButtonLabel:"Chat",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied",defaultPlaceHolder:"Select an option",dismissSidePaneButtonLabel:"Close",videoEffectsPaneTitle:"Effects",videoEffectsPaneBackgroundSelectionTitle:"Background",configurationPageVideoEffectsButtonLabel:"Effects",unableToStartVideoEffect:"Unable to apply video effect.",blurBackgroundEffectButtonLabel:"Blur",blurBackgroundTooltip:"Blur Background",removeBackgroundEffectButtonLabel:"None",removeBackgroundTooltip:"Remove Background",cameraOffBackgroundEffectWarningText:"Your camera is off. Turn on camera to see video effect.",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leavingCallTitle:"Leaving...",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby.",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",deniedPermissionToRoomDetails:"You do not have permission to join this room.",deniedPermissionToRoomTitle:"Permission denied to room",peopleButtonLabel:"People",peoplePaneTitle:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call {numberOfPeople}",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",roomNotFoundDetails:"Room ID provided is not valid.",roomNotFoundTitle:"Room not found",soundLabel:"Sound",noMicrophonesLabel:"No microphones found",noSpeakersLabel:"No speakers found",startCallButtonLabel:"Start call",openDialpadButtonLabel:"Dial phone number",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close dialpad",moreButtonCallingLabel:"More",resumeCallButtonLabel:"Resume",resumingCallButtonLabel:"Resuming...",resumeCallButtonAriaLabel:"Resume call",resumingCallButtonAriaLabel:"Resume call",holdScreenLabel:"You're on hold",openDtmfDialpadLabel:"Show dialpad",dtmfDialpadPlaceholderText:"Enter number",outboundCallingNoticeString:"Calling...",participantJoinedNoticeString:"{displayName} joined",twoParticipantJoinedNoticeString:"{displayName1} and {displayName2} have joined",threeParticipantJoinedNoticeString:"{displayName1}, {displayName2} and {displayName3} have joined",participantLeftNoticeString:"{displayName} left",twoParticipantLeftNoticeString:"{displayName1} and {displayName2} have left",threeParticipantLeftNoticeString:"{displayName1}, {displayName2} and {displayName3} have left",unnamedParticipantString:"unnamed participant",manyUnnamedParticipantsJoined:"unnamed participant and {numOfParticipants} other participants joined",manyUnnamedParticipantsLeft:"unnamed participant and {numOfParticipants} other participants left",manyParticipantsJoined:"{displayName1}, {displayName2}, {displayName3} and {numOfParticipants} other participants joined",manyParticipantsLeft:"{displayName1}, {displayName2}, {displayName3} and {numOfParticipants} other participants left",liveCaptionsLabel:"Live captions",captionsSettingsLabel:"Caption settings",startCaptionsButtonOnLabel:"Turn on captions",startCaptionsButtonOffLabel:"Turn off captions",startCaptionsButtonTooltipOnContent:"Turn off captions",startCaptionsButtonTooltipOffContent:"Turn on captions",captionsSettingsModalTitle:"What language is being spoken?",captionsSettingsDropdownLabel:"Spoken language",captionsSettingsDropdownInfoText:"Language that everyone on this call is speaking.",captionsSettingsConfirmButtonLabel:"Confirm",captionsSettingsCancelButtonLabel:"Cancel",captionsSettingsModalAriaLabel:"Captions Setting Modal",captionsSettingsCloseModalButtonAriaLabel:"Close Captions Setting",captionsBannerMoreButtonCallingLabel:"More",captionsBannerMoreButtonTooltip:"More options",captionsAvailableLanguageStrings:{"ar-ae":"Arabic - U.A.E.","ar-sa":"Arabic - Saudi Arabia","da-dk":"Danish","de-de":"German - Germany","en-au":"English - Australia","en-ca":"English - Canada","en-gb":"English - United Kingdom","en-in":"English - India","en-nz":"English - New Zealand","en-us":"English - United States","es-es":"Spanish - Spain (Modern Sort)","es-mx":"Spanish - Mexico","fi-fi":"Finnish","fr-ca":"French - Canada","fr-fr":"French - France","hi-in":"Hindi","it-it":"Italian - Italy","ja-jp":"Japanese","ko-kr":"Korean","nb-no":"Norwegian (Bokmål)","nl-be":"Dutch - Belgium","nl-nl":"Dutch - Netherlands","pl-pl":"Polish","pt-br":"Portuguese - Brazil","ru-ru":"Russian","sv-se":"Swedish","zh-cn":"Chinese - People's Republic of China","zh-hk":"Chinese - Hong Kong SAR","cs-cz":"Czech","pt-pt":"Portuguese - Portugal","tr-tr":"Turkish","vi-vn":"Vietnamese","th-th":"Thai","he-il":"Hebrew","cy-gb":"Welsh","uk-ua":"Ukrainian","el-gr":"Greek","hu-hu":"Hungarian","ro-ro":"Romanian","sk-sk":"Slovak","zh-tw":"Chinese - Taiwan"},captionsBannerSpinnerText:"Starting captions...",transferPageTransferorText:"Transferring...",transferPageTransferTargetText:"Connecting...",transferPageUnknownTransferorDisplayName:"Unknown",transferPageUnknownTransferTargetDisplayName:"Unknown",transferPageNoticeString:"You are being transferred",participantCouldNotBeReachedTitle:"Target participant is currently not available",participantCouldNotBeReachedMoreDetails:"Please contact participant when they are available",permissionToReachTargetParticipantNotAllowedTitle:"Permission to reach target participant is not allowed",permissionToReachTargetParticipantNotAllowedMoreDetails:"Please check that the target participant is in the same tenant",unableToResolveTenantTitle:"Unable to resolve tenant id for the target participant",unableToResolveTenantMoreDetails:"Please check the participant id is entered correctly",participantIdIsMalformedTitle:"Participant id is not in the correct format",participantIdIsMalformedMoreDetails:"Please check that the participant id is in the correct format",moreButtonGalleryControlLabel:"Gallery options",moreButtonGalleryPositionToggleLabel:"Move gallery to top",moreButtonGallerySpeakerLayoutLabel:"Speaker layout",moreButtonGalleryFloatingLocalLayoutLabel:"Dynamic layout",moreButtonGalleryDefaultLayoutLabel:"Gallery layout",moreButtonGalleryFocusedContentLayoutLabel:"Focused content"};var chat$j={chatListHeader:"In this chat",uploadFile:"Upload File"};var callWithChat$j={chatButtonLabel:"Chat",chatButtonNewMessageNotificationLabel:"New Message",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipClose:"Hide chat",chatButtonTooltipOpen:"Show chat",chatPaneTitle:"Chat",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied",dismissSidePaneButtonLabel:"Close",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",moreDrawerCaptionsMenuTitle:"Live captions",moreDrawerSpokenLanguageMenuTitle:"Spoken language",peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call",peoplePaneTitle:"People",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",openDialpadButtonLabel:"Dial phone number",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close dialpad",openDtmfDialpadLabel:"Show dialpad",dtmfDialpadPlaceholderText:"Enter number"};var en_GB = {call:call$j,chat:chat$j,callWithChat:callWithChat$j};
20169
20294
 
@@ -21858,7 +21983,6 @@ const ChatScreen = (props) => {
21858
21983
  return message.messageId === messageId;
21859
21984
  });
21860
21985
  if (!messages || messages.length <= 0) {
21861
- console.log(`Message not found with messageId ${messageId}`);
21862
21986
  return;
21863
21987
  }
21864
21988
  const chatMessage = messages[0];
@@ -21866,7 +21990,6 @@ const ChatScreen = (props) => {
21866
21990
  return attachment.id === attachmentId;
21867
21991
  });
21868
21992
  if (!attachments || attachments.length <= 0) {
21869
- console.log(`Attachment not found with id ${attachmentId}`);
21870
21993
  return;
21871
21994
  }
21872
21995
  const attachment = attachments[0];
@@ -21903,14 +22026,22 @@ const ChatScreen = (props) => {
21903
22026
  }), [adapter, fullSizeAttachments, messageThreadProps.messages, onRenderAvatarCallback]);
21904
22027
  /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
21905
22028
  const onImageDownloadButtonClicked = React.useCallback((imageUrl, saveAsName) => {
21906
- // Create a new anchor element
21907
- const a = document.createElement('a');
21908
- // Set the href and download attributes for the anchor element
21909
- a.href = imageUrl;
21910
- a.download = saveAsName || 'download';
21911
- // Programmatically click the anchor element to trigger the download
21912
- a.click();
21913
- a.remove();
22029
+ if (react.isIOS()) {
22030
+ window.open(imageUrl, '_blank');
22031
+ }
22032
+ else {
22033
+ // Create a new anchor element
22034
+ const a = document.createElement('a');
22035
+ // Set the href and download attributes for the anchor element
22036
+ a.href = imageUrl;
22037
+ a.download = saveAsName;
22038
+ a.rel = 'noopener noreferrer';
22039
+ a.target = '_blank';
22040
+ // Programmatically click the anchor element to trigger the download
22041
+ document.body.appendChild(a);
22042
+ a.click();
22043
+ document.body.removeChild(a);
22044
+ }
21914
22045
  }, []);
21915
22046
  const AttachFileButton = React.useCallback(() => {
21916
22047
  if (!(fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.uploadHandler)) {
@@ -22630,7 +22761,7 @@ const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
22630
22761
  /** @private */
22631
22762
  const CaptionsSettingsModal = (props) => {
22632
22763
  /* @conditional-compile-remove(close-captions) */
22633
- const CaptionsSettingsModalProps = useAdaptedSelector(_changeSpokenLanguageSelector);
22764
+ const CaptionsSettingsModalProps = useAdaptedSelector(_captionSettingsSelector);
22634
22765
  /* @conditional-compile-remove(close-captions) */
22635
22766
  const handlers = useHandlers();
22636
22767
  /* @conditional-compile-remove(close-captions) */
@@ -22638,17 +22769,21 @@ const CaptionsSettingsModal = (props) => {
22638
22769
  /* @conditional-compile-remove(close-captions) */
22639
22770
  const modalStrings = {
22640
22771
  captionsSettingsModalTitle: strings.captionsSettingsModalTitle,
22641
- captionsSettingsDropdownLabel: strings.captionsSettingsDropdownLabel,
22642
- captionsSettingsDropdownInfoText: strings.captionsSettingsDropdownInfoText,
22772
+ captionsSettingsSpokenLanguageDropdownLabel: strings.captionsSettingsSpokenLanguageDropdownLabel,
22773
+ captionsSettingsCaptionLanguageDropdownLabel: strings.captionsSettingsCaptionLanguageDropdownLabel,
22774
+ captionsSettingsSpokenLanguageDropdownInfoText: strings.captionsSettingsSpokenLanguageDropdownInfoText,
22775
+ captionsSettingsCaptionLanguageDropdownInfoText: strings.captionsSettingsCaptionLanguageDropdownInfoText,
22643
22776
  captionsSettingsConfirmButtonLabel: strings.captionsSettingsConfirmButtonLabel,
22644
22777
  captionsSettingsCancelButtonLabel: strings.captionsSettingsCancelButtonLabel,
22645
22778
  captionsSettingsModalAriaLabel: strings.captionsSettingsModalAriaLabel,
22646
22779
  captionsSettingsCloseModalButtonAriaLabel: strings.captionsSettingsCloseModalButtonAriaLabel
22647
22780
  };
22648
22781
  /* @conditional-compile-remove(close-captions) */
22649
- const captionsAvailableLanguageStrings = strings.captionsAvailableLanguageStrings;
22782
+ const spokenLanguageStrings = strings.spokenLanguageStrings;
22650
22783
  /* @conditional-compile-remove(close-captions) */
22651
- return (React__default['default'].createElement(_CaptionsSettingsModal, Object.assign({}, CaptionsSettingsModalProps, handlers, { strings: modalStrings, captionsAvailableLanguageStrings: captionsAvailableLanguageStrings, showModal: props.showCaptionsSettingsModal, onDismissCaptionsSettings: props.onDismissCaptionsSettings })));
22784
+ const captionLanguageStrings = strings.captionLanguageStrings;
22785
+ /* @conditional-compile-remove(close-captions) */
22786
+ return (React__default['default'].createElement(_CaptionsSettingsModal, Object.assign({}, CaptionsSettingsModalProps, handlers, { strings: modalStrings, spokenLanguageStrings: spokenLanguageStrings, captionLanguageStrings: captionLanguageStrings, showModal: props.showCaptionsSettingsModal, onDismissCaptionsSettings: props.onDismissCaptionsSettings, changeCaptionLanguage: props.changeCaptionLanguage })));
22652
22787
  };
22653
22788
 
22654
22789
  // Copyright (c) Microsoft Corporation.
@@ -22874,7 +23009,7 @@ const CaptionsBanner = (props) => {
22874
23009
  captionsBannerSpinnerText: strings.captionsBannerSpinnerText
22875
23010
  };
22876
23011
  return (React__default['default'].createElement(React__default['default'].Fragment, null,
22877
- /* @conditional-compile-remove(close-captions) */ isCaptionsSettingsOpen && (React__default['default'].createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: isCaptionsSettingsOpen, onDismissCaptionsSettings: onDismissCaptionsSettings })),
23012
+ /* @conditional-compile-remove(close-captions) */ isCaptionsSettingsOpen && (React__default['default'].createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: isCaptionsSettingsOpen, onDismissCaptionsSettings: onDismissCaptionsSettings, changeCaptionLanguage: true })),
22878
23013
  /* @conditional-compile-remove(close-captions) */ React__default['default'].createElement("div", { className: containerClassName },
22879
23014
  React__default['default'].createElement(react.Stack, { horizontalAlign: "center" },
22880
23015
  React__default['default'].createElement(react.Stack.Item, { style: { width: props.isMobile ? mobileViewBannerWidth : desktopViewBannerWidth, maxWidth: '35rem' } },
@@ -23109,6 +23244,12 @@ const getRemoteParticipants = (state) => { var _a; return (_a = state.call) ===
23109
23244
  */
23110
23245
  const getSelectedVideoEffect = (state) => state.selectedVideoBackgroundEffect;
23111
23246
  /* @conditional-compile-remove(close-captions) */
23247
+ /** @private */
23248
+ const getCaptionsStatus = (state) => {
23249
+ var _a;
23250
+ return (_a = state.call) === null || _a === void 0 ? void 0 : _a.captionsFeature.isCaptionsFeatureActive;
23251
+ };
23252
+ /* @conditional-compile-remove(close-captions) */
23112
23253
  /**
23113
23254
  * @private
23114
23255
  */
@@ -24147,7 +24288,7 @@ const CommonCallControlBar = (props) => {
24147
24288
  const cameraButtonIsEnabled = isEnabled$1(options === null || options === void 0 ? void 0 : options.cameraButton);
24148
24289
  return (React__default['default'].createElement("div", { ref: controlBarSizeRef },
24149
24290
  React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
24150
- /* @conditional-compile-remove(close-captions) */ showCaptionsSettingsModal && (React__default['default'].createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: showCaptionsSettingsModal, onDismissCaptionsSettings: onDismissCaptionsSettings }))),
24291
+ /* @conditional-compile-remove(close-captions) */ showCaptionsSettingsModal && (React__default['default'].createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: showCaptionsSettingsModal, onDismissCaptionsSettings: onDismissCaptionsSettings, changeCaptionLanguage: props.isCaptionsOn }))),
24151
24292
  React__default['default'].createElement(react.Stack, { horizontal: true, reversed: !props.mobileView && !isOutOfSpace, horizontalAlign: "space-between", className: react.mergeStyles(callControlsContainerStyles, controlBarContainerStyles, controlBarDesktopContainerStyles) },
24152
24293
  React__default['default'].createElement(react.Stack.Item, { grow: true, className: react.mergeStyles(controlBarWrapperDesktopStyles) },
24153
24294
  React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
@@ -24177,9 +24318,11 @@ const CommonCallControlBar = (props) => {
24177
24318
  return (React__default['default'].createElement(CustomButton, { key: `primary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
24178
24319
  }),
24179
24320
  props.mobileView && (React__default['default'].createElement(MoreButton, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage })),
24180
- /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
24321
+ /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
24181
24322
  /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.holdButton) &&
24182
- !props.mobileView && (React__default['default'].createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad,
24323
+ !props.mobileView && (React__default['default'].createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles,
24324
+ /*@conditional-compile-remove(PSTN-calls) */
24325
+ onClickShowDialpad: props.onClickShowDialpad,
24183
24326
  /* @conditional-compile-remove(control-bar-button-injection) */
24184
24327
  callControls: props.callControls,
24185
24328
  /* @conditional-compile-remove(close-captions) */
@@ -24356,7 +24499,7 @@ const callStatusSelector = reselect.createSelector([getCallStatus, getIsScreenSh
24356
24499
  /**
24357
24500
  * @private
24358
24501
  */
24359
- const spokenLanguageDrawerStyles = (theme) => ({
24502
+ const captionSettingsDrawerStyles = (theme) => ({
24360
24503
  root: {
24361
24504
  overflow: 'auto'
24362
24505
  },
@@ -24376,38 +24519,29 @@ const spokenLanguageDrawerStyles = (theme) => ({
24376
24519
 
24377
24520
  // Copyright (c) Microsoft Corporation.
24378
24521
  /** @private */
24379
- const SpokenLanguageDrawer = (props) => {
24522
+ const CaptionSettingsDrawer = (props) => {
24380
24523
  var _a;
24381
24524
  /* @conditional-compile-remove(close-captions) */
24382
24525
  const theme = useTheme();
24383
24526
  /* @conditional-compile-remove(close-captions) */
24384
- const changeSpokenLanguageProps = useAdaptedSelector(_changeSpokenLanguageSelector);
24385
- /* @conditional-compile-remove(close-captions) */
24386
- const changeSpokenLanguageHandlers = useHandlers();
24387
- /* @conditional-compile-remove(close-captions) */
24388
- const onSpokenLanguageDrawerItemClick = React.useCallback((languageCode) => {
24389
- props.setCurrentSpokenLanguage(languageCode);
24527
+ const onDrawerItemClick = React.useCallback((languageCode) => {
24528
+ props.selectLanguage(languageCode);
24390
24529
  }, [props]);
24391
24530
  /* @conditional-compile-remove(close-captions) */
24392
- const spokenLanguageDrawerItems = React.useMemo(() => {
24531
+ const drawerItems = React.useMemo(() => {
24393
24532
  var _a;
24394
- return (_a = changeSpokenLanguageProps === null || changeSpokenLanguageProps === void 0 ? void 0 : changeSpokenLanguageProps.supportedSpokenLanguages) === null || _a === void 0 ? void 0 : _a.map((languageCode) => ({
24533
+ return Object.keys((_a = props.supportedLanguageStrings) !== null && _a !== void 0 ? _a : []).map((languageCode) => ({
24395
24534
  itemKey: languageCode,
24396
24535
  text: props.supportedLanguageStrings ? props.supportedLanguageStrings[languageCode] : languageCode,
24397
- onItemClick: () => onSpokenLanguageDrawerItemClick(languageCode),
24398
- secondaryIconProps: props.currentSpokenLanguage === languageCode ? { iconName: 'Accept' } : undefined
24536
+ onItemClick: () => onDrawerItemClick(languageCode),
24537
+ secondaryIconProps: props.currentLanguage === languageCode ? { iconName: 'Accept' } : undefined
24399
24538
  }));
24400
- }, [
24401
- changeSpokenLanguageProps === null || changeSpokenLanguageProps === void 0 ? void 0 : changeSpokenLanguageProps.supportedSpokenLanguages,
24402
- props.currentSpokenLanguage,
24403
- props.supportedLanguageStrings,
24404
- onSpokenLanguageDrawerItemClick
24405
- ]);
24539
+ }, [props.currentLanguage, props.supportedLanguageStrings, onDrawerItemClick]);
24406
24540
  /* @conditional-compile-remove(close-captions) */
24407
- return (React__default['default'].createElement(_DrawerMenu, { heading: (_a = props.strings) === null || _a === void 0 ? void 0 : _a.spokenLanguageMenuTitle, items: spokenLanguageDrawerItems !== null && spokenLanguageDrawerItems !== void 0 ? spokenLanguageDrawerItems : [], onLightDismiss: () => {
24408
- changeSpokenLanguageHandlers.onSetSpokenLanguage(props.currentSpokenLanguage);
24541
+ return (React__default['default'].createElement(_DrawerMenu, { heading: (_a = props.strings) === null || _a === void 0 ? void 0 : _a.menuTitle, items: drawerItems !== null && drawerItems !== void 0 ? drawerItems : [], onLightDismiss: () => {
24542
+ props.setCurrentLanguage(props.currentLanguage);
24409
24543
  props.onLightDismiss();
24410
- }, styles: spokenLanguageDrawerStyles(theme) }));
24544
+ }, styles: captionSettingsDrawerStyles(theme) }));
24411
24545
  };
24412
24546
 
24413
24547
  /**
@@ -24459,7 +24593,7 @@ const MoreDrawer = (props) => {
24459
24593
  const theme = react.useTheme();
24460
24594
  const drawerMenuItems = [];
24461
24595
  const { speakers, onSelectSpeaker, onLightDismiss } = props;
24462
- /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
24596
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */
24463
24597
  const localeStrings = useLocale();
24464
24598
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
24465
24599
  const holdButtonProps = usePropsFor$1(HoldButton);
@@ -24589,18 +24723,29 @@ const MoreDrawer = (props) => {
24589
24723
  }
24590
24724
  /* @conditional-compile-remove(close-captions) */
24591
24725
  //Captions drawer menu
24592
- const supportedLanguageStrings = useLocale().strings.call.captionsAvailableLanguageStrings;
24726
+ const supportedSpokenLanguageStrings = useLocale().strings.call.spokenLanguageStrings;
24593
24727
  /* @conditional-compile-remove(close-captions) */
24594
- const startCaptionsButtonProps = useAdaptedSelector(_startCaptionsButtonSelector);
24728
+ //Captions drawer menu
24729
+ const supportedCaptionLanguageStrings = useLocale().strings.call.captionLanguageStrings;
24730
+ /* @conditional-compile-remove(close-captions) */
24731
+ const captionSettingsProp = useAdaptedSelector(_captionSettingsSelector);
24595
24732
  /* @conditional-compile-remove(close-captions) */
24596
24733
  const startCaptionsButtonHandlers = useHandlers();
24597
24734
  /* @conditional-compile-remove(close-captions) */
24735
+ const captionSettingsHandlers = useHandlers();
24736
+ /* @conditional-compile-remove(close-captions) */
24598
24737
  const [isSpokenLanguageDrawerOpen, setIsSpokenLanguageDrawerOpen] = React.useState(false);
24599
24738
  /* @conditional-compile-remove(close-captions) */
24600
- const [currentSpokenLanguage, setCurrentSpokenLanguage] = React.useState(startCaptionsButtonProps.currentSpokenLanguage);
24739
+ const [isCaptionLanguageDrawerOpen, setIsCaptionLanguageDrawerOpen] = React.useState(false);
24740
+ /* @conditional-compile-remove(close-captions) */
24741
+ const [currentSpokenLanguage, setCurrentSpokenLanguage] = React.useState(captionSettingsProp.currentSpokenLanguage !== '' ? captionSettingsProp.currentSpokenLanguage : 'en-us');
24742
+ /* @conditional-compile-remove(close-captions) */
24743
+ const [currentCaptionLanguage, setCurrentCaptionLanguage] = React.useState(captionSettingsProp.currentCaptionLanguage !== ''
24744
+ ? captionSettingsProp.currentCaptionLanguage
24745
+ : _spokenLanguageToCaptionLanguage[currentSpokenLanguage]);
24601
24746
  /* @conditional-compile-remove(close-captions) */
24602
24747
  const onToggleChange = React.useCallback(() => __awaiter$d(void 0, void 0, void 0, function* () {
24603
- if (!startCaptionsButtonProps.checked) {
24748
+ if (!captionSettingsProp.isCaptionsFeatureActive) {
24604
24749
  yield startCaptionsButtonHandlers.onStartCaptions({
24605
24750
  spokenLanguage: currentSpokenLanguage
24606
24751
  });
@@ -24608,10 +24753,16 @@ const MoreDrawer = (props) => {
24608
24753
  else {
24609
24754
  startCaptionsButtonHandlers.onStopCaptions();
24610
24755
  }
24611
- }), [startCaptionsButtonProps.checked, startCaptionsButtonHandlers, currentSpokenLanguage]);
24756
+ }), [captionSettingsProp.isCaptionsFeatureActive, startCaptionsButtonHandlers, currentSpokenLanguage]);
24612
24757
  /* @conditional-compile-remove(close-captions) */
24613
24758
  if (props.isCaptionsSupported) {
24614
24759
  const captionsDrawerItems = [];
24760
+ const spokenLanguageString = supportedSpokenLanguageStrings
24761
+ ? supportedSpokenLanguageStrings[currentSpokenLanguage]
24762
+ : currentSpokenLanguage;
24763
+ const captionLanguageString = supportedCaptionLanguageStrings
24764
+ ? supportedCaptionLanguageStrings[currentCaptionLanguage]
24765
+ : currentCaptionLanguage;
24615
24766
  drawerMenuItems.push({
24616
24767
  itemKey: 'captions',
24617
24768
  id: 'common-call-composite-captions-button',
@@ -24622,27 +24773,27 @@ const MoreDrawer = (props) => {
24622
24773
  });
24623
24774
  captionsDrawerItems.push({
24624
24775
  itemKey: 'ToggleCaptionsKey',
24625
- text: startCaptionsButtonProps.checked
24776
+ text: captionSettingsProp.isCaptionsFeatureActive
24626
24777
  ? localeStrings.strings.call.startCaptionsButtonTooltipOnContent
24627
24778
  : localeStrings.strings.call.startCaptionsButtonTooltipOffContent,
24628
24779
  iconProps: {
24629
- iconName: startCaptionsButtonProps.checked ? 'CaptionsOffIcon' : 'CaptionsIcon',
24780
+ iconName: captionSettingsProp.isCaptionsFeatureActive ? 'CaptionsOffIcon' : 'CaptionsIcon',
24630
24781
  styles: { root: { lineHeight: 0 } }
24631
24782
  },
24632
24783
  disabled: props.disableButtonsForHoldScreen,
24633
24784
  secondaryComponent: (React__default['default'].createElement(react.Stack, { verticalFill: true, verticalAlign: "center" },
24634
- React__default['default'].createElement(react.Toggle, { id: "common-call-composite-captions-toggle-button", checked: startCaptionsButtonProps.checked, styles: themedToggleButtonStyle(theme, startCaptionsButtonProps.checked), onChange: onToggleChange })))
24785
+ React__default['default'].createElement(react.Toggle, { id: "common-call-composite-captions-toggle-button", checked: captionSettingsProp.isCaptionsFeatureActive, styles: themedToggleButtonStyle(theme, captionSettingsProp.isCaptionsFeatureActive), onChange: onToggleChange })))
24635
24786
  });
24636
24787
  captionsDrawerItems.push({
24637
24788
  itemKey: 'ChangeSpokenLanguage',
24638
24789
  text: props.strings.spokenLanguageMenuTitle,
24639
- id: 'common-call-composite-captions-settings-button',
24640
- secondaryText: supportedLanguageStrings ? supportedLanguageStrings[currentSpokenLanguage] : currentSpokenLanguage,
24790
+ id: 'common-call-composite-captions-spoken-settings-button',
24791
+ secondaryText: spokenLanguageString,
24641
24792
  iconProps: {
24642
24793
  iconName: 'ChangeSpokenLanguageIcon',
24643
24794
  styles: { root: { lineHeight: 0 } }
24644
24795
  },
24645
- disabled: props.disableButtonsForHoldScreen || !startCaptionsButtonProps.checked,
24796
+ disabled: props.disableButtonsForHoldScreen || !captionSettingsProp.isCaptionsFeatureActive,
24646
24797
  onItemClick: () => {
24647
24798
  setIsSpokenLanguageDrawerOpen(true);
24648
24799
  },
@@ -24651,6 +24802,24 @@ const MoreDrawer = (props) => {
24651
24802
  styles: { root: { lineHeight: 0 } }
24652
24803
  }
24653
24804
  });
24805
+ captionsDrawerItems.push({
24806
+ itemKey: 'ChangeCaptionLanguage',
24807
+ text: props.strings.captionLanguageMenuTitle,
24808
+ id: 'common-call-composite-captions-subtitle-settings-button',
24809
+ secondaryText: captionLanguageString,
24810
+ iconProps: {
24811
+ iconName: 'ChangeCaptionLanguageIcon',
24812
+ styles: { root: { lineHeight: 0 } }
24813
+ },
24814
+ disabled: props.disableButtonsForHoldScreen || !captionSettingsProp.isCaptionsFeatureActive,
24815
+ onItemClick: () => {
24816
+ setIsCaptionLanguageDrawerOpen(true);
24817
+ },
24818
+ secondaryIconProps: {
24819
+ iconName: 'ChevronRight',
24820
+ styles: { root: { lineHeight: 0 } }
24821
+ }
24822
+ });
24654
24823
  }
24655
24824
  /* @conditional-compile-remove(control-bar-button-injection) */
24656
24825
  const customDrawerButtons = React.useMemo(() => generateCustomCallDrawerButtons(onFetchCustomButtonPropsTrampoline(drawerSelectionOptions !== false ? drawerSelectionOptions : undefined), drawerSelectionOptions !== false ? drawerSelectionOptions === null || drawerSelectionOptions === void 0 ? void 0 : drawerSelectionOptions.displayType : undefined), [drawerSelectionOptions]);
@@ -24668,8 +24837,9 @@ const MoreDrawer = (props) => {
24668
24837
  });
24669
24838
  /* @conditional-compile-remove(close-captions) */
24670
24839
  return (React__default['default'].createElement(React__default['default'].Fragment, null,
24671
- isSpokenLanguageDrawerOpen && props.isCaptionsSupported && (React__default['default'].createElement(SpokenLanguageDrawer, { onLightDismiss: props.onLightDismiss, setCurrentSpokenLanguage: setCurrentSpokenLanguage, currentSpokenLanguage: currentSpokenLanguage, strings: props.strings, supportedLanguageStrings: supportedLanguageStrings })),
24672
- !isSpokenLanguageDrawerOpen && React__default['default'].createElement(_DrawerMenu, { items: drawerMenuItems, onLightDismiss: props.onLightDismiss })));
24840
+ isSpokenLanguageDrawerOpen && props.isCaptionsSupported && (React__default['default'].createElement(CaptionSettingsDrawer, { onLightDismiss: props.onLightDismiss, selectLanguage: setCurrentSpokenLanguage, setCurrentLanguage: captionSettingsHandlers.onSetSpokenLanguage, currentLanguage: currentSpokenLanguage, strings: { menuTitle: props.strings.spokenLanguageMenuTitle }, supportedLanguageStrings: supportedSpokenLanguageStrings })),
24841
+ isCaptionLanguageDrawerOpen && props.isCaptionsSupported && (React__default['default'].createElement(CaptionSettingsDrawer, { onLightDismiss: props.onLightDismiss, selectLanguage: setCurrentCaptionLanguage, setCurrentLanguage: captionSettingsHandlers.onSetCaptionLanguage, currentLanguage: currentCaptionLanguage, strings: { menuTitle: props.strings.captionLanguageMenuTitle }, supportedLanguageStrings: supportedCaptionLanguageStrings })),
24842
+ !isSpokenLanguageDrawerOpen && !isCaptionLanguageDrawerOpen && (React__default['default'].createElement(_DrawerMenu, { items: drawerMenuItems, onLightDismiss: props.onLightDismiss }))));
24673
24843
  };
24674
24844
  const isDeviceSelected = (speaker, selectedSpeaker) => !!selectedSpeaker && speaker.id === selectedSpeaker.id;
24675
24845
  const isEnabled = (option) => option !== false;
@@ -24699,7 +24869,9 @@ const PreparedMoreDrawer = (props) => {
24699
24869
  /* @conditional-compile-remove(close-captions) */
24700
24870
  captionsMenuTitle: strings.moreDrawerCaptionsMenuTitle,
24701
24871
  /* @conditional-compile-remove(close-captions) */
24702
- spokenLanguageMenuTitle: strings.moreDrawerSpokenLanguageMenuTitle
24872
+ spokenLanguageMenuTitle: strings.moreDrawerSpokenLanguageMenuTitle,
24873
+ /* @conditional-compile-remove(close-captions) */
24874
+ captionLanguageMenuTitle: strings.moreDrawerCaptionLanguageMenuTitle
24703
24875
  }), [strings]);
24704
24876
  const deviceProps = useSelector$1(moreDrawerSelector);
24705
24877
  const callHandlers = useHandlers();
@@ -26091,6 +26263,8 @@ const CallArrangement = (props) => {
26091
26263
  const isTeamsCall = useSelector$1(getIsTeamsCall);
26092
26264
  /* @conditional-compile-remove(close-captions) */
26093
26265
  const hasJoinedCall = useSelector$1(getCallStatus) === 'Connected';
26266
+ /* @conditional-compile-remove(close-captions) */
26267
+ const isCaptionsOn = useSelector$1(getCaptionsStatus);
26094
26268
  const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId);
26095
26269
  const pipStyles = React.useMemo(() => getPipStyles(theme), [theme]);
26096
26270
  const verticalControlBar = props.mobileView && containerWidth && containerHeight && containerWidth / containerHeight > 1 ? true : false;
@@ -26109,6 +26283,8 @@ const CallArrangement = (props) => {
26109
26283
  disableButtonsForHoldScreen: isInLocalHold, peopleButtonChecked: isPeoplePaneOpen, onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked,
26110
26284
  /* @conditional-compile-remove(close-captions) */
26111
26285
  isCaptionsSupported: isTeamsCall && hasJoinedCall,
26286
+ /* @conditional-compile-remove(close-captions) */
26287
+ isCaptionsOn: isCaptionsOn,
26112
26288
  /* @conditional-compile-remove(video-background-effects) */
26113
26289
  onShowVideoEffectsPicker: onResolveVideoEffectDependency ? openVideoEffectsPane : undefined,
26114
26290
  /* @conditional-compile-remove(PSTN-calls) */
@@ -29407,6 +29583,8 @@ class AzureCommunicationCallAdapter {
29407
29583
  const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(communicationCalling.Features.Captions).captions;
29408
29584
  captionsFeature.on('CaptionsReceived', this.captionsReceived.bind(this));
29409
29585
  captionsFeature.on('CaptionsActiveChanged', this.isCaptionsActiveChanged.bind(this));
29586
+ captionsFeature.on('CaptionLanguageChanged', this.isCaptionLanguageChanged.bind(this));
29587
+ captionsFeature.on('SpokenLanguageChanged', this.isSpokenLanguageChanged.bind(this));
29410
29588
  }
29411
29589
  }
29412
29590
  /* @conditional-compile-remove(close-captions) */
@@ -29416,11 +29594,13 @@ class AzureCommunicationCallAdapter {
29416
29594
  const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(communicationCalling.Features.Captions).captions;
29417
29595
  captionsFeature.off('CaptionsReceived', this.captionsReceived.bind(this));
29418
29596
  captionsFeature.off('CaptionsActiveChanged', this.isCaptionsActiveChanged.bind(this));
29597
+ captionsFeature.off('CaptionLanguageChanged', this.isCaptionLanguageChanged.bind(this));
29598
+ captionsFeature.off('SpokenLanguageChanged', this.isSpokenLanguageChanged.bind(this));
29419
29599
  (_b = this.call) === null || _b === void 0 ? void 0 : _b.off('stateChanged', this.subscribeToCaptionEvents.bind(this));
29420
29600
  }
29421
29601
  }
29422
29602
  subscribeCallEvents() {
29423
- var _a, _b, _c, _d, _e, _f;
29603
+ var _a, _b, _c, _d, _e, _f, _g;
29424
29604
  (_a = this.call) === null || _a === void 0 ? void 0 : _a.on('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));
29425
29605
  (_b = this.call) === null || _b === void 0 ? void 0 : _b.on('isMutedChanged', this.isMyMutedChanged.bind(this));
29426
29606
  (_c = this.call) === null || _c === void 0 ? void 0 : _c.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));
@@ -29429,6 +29609,8 @@ class AzureCommunicationCallAdapter {
29429
29609
  (_e = this.call) === null || _e === void 0 ? void 0 : _e.on('stateChanged', this.subscribeToCaptionEvents.bind(this));
29430
29610
  /* @conditional-compile-remove(call-transfer) */
29431
29611
  (_f = this.call) === null || _f === void 0 ? void 0 : _f.feature(communicationCalling.Features.Transfer).on('transferRequested', this.transferRequested.bind(this));
29612
+ /* @conditional-compile-remove(capabilities) */
29613
+ (_g = this.call) === null || _g === void 0 ? void 0 : _g.feature(communicationCalling.Features.Capabilities).on('capabilitiesChanged', this.capabilitiesChanged.bind(this));
29432
29614
  }
29433
29615
  unsubscribeCallEvents() {
29434
29616
  var _a, _b, _c, _d;
@@ -29475,6 +29657,22 @@ class AzureCommunicationCallAdapter {
29475
29657
  isActive: captionsFeature.isCaptionsFeatureActive
29476
29658
  });
29477
29659
  }
29660
+ /* @conditional-compile-remove(close-captions) */
29661
+ isSpokenLanguageChanged() {
29662
+ var _a;
29663
+ const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(communicationCalling.Features.Captions).captions;
29664
+ this.emitter.emit('isSpokenLanguageChanged', {
29665
+ activeSpokenLanguage: captionsFeature.activeSpokenLanguage
29666
+ });
29667
+ }
29668
+ /* @conditional-compile-remove(close-captions) */
29669
+ isCaptionLanguageChanged() {
29670
+ var _a;
29671
+ const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(communicationCalling.Features.Captions).captions;
29672
+ this.emitter.emit('isCaptionLanguageChanged', {
29673
+ activeCaptionLanguage: captionsFeature.activeCaptionLanguage
29674
+ });
29675
+ }
29478
29676
  /* @conditional-compile-remove(call-transfer) */
29479
29677
  transferRequested(args) {
29480
29678
  const newArgs = Object.assign(Object.assign({}, args), { accept: (options) => {
@@ -29491,6 +29689,20 @@ class AzureCommunicationCallAdapter {
29491
29689
  } });
29492
29690
  this.emitter.emit('transferRequested', newArgs);
29493
29691
  }
29692
+ /* @conditional-compile-remove(capabilities) */
29693
+ capabilitiesChanged(data) {
29694
+ var _a, _b, _c;
29695
+ if (((_a = data.newValue.turnVideoOn) === null || _a === void 0 ? void 0 : _a.isPresent) === false) {
29696
+ this.stopCamera();
29697
+ }
29698
+ if (((_b = data.newValue.unmuteMic) === null || _b === void 0 ? void 0 : _b.isPresent) === false) {
29699
+ this.mute();
29700
+ }
29701
+ if (((_c = data.newValue.shareScreen) === null || _c === void 0 ? void 0 : _c.isPresent) === false) {
29702
+ this.stopScreenShare();
29703
+ }
29704
+ this.emitter.emit('capabilitiesChanged', data);
29705
+ }
29494
29706
  callIdChanged() {
29495
29707
  var _a;
29496
29708
  ((_a = this.call) === null || _a === void 0 ? void 0 : _a.id) && this.emitter.emit('callIdChanged', { callId: this.call.id });
@@ -31109,6 +31321,14 @@ class AzureCommunicationCallWithChatAdapter {
31109
31321
  case 'isCaptionsActiveChanged':
31110
31322
  this.callAdapter.on('isCaptionsActiveChanged', listener);
31111
31323
  break;
31324
+ /* @conditional-compile-remove(close-captions) */
31325
+ case 'isCaptionLanguageChanged':
31326
+ this.callAdapter.on('isCaptionLanguageChanged', listener);
31327
+ break;
31328
+ /* @conditional-compile-remove(close-captions) */
31329
+ case 'isSpokenLanguageChanged':
31330
+ this.callAdapter.on('isSpokenLanguageChanged', listener);
31331
+ break;
31112
31332
  case 'messageReceived':
31113
31333
  this.chatAdapter.on('messageReceived', listener);
31114
31334
  break;
@@ -31175,6 +31395,14 @@ class AzureCommunicationCallWithChatAdapter {
31175
31395
  case 'isCaptionsActiveChanged':
31176
31396
  this.callAdapter.off('isCaptionsActiveChanged', listener);
31177
31397
  break;
31398
+ /* @conditional-compile-remove(close-captions) */
31399
+ case 'isCaptionLanguageChanged':
31400
+ this.callAdapter.off('isCaptionLanguageChanged', listener);
31401
+ break;
31402
+ /* @conditional-compile-remove(close-captions) */
31403
+ case 'isSpokenLanguageChanged':
31404
+ this.callAdapter.off('isSpokenLanguageChanged', listener);
31405
+ break;
31178
31406
  case 'messageReceived':
31179
31407
  this.chatAdapter.off('messageReceived', listener);
31180
31408
  break;