@azure/communication-react 1.14.0-alpha-202403120012 → 1.14.0-alpha-202403130012

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 (40) hide show
  1. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DdhoRD21.js → RichTextSendBoxWrapper-Be7pr6o4.js} +2 -2
  2. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DdhoRD21.js.map → RichTextSendBoxWrapper-Be7pr6o4.js.map} +1 -1
  3. package/dist/dist-cjs/communication-react/{index-C48Yhr_k.js → index-C3IKJHX1.js} +58 -46
  4. package/dist/dist-cjs/communication-react/index-C3IKJHX1.js.map +1 -0
  5. package/dist/dist-cjs/communication-react/index.js +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  8. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +5 -0
  9. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  10. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +1 -1
  11. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  12. package/dist/dist-esm/calling-stateful-client/src/PPTLiveSubscriber.d.ts +3 -2
  13. package/dist/dist-esm/calling-stateful-client/src/PPTLiveSubscriber.js +9 -2
  14. package/dist/dist-esm/calling-stateful-client/src/PPTLiveSubscriber.js.map +1 -1
  15. package/dist/dist-esm/chat-stateful-client/src/ChatContext.d.ts +1 -1
  16. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +4 -3
  17. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
  18. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.d.ts +13 -3
  19. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +17 -18
  20. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +1 -1
  21. package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js +2 -1
  22. package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/InputBoxButton.d.ts +1 -0
  24. package/dist/dist-esm/react-components/src/components/InputBoxButton.js +2 -2
  25. package/dist/dist-esm/react-components/src/components/InputBoxButton.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +3 -3
  27. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
  28. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +1 -1
  29. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
  30. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +1 -1
  31. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +1 -0
  33. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +7 -1
  34. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
  35. package/dist/dist-esm/react-components/src/components/VideoGallery.js +4 -2
  36. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +1 -12
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  39. package/package.json +1 -1
  40. package/dist/dist-cjs/communication-react/index-C48Yhr_k.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var index = require('./index-C48Yhr_k.js');
4
+ var index = require('./index-C3IKJHX1.js');
5
5
  require('@fluentui/react');
6
6
  require('@fluentui/react-file-type-icons');
7
7
  require('@azure/communication-common');
@@ -48,4 +48,4 @@ const RichTextSendBoxWrapper = () => {
48
48
  };
49
49
 
50
50
  exports.RichTextSendBoxWrapper = RichTextSendBoxWrapper;
51
- //# sourceMappingURL=RichTextSendBoxWrapper-DdhoRD21.js.map
51
+ //# sourceMappingURL=RichTextSendBoxWrapper-Be7pr6o4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextSendBoxWrapper-DdhoRD21.js","sources":["../../../../react-composites/src/composites/common/RichTextSendBoxWrapper.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor) */\nimport React from 'react';\n/* @conditional-compile-remove(rich-text-editor) */\nimport { usePropsFor } from '../ChatComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(rich-text-editor) */\nimport { RichTextSendBox } from '@internal/react-components';\n\n/* @conditional-compile-remove(rich-text-editor) */\n/**\n * @private\n *\n * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox\n * before lazyLoading is done\n */\nexport const RichTextSendBoxWrapper = (): JSX.Element => {\n const richTextSendBoxProps = usePropsFor(RichTextSendBox);\n\n return <RichTextSendBox {...richTextSendBoxProps} />;\n};\n"],"names":["usePropsFor","RichTextSendBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AAOA;AACA;;;;;AAKG;AACI,MAAM,sBAAsB,GAAG,MAAkB;AACtD,IAAA,MAAM,oBAAoB,GAAGA,iBAAW,CAACC,qBAAe,CAAC,CAAC;AAE1D,IAAA,OAAO,KAAC,CAAA,aAAA,CAAAA,qBAAe,EAAK,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,oBAAoB,EAAI,CAAC;AACvD;;;;"}
1
+ {"version":3,"file":"RichTextSendBoxWrapper-Be7pr6o4.js","sources":["../../../../react-composites/src/composites/common/RichTextSendBoxWrapper.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor) */\nimport React from 'react';\n/* @conditional-compile-remove(rich-text-editor) */\nimport { usePropsFor } from '../ChatComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(rich-text-editor) */\nimport { RichTextSendBox } from '@internal/react-components';\n\n/* @conditional-compile-remove(rich-text-editor) */\n/**\n * @private\n *\n * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox\n * before lazyLoading is done\n */\nexport const RichTextSendBoxWrapper = (): JSX.Element => {\n const richTextSendBoxProps = usePropsFor(RichTextSendBox);\n\n return <RichTextSendBox {...richTextSendBoxProps} />;\n};\n"],"names":["usePropsFor","RichTextSendBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AAOA;AACA;;;;;AAKG;AACI,MAAM,sBAAsB,GAAG,MAAkB;AACtD,IAAA,MAAM,oBAAoB,GAAGA,iBAAW,CAACC,qBAAe,CAAC,CAAC;AAE1D,IAAA,OAAO,KAAC,CAAA,aAAA,CAAAA,qBAAe,EAAK,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,oBAAoB,EAAI,CAAC;AACvD;;;;"}
@@ -173,7 +173,7 @@ function getDefaultExportFromCjs (x) {
173
173
  // Copyright (c) Microsoft Corporation.
174
174
  // Licensed under the MIT License.
175
175
  // GENERATED FILE. DO NOT EDIT MANUALLY.
176
- var telemetryVersion = '1.14.0-alpha-202403120012';
176
+ var telemetryVersion = '1.14.0-alpha-202403130012';
177
177
 
178
178
 
179
179
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -2111,6 +2111,11 @@ let CallContext$2 = class CallContext {
2111
2111
  addRemoteParticipant.forEach((participant) => {
2112
2112
  call.remoteParticipants[toFlatCommunicationIdentifier(participant.identifier)] = participant;
2113
2113
  });
2114
+ // TODO: need to remove after contentSharingRole avaible in WebCalling SDK.
2115
+ /* @conditional-compile-remove(ppt-live) */
2116
+ if (!call.contentSharingRemoteParticipant) {
2117
+ call.contentSharingRemoteParticipant = toFlatCommunicationIdentifier(addRemoteParticipant[0].identifier);
2118
+ }
2114
2119
  }
2115
2120
  });
2116
2121
  }
@@ -3723,7 +3728,7 @@ var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments,
3723
3728
  * @private
3724
3729
  */
3725
3730
  class PPTLiveSubscriber {
3726
- constructor(callIdRef, context, pptLive) {
3731
+ constructor(callIdRef, context, call) {
3727
3732
  this.subscribe = () => {
3728
3733
  this._pptLive.on('isActiveChanged', this.isAvailableChanged);
3729
3734
  };
@@ -3736,6 +3741,10 @@ class PPTLiveSubscriber {
3736
3741
  };
3737
3742
  this.checkAndUpdatePPTLiveParticipant = () => __awaiter$K(this, void 0, void 0, function* () {
3738
3743
  if (this._pptLive.isActive) {
3744
+ // TODO: need to refactor if Web Calling SDK has this logic ready
3745
+ if (this._call.isScreenSharingOn) {
3746
+ yield this._call.stopScreenSharing();
3747
+ }
3739
3748
  this._context.setCallParticipantPPTLive(this._callIdRef.callId, this._pptLive.target);
3740
3749
  }
3741
3750
  else {
@@ -3744,7 +3753,8 @@ class PPTLiveSubscriber {
3744
3753
  });
3745
3754
  this._callIdRef = callIdRef;
3746
3755
  this._context = context;
3747
- this._pptLive = pptLive;
3756
+ this._pptLive = call.feature(communicationCalling.Features.PPTLive);
3757
+ this._call = call;
3748
3758
  this.subscribe();
3749
3759
  }
3750
3760
  }
@@ -4152,7 +4162,7 @@ class CallSubscriber {
4152
4162
  this._participantSubscribers = new Map();
4153
4163
  this._recordingSubscriber = new RecordingSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Recording));
4154
4164
  /* @conditional-compile-remove(ppt-live) */
4155
- this._pptLiveSubscriber = new PPTLiveSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.PPTLive));
4165
+ this._pptLiveSubscriber = new PPTLiveSubscriber(this._callIdRef, this._context, this._call);
4156
4166
  this._transcriptionSubscriber = new TranscriptionSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Transcription));
4157
4167
  /* @conditional-compile-remove(raise-hand) */
4158
4168
  this._raiseHandSubscriber = new RaiseHandSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.RaiseHand));
@@ -8526,7 +8536,7 @@ const iconWrapperStyle$1 = react.mergeStyles({
8526
8536
  * @private
8527
8537
  */
8528
8538
  const InputBoxButton = (props) => {
8529
- const { onRenderIcon, onClick, ariaLabel, className, id, tooltipContent } = props;
8539
+ const { onRenderIcon, onClick, ariaLabel, className, id, tooltipContent, 'data-testId': dataTestId } = props;
8530
8540
  const [isHover, setIsHover] = React.useState(false);
8531
8541
  const mergedButtonStyle = react.mergeStyles(inputBoxButtonStyle, className);
8532
8542
  const theme = react.useTheme();
@@ -8544,7 +8554,7 @@ const InputBoxButton = (props) => {
8544
8554
  setIsHover(false);
8545
8555
  },
8546
8556
  // VoiceOver fix: Avoid icon from stealing focus when IconButton is double-tapped to send message by wrapping with Stack with pointerEvents style to none
8547
- onRenderIcon: () => React.createElement(react.Stack, { className: iconWrapperStyle$1 }, onRenderIcon(isHover)) })));
8557
+ onRenderIcon: () => React.createElement(react.Stack, { className: iconWrapperStyle$1 }, onRenderIcon(isHover)), "data-testid": dataTestId })));
8548
8558
  };
8549
8559
 
8550
8560
  // Copyright (c) Microsoft Corporation.
@@ -8575,7 +8585,7 @@ const SendBoxErrorBar = (props) => {
8575
8585
  if (errorMessage) {
8576
8586
  return (React.createElement(React.Fragment, null,
8577
8587
  React.createElement(Announcer$1, { announcementString: errorMessage, ariaLive: 'polite' }),
8578
- React.createElement(react.MessageBar, { "data-test-id": 'send-box-message-bar', messageBarType: react.MessageBarType.warning, styles: {
8588
+ React.createElement(react.MessageBar, { "data-testid": 'send-box-message-bar', messageBarType: react.MessageBarType.warning, styles: {
8579
8589
  iconContainer: {
8580
8590
  display: 'none'
8581
8591
  }
@@ -9459,16 +9469,16 @@ const RichTextEditor = React.forwardRef((props, ref) => {
9459
9469
  isBeakVisible: false,
9460
9470
  styles: ribbonOverflowButtonStyle(theme)
9461
9471
  }
9462
- }, strings: ribbonButtonsStrings(strings) }));
9472
+ }, strings: ribbonButtonsStrings(strings), "data-testid": 'rich-text-editor-ribbon' }));
9463
9473
  }, [strings, ribbonPlugin, theme]);
9464
- return (React.createElement("div", null,
9474
+ return (React.createElement("div", { "data-testid": 'rich-text-editor-wrapper' },
9465
9475
  showRichTextEditorFormatting && ribbon,
9466
9476
  React.createElement("div", { className: richTextEditorWrapperStyle(theme, !showRichTextEditorFormatting, showRichTextEditorFormatting) },
9467
9477
  React.createElement(roosterjsReact.Rooster, { initialContent: initialContent, inDarkMode: isDarkThemed(theme), plugins: plugins, className: richTextEditorStyle(props.styles), editorCreator: editorCreator,
9468
9478
  // TODO: confirm the color during inline images implementation
9469
9479
  imageSelectionBorderColor: 'blue',
9470
9480
  // doNotAdjustEditorColor is used to fix the default background color for Rooster component
9471
- doNotAdjustEditorColor: true,
9481
+ doNotAdjustEditorColor: true, "data-testid": 'rooster-rich-text-editor',
9472
9482
  // if we don't use 'allowKeyboardEventPropagation' only the enter key is caught
9473
9483
  onKeyDown: props.onKeyDown }))));
9474
9484
  });
@@ -9519,7 +9529,7 @@ const RichTextInputBoxComponent = (props) => {
9519
9529
  setShowRichTextEditorFormatting(!showRichTextEditorFormatting);
9520
9530
  (_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.focus();
9521
9531
  e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.
9522
- }, ariaLabel: strings.richTextFormatButtonTooltip, tooltipContent: strings.richTextFormatButtonTooltip, className: richTextActionButtonsStyle }),
9532
+ }, ariaLabel: strings.richTextFormatButtonTooltip, tooltipContent: strings.richTextFormatButtonTooltip, className: richTextActionButtonsStyle, "data-testId": 'rich-text-input-box-format-button' }),
9523
9533
  React.createElement(react.Icon, { iconName: "RichTextDividerIcon", className: richTextActionButtonsDividerStyle(theme) }),
9524
9534
  actionComponents)));
9525
9535
  }, [
@@ -14710,7 +14720,9 @@ const loadingStyle = react.mergeStyles({
14710
14720
  * https://reactjs.org/docs/react-api.html#reactmemo
14711
14721
  */
14712
14722
  const RemoteScreenShare = React.memo((props) => {
14713
- const { userId, displayName, isMuted, renderElement, onCreateRemoteStreamView, onDisposeRemoteStreamView, isReceiving, participantVideoScalingMode } = props;
14723
+ const { userId, displayName, isMuted, renderElement, onCreateRemoteStreamView, onDisposeRemoteStreamView, isReceiving, participantVideoScalingMode,
14724
+ /* @conditional-compile-remove(ppt-live) */
14725
+ isPPTLive } = props;
14714
14726
  const locale = useLocale$1();
14715
14727
  if (!renderElement) {
14716
14728
  /**
@@ -14734,6 +14746,10 @@ const RemoteScreenShare = React.memo((props) => {
14734
14746
  participant: displayName
14735
14747
  })
14736
14748
  : '';
14749
+ /* @conditional-compile-remove(ppt-live) */
14750
+ if (isPPTLive) {
14751
+ return (React.createElement(VideoTile, { renderElement: renderElement ? (React.createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' })) : undefined, onRenderPlaceholder: () => React.createElement(LoadingSpinner, { loadingMessage: loadingMessage }) }));
14752
+ }
14737
14753
  return (React.createElement(VideoTile, { displayName: displayName, isMuted: isMuted, renderElement: renderElement ? (React.createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' })) : undefined, onRenderPlaceholder: () => React.createElement(LoadingSpinner, { loadingMessage: loadingMessage }) }));
14738
14754
  });
14739
14755
  const LoadingSpinner = (props) => {
@@ -17063,7 +17079,7 @@ const MAX_PINNED_REMOTE_VIDEO_TILES = 4;
17063
17079
  * @public
17064
17080
  */
17065
17081
  const VideoGallery = (props) => {
17066
- var _a, _b, _c;
17082
+ var _a, _b, _c, _d;
17067
17083
  const { localParticipant, remoteParticipants = [], localVideoViewOptions, remoteVideoViewOptions, dominantSpeakers, onRenderLocalVideoTile, onRenderRemoteVideoTile, onCreateLocalStreamView, onDisposeLocalStreamView, onCreateRemoteStreamView, onDisposeRemoteScreenShareStreamView, onDisposeRemoteVideoStreamView, styles, layout, onRenderAvatar, showMuteIndicator, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, onPinParticipant: onPinParticipantHandler, onUnpinParticipant: onUnpinParticipantHandler, remoteVideoTileMenu = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS,
17068
17084
  /* @conditional-compile-remove(vertical-gallery) */
17069
17085
  overflowGalleryPosition = 'horizontalBottom',
@@ -17291,7 +17307,9 @@ const VideoGallery = (props) => {
17291
17307
  ]);
17292
17308
  const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
17293
17309
  const localScreenShareStreamComponent = React.createElement(LocalScreenShare, { localParticipant: localParticipant });
17294
- const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteScreenShareStreamView, isReceiving: (_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.isReceiving, participantVideoScalingMode: selectedScalingModeState[screenShareParticipant.userId] })));
17310
+ const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteScreenShareStreamView, isReceiving: (_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.isReceiving, participantVideoScalingMode: selectedScalingModeState[screenShareParticipant.userId],
17311
+ /* @conditional-compile-remove(ppt-live) */
17312
+ isPPTLive: !((_d = screenShareParticipant.screenShareStream) === null || _d === void 0 ? void 0 : _d.id) })));
17295
17313
  const screenShareComponent = remoteScreenShareComponent
17296
17314
  ? remoteScreenShareComponent
17297
17315
  : localParticipant.isScreenSharingOn
@@ -22591,12 +22609,13 @@ var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments,
22591
22609
  * @private
22592
22610
  */
22593
22611
  class ResourceDownloadQueue {
22594
- constructor(context, credential) {
22612
+ constructor(context, authentication) {
22595
22613
  this._messagesNeedingResourceRetrieval = [];
22596
22614
  this.isActive = false;
22597
22615
  this._requestsToCancel = {};
22598
22616
  this._context = context;
22599
- this._credential = credential;
22617
+ this._credential = authentication.credential;
22618
+ this._endpoint = authentication.endpoint;
22600
22619
  }
22601
22620
  containsMessageWithSameAttachments(message) {
22602
22621
  var _a, _b, _c;
@@ -22700,7 +22719,7 @@ class ResourceDownloadQueue {
22700
22719
  downloadResource(operation, url, abortController) {
22701
22720
  return __awaiter$t(this, void 0, void 0, function* () {
22702
22721
  this._requestsToCancel[url] = { src: url, abortController };
22703
- const blobUrl = yield operation(url, this._credential, { abortController });
22722
+ const blobUrl = yield operation(url, { credential: this._credential, endpoint: this._endpoint }, { abortController });
22704
22723
  delete this._requestsToCancel[url];
22705
22724
  return blobUrl;
22706
22725
  });
@@ -22710,21 +22729,16 @@ class ResourceDownloadQueue {
22710
22729
  /**
22711
22730
  * @private
22712
22731
  */
22713
- const fetchImageSource = (src, credential, options) => __awaiter$t(void 0, void 0, void 0, function* () {
22732
+ const fetchImageSource = (src, authentication, options) => __awaiter$t(void 0, void 0, void 0, function* () {
22714
22733
  function fetchWithAuthentication(url, token, options) {
22715
22734
  return __awaiter$t(this, void 0, void 0, function* () {
22716
22735
  const headers = new Headers();
22717
22736
  headers.append('Authorization', `Bearer ${token}`);
22718
- try {
22719
- return yield fetchWithTimeout(url, {
22720
- timeout: options.timeout,
22721
- headers,
22722
- abortController: options.abortController
22723
- });
22724
- }
22725
- catch (err) {
22726
- throw new ChatError('ChatThreadClient.getMessage', err);
22727
- }
22737
+ return yield fetchWithTimeout(url, {
22738
+ timeout: options.timeout,
22739
+ headers,
22740
+ abortController: options.abortController
22741
+ });
22728
22742
  });
22729
22743
  }
22730
22744
  function fetchWithTimeout(resource, options) {
@@ -22739,8 +22753,13 @@ const fetchImageSource = (src, credential, options) => __awaiter$t(void 0, void
22739
22753
  return response;
22740
22754
  });
22741
22755
  }
22742
- const accessToken = yield credential.getToken();
22743
- const response = yield fetchWithAuthentication(src, accessToken.token, options);
22756
+ const fetchUrl = new URL(src);
22757
+ const endpoint = new URL(authentication.endpoint);
22758
+ let token = '';
22759
+ if (fetchUrl.hostname === endpoint.hostname && fetchUrl.protocol === 'https:') {
22760
+ token = (yield authentication.credential.getToken()).token;
22761
+ }
22762
+ const response = yield fetchWithAuthentication(src, token, options);
22744
22763
  const blob = yield response.blob();
22745
22764
  return URL.createObjectURL(blob);
22746
22765
  });
@@ -22764,7 +22783,8 @@ immer.enablePatches();
22764
22783
  */
22765
22784
  let ChatContext$1 = class ChatContext {
22766
22785
  constructor(maxListeners,
22767
- /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ credential) {
22786
+ /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ credential,
22787
+ /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ endpoint) {
22768
22788
  this._state = {
22769
22789
  userId: { id: '' },
22770
22790
  displayName: '',
@@ -22781,8 +22801,8 @@ let ChatContext$1 = class ChatContext {
22781
22801
  this._emitter = new EventEmitter();
22782
22802
  /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
22783
22803
  if (credential) {
22784
- this._inlineImageQueue = new ResourceDownloadQueue(this, credential);
22785
- this._fullsizeImageQueue = new ResourceDownloadQueue(this, credential);
22804
+ this._inlineImageQueue = new ResourceDownloadQueue(this, { credential, endpoint: endpoint !== null && endpoint !== void 0 ? endpoint : '' });
22805
+ this._fullsizeImageQueue = new ResourceDownloadQueue(this, { credential, endpoint: endpoint !== null && endpoint !== void 0 ? endpoint : '' });
22786
22806
  }
22787
22807
  if (maxListeners) {
22788
22808
  this._emitter.setMaxListeners(maxListeners);
@@ -23794,7 +23814,8 @@ const _createStatefulChatClientInner = (args, options, telemetryImplementationHi
23794
23814
  */
23795
23815
  const _createStatefulChatClientWithDeps = (chatClient, args, options) => {
23796
23816
  const context = new ChatContext$1(options === null || options === void 0 ? void 0 : options.maxStateChangeListeners,
23797
- /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ args.credential);
23817
+ /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ args.credential,
23818
+ /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ args.endpoint);
23798
23819
  let eventSubscriber;
23799
23820
  context.updateChatConfig(communicationCommon.getIdentifierKind(args.userId), args.displayName);
23800
23821
  const proxy = new Proxy(chatClient, proxyChatClient);
@@ -25452,7 +25473,7 @@ const useSelector$2 = (selector, selectorProps) => {
25452
25473
  // Copyright (c) Microsoft Corporation.
25453
25474
  // Licensed under the MIT License.
25454
25475
  /* @conditional-compile-remove(rich-text-editor) */
25455
- const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DdhoRD21.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
25476
+ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-Be7pr6o4.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
25456
25477
  /**
25457
25478
  * @private
25458
25479
  */
@@ -27092,7 +27113,6 @@ const Microphone = (props) => {
27092
27113
  const microphoneButtonProps = usePropsFor$1(MicrophoneButton);
27093
27114
  const callStatus = useSelector$1(getCallStatus);
27094
27115
  const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
27095
- const strings = useLocale().strings.call;
27096
27116
  /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */
27097
27117
  const adapter = useAdapter();
27098
27118
  /* @conditional-compile-remove(rooms) */
@@ -27108,17 +27128,9 @@ const Microphone = (props) => {
27108
27128
  // page until the user successfully joins the call.
27109
27129
  microphoneButtonProps.checked = isLocalMicrophoneEnabled;
27110
27130
  }
27111
- const microphoneButtonStrings = _isInLobbyOrConnecting(callStatus)
27112
- ? {
27113
- strings: {
27114
- tooltipOffContent: strings.microphoneToggleInLobbyNotAllowed,
27115
- tooltipOnContent: strings.microphoneToggleInLobbyNotAllowed
27116
- }
27117
- }
27118
- : {};
27119
27131
  const styles = React.useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
27120
27132
  // tab focus on MicrophoneButton on page load
27121
- return (React.createElement(MicrophoneButton, Object.assign({ "data-ui-id": "call-composite-microphone-button" }, microphoneButtonProps, { showLabel: props.displayType !== 'compact', disableTooltip: props.disableTooltip, styles: styles }, microphoneButtonStrings, { enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: microphoneButtonProps.disabled ||
27133
+ return (React.createElement(MicrophoneButton, Object.assign({ "data-ui-id": "call-composite-microphone-button" }, microphoneButtonProps, { showLabel: props.displayType !== 'compact', disableTooltip: props.disableTooltip, styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: microphoneButtonProps.disabled ||
27122
27134
  props.disabled ||
27123
27135
  /* @conditional-compile-remove(rooms) */ (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'),
27124
27136
  /* @conditional-compile-remove(capabilities) */
@@ -38037,4 +38049,4 @@ exports.useTeamsCall = useTeamsCall;
38037
38049
  exports.useTeamsCallAdapter = useTeamsCallAdapter;
38038
38050
  exports.useTeamsCallAgent = useTeamsCallAgent;
38039
38051
  exports.useTheme = useTheme;
38040
- //# sourceMappingURL=index-C48Yhr_k.js.map
38052
+ //# sourceMappingURL=index-C3IKJHX1.js.map