@azure/communication-react 1.5.1-alpha-202306140013 → 1.5.1-alpha-202306150014

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 (38) hide show
  1. package/dist/communication-react.d.ts +67 -2
  2. package/dist/dist-cjs/communication-react/index.js +118 -16
  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/handlers/createCommonHandlers.d.ts +5 -0
  7. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +36 -0
  8. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  9. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +1 -1
  10. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +9 -1
  12. package/dist/dist-esm/react-components/src/components/VideoGallery.js +4 -4
  13. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  14. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +0 -3
  15. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  16. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +3 -0
  17. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +33 -1
  18. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  19. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +28 -1
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +7 -1
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +1 -1
  24. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  25. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +7 -8
  26. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  27. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.d.ts +4 -0
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js +4 -0
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +6 -0
  31. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +19 -0
  32. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +25 -0
  34. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +3 -0
  36. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +9 -0
  37. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  38. package/package.json +8 -8
@@ -733,12 +733,39 @@ export declare interface CallAdapterCallOperations {
733
733
  * @remarks
734
734
  * This method is implemented for composite
735
735
  *
736
+ * @deprecated Use {@link disposeRemoteVideoStreamView}, {@link disposeLocalVideoStreamView} and {@link disposeRemoteVideoStreamView} instead.
737
+ *
736
738
  * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view
737
739
  * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
738
740
  *
739
741
  * @public
740
742
  */
741
743
  disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;
744
+ /**
745
+ * Dispose the html view for a screen share stream
746
+ *
747
+ * @remarks
748
+ * this method is implemented for composite
749
+ *
750
+ * @param remoteUserId - Id of the participant to dispose the screen share stream view for.
751
+ *
752
+ * @public
753
+ */
754
+ disposeScreenShareStreamView(remoteUserId: string): Promise<void>;
755
+ /**
756
+ * Dispose the html view for a remote video stream
757
+ *
758
+ * @param remoteUserId - Id of the participant to dispose
759
+ *
760
+ * @public
761
+ */
762
+ disposeRemoteVideoStreamView(remoteUserId: string): Promise<void>;
763
+ /**
764
+ * Dispose the html view for a local video stream
765
+ *
766
+ * @public
767
+ */
768
+ disposeLocalVideoStreamView(): Promise<void>;
742
769
  /**
743
770
  * Holds the call.
744
771
  *
@@ -2338,6 +2365,31 @@ export declare interface CallWithChatAdapterManagement {
2338
2365
  * @public
2339
2366
  */
2340
2367
  disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;
2368
+ /**
2369
+ * Dispose the html view for a screen share stream
2370
+ *
2371
+ * @remarks
2372
+ * this method is implemented for composite
2373
+ *
2374
+ * @param remoteUserId - Id of the participant to dispose the screen share stream view for.
2375
+ *
2376
+ * @public
2377
+ */
2378
+ disposeScreenShareStreamView(remoteUserId: string): Promise<void>;
2379
+ /**
2380
+ * Dispose the html view for a remote video stream
2381
+ *
2382
+ * @param remoteUserId - Id of the participant to dispose
2383
+ *
2384
+ * @public
2385
+ */
2386
+ disposeRemoteVideoStreamView(remoteUserId: string): Promise<void>;
2387
+ /**
2388
+ * Dispose the html view for a local video stream
2389
+ *
2390
+ * @public
2391
+ */
2392
+ disposeLocalVideoStreamView(): Promise<void>;
2341
2393
  /**
2342
2394
  * Ask for permissions of devices.
2343
2395
  *
@@ -4091,8 +4143,13 @@ export declare interface CommonCallingHandlers {
4091
4143
  onAddParticipant(participant: PhoneNumberIdentifier, options: AddPhoneNumberOptions): Promise<void>;
4092
4144
  onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;
4093
4145
  onCreateRemoteStreamView: (userId: string, options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;
4146
+ /**
4147
+ * @deprecated use {@link onDisposeRemoteVideoStreamView} and {@link onDisposeRemoteScreenShareStreamView} instead.
4148
+ */
4094
4149
  onDisposeRemoteStreamView: (userId: string) => Promise<void>;
4095
4150
  onDisposeLocalStreamView: () => Promise<void>;
4151
+ onDisposeRemoteVideoStreamView: (userId: string) => Promise<void>;
4152
+ onDisposeRemoteScreenShareStreamView: (userId: string) => Promise<void>;
4096
4153
  onSendDtmfTone: (dtmfTone: DtmfTone_2) => Promise<void>;
4097
4154
  onRemoveParticipant(userId: string): Promise<void>;
4098
4155
  onRemoveParticipant(participant: CommunicationIdentifier): Promise<void>;
@@ -8587,7 +8644,7 @@ export declare interface TransferFeature {
8587
8644
  }
8588
8645
 
8589
8646
  /**
8590
- * Callback for {@link CallAdapterSubscribers} 'isCaptionsActiveChanged' event.
8647
+ * Callback for {@link CallAdapterSubscribers} 'transferRequested' event.
8591
8648
  *
8592
8649
  * @beta
8593
8650
  */
@@ -9216,8 +9273,16 @@ export declare interface VideoGalleryProps {
9216
9273
  onCreateRemoteStreamView?: (userId: string, options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;
9217
9274
  /** Callback to render a remote video tile */
9218
9275
  onRenderRemoteVideoTile?: (remoteParticipant: VideoGalleryRemoteParticipant) => JSX.Element;
9219
- /** Callback to dispose a remote video stream view */
9276
+ /**
9277
+ * @deprecated use {@link onDisposeRemoteVideoStreamView} and {@link onDisposeRemoteScreenShareStreamView} instead
9278
+ *
9279
+ * Callback to dispose a remote video stream view
9280
+ */
9220
9281
  onDisposeRemoteStreamView?: (userId: string) => Promise<void>;
9282
+ /** Callback to dispose a remote video stream view */
9283
+ onDisposeRemoteVideoStreamView?: (userId: string) => Promise<void>;
9284
+ /** Callback to dispose a remote screen share stream view */
9285
+ onDisposeRemoteScreenShareStreamView?: (userId: string) => Promise<void>;
9221
9286
  /** Callback to render a particpant avatar */
9222
9287
  onRenderAvatar?: OnRenderAvatarCallback;
9223
9288
  /**
@@ -167,7 +167,7 @@ const _toCommunicationIdentifier = (id) => {
167
167
  // Copyright (c) Microsoft Corporation.
168
168
  // Licensed under the MIT license.
169
169
  // GENERATED FILE. DO NOT EDIT MANUALLY.
170
- var telemetryVersion = '1.5.1-alpha-202306140013';
170
+ var telemetryVersion = '1.5.1-alpha-202306150014';
171
171
 
172
172
  // Copyright (c) Microsoft Corporation.
173
173
  /**
@@ -797,6 +797,40 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
797
797
  callClient.disposeView(call.id, participant.identifier, screenShareStream);
798
798
  }
799
799
  });
800
+ const onDisposeRemoteVideoStreamView = (userId) => __awaiter$I(void 0, void 0, void 0, function* () {
801
+ if (!call) {
802
+ return;
803
+ }
804
+ const callState = callClient.getState().calls[call.id];
805
+ if (!callState) {
806
+ throw new Error(`Call Not Found: ${call.id}`);
807
+ }
808
+ const participant = Object.values(callState.remoteParticipants).find((participant) => toFlatCommunicationIdentifier(participant.identifier) === userId);
809
+ if (!participant || !participant.videoStreams) {
810
+ return;
811
+ }
812
+ const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');
813
+ if (remoteVideoStream && remoteVideoStream.view) {
814
+ callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
815
+ }
816
+ });
817
+ const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$I(void 0, void 0, void 0, function* () {
818
+ if (!call) {
819
+ return;
820
+ }
821
+ const callState = callClient.getState().calls[call.id];
822
+ if (!callState) {
823
+ throw new Error(`Call Not Found: ${call.id}`);
824
+ }
825
+ const participant = Object.values(callState.remoteParticipants).find((participant) => toFlatCommunicationIdentifier(participant.identifier) === userId);
826
+ if (!participant || !participant.videoStreams) {
827
+ return;
828
+ }
829
+ const screenShareStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'ScreenSharing');
830
+ if (screenShareStream && screenShareStream.view) {
831
+ callClient.disposeView(call.id, participant.identifier, screenShareStream);
832
+ }
833
+ });
800
834
  const onDisposeLocalStreamView = () => __awaiter$I(void 0, void 0, void 0, function* () {
801
835
  // If the user is currently in a call, dispose of the local stream view attached to that call.
802
836
  const callState = call && callClient.getState().calls[call.id];
@@ -879,6 +913,8 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
879
913
  onStartLocalVideo,
880
914
  onDisposeRemoteStreamView,
881
915
  onDisposeLocalStreamView,
916
+ onDisposeRemoteScreenShareStreamView,
917
+ onDisposeRemoteVideoStreamView,
882
918
  /* @conditional-compile-remove(PSTN-calls) */
883
919
  onAddParticipant: notImplemented,
884
920
  onRemoveParticipant: notImplemented,
@@ -13524,7 +13560,7 @@ const MAX_PINNED_REMOTE_VIDEO_TILES = 4;
13524
13560
  */
13525
13561
  const VideoGallery = (props) => {
13526
13562
  var _a, _b, _c;
13527
- const { localParticipant, remoteParticipants = [], localVideoViewOptions, remoteVideoViewOptions, dominantSpeakers, onRenderLocalVideoTile, onRenderRemoteVideoTile, onCreateLocalStreamView, onDisposeLocalStreamView, onCreateRemoteStreamView, onDisposeRemoteStreamView, styles, layout, onRenderAvatar, showMuteIndicator, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps,
13563
+ 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,
13528
13564
  /* @conditional-compile-remove(pinned-participants) */
13529
13565
  onPinParticipant: onPinParticipantHandler,
13530
13566
  /* @conditional-compile-remove(pinned-participants) */
@@ -13642,7 +13678,7 @@ const VideoGallery = (props) => {
13642
13678
  const remoteVideoStream = participant.videoStream;
13643
13679
  /* @conditional-compile-remove(pinned-participants) */
13644
13680
  const isPinned = pinnedParticipants === null || pinnedParticipants === void 0 ? void 0 : pinnedParticipants.includes(participant.userId);
13645
- return (React__default['default'].createElement(_RemoteVideoTile, { key: participant.userId, userId: participant.userId, remoteParticipant: participant, onCreateRemoteStreamView: isVideoParticipant ? onCreateRemoteStreamView : undefined, onDisposeRemoteStreamView: isVideoParticipant ? onDisposeRemoteStreamView : undefined, isAvailable: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isAvailable : false, isReceiving: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isReceiving : false, renderElement: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.renderElement : undefined, remoteVideoViewOptions: isVideoParticipant ? remoteVideoViewOptions : undefined, onRenderAvatar: onRenderAvatar, showMuteIndicator: showMuteIndicator, strings: strings,
13681
+ return (React__default['default'].createElement(_RemoteVideoTile, { key: participant.userId, userId: participant.userId, remoteParticipant: participant, onCreateRemoteStreamView: isVideoParticipant ? onCreateRemoteStreamView : undefined, onDisposeRemoteStreamView: isVideoParticipant ? onDisposeRemoteVideoStreamView : undefined, isAvailable: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isAvailable : false, isReceiving: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isReceiving : false, renderElement: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.renderElement : undefined, remoteVideoViewOptions: isVideoParticipant ? remoteVideoViewOptions : undefined, onRenderAvatar: onRenderAvatar, showMuteIndicator: showMuteIndicator, strings: strings,
13646
13682
  /* @conditional-compile-remove(PSTN-calls) */
13647
13683
  participantState: participant.state,
13648
13684
  /* @conditional-compile-remove(pinned-participants) */
@@ -13665,7 +13701,7 @@ const VideoGallery = (props) => {
13665
13701
  toggleAnnouncerString: toggleAnnouncerString }));
13666
13702
  }, [
13667
13703
  onCreateRemoteStreamView,
13668
- onDisposeRemoteStreamView,
13704
+ onDisposeRemoteVideoStreamView,
13669
13705
  remoteVideoViewOptions,
13670
13706
  onRenderAvatar,
13671
13707
  showMuteIndicator,
@@ -13679,7 +13715,7 @@ const VideoGallery = (props) => {
13679
13715
  ]);
13680
13716
  const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
13681
13717
  const localScreenShareStreamComponent = React__default['default'].createElement(LocalScreenShare, { localParticipant: localParticipant });
13682
- const remoteScreenShareComponent = screenShareParticipant && (React__default['default'].createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteStreamView, isReceiving: (_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.isReceiving })));
13718
+ const remoteScreenShareComponent = screenShareParticipant && (React__default['default'].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 })));
13683
13719
  const screenShareComponent = remoteScreenShareComponent
13684
13720
  ? remoteScreenShareComponent
13685
13721
  : localParticipant.isScreenSharingOn
@@ -20986,11 +21022,17 @@ const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
20986
21022
  }
20987
21023
  }),
20988
21024
  onDisposeLocalStreamView: () => __awaiter$e(void 0, void 0, void 0, function* () {
20989
- return adapter.disposeStreamView();
21025
+ return adapter.disposeLocalVideoStreamView();
20990
21026
  }),
20991
21027
  onDisposeRemoteStreamView: (userId) => __awaiter$e(void 0, void 0, void 0, function* () {
20992
21028
  return adapter.disposeStreamView(userId);
20993
21029
  }),
21030
+ onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$e(void 0, void 0, void 0, function* () {
21031
+ return adapter.disposeScreenShareStreamView(userId);
21032
+ }),
21033
+ onDisposeRemoteVideoStreamView: (userId) => __awaiter$e(void 0, void 0, void 0, function* () {
21034
+ return adapter.disposeRemoteVideoStreamView(userId);
21035
+ }),
20994
21036
  /* @conditional-compile-remove(call-readiness) */
20995
21037
  askDevicePermission: (constrain) => __awaiter$e(void 0, void 0, void 0, function* () {
20996
21038
  return adapter.askDevicePermission(constrain);
@@ -24752,7 +24794,7 @@ const CallPage = (props) => {
24752
24794
  increaseFlyoutItemSize: mobileView
24753
24795
  },
24754
24796
  /* @conditional-compile-remove(one-to-n-calling) */
24755
- onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView, modalLayerHostId: drawerMenuHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (React__default['default'].createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onRenderAvatar: onRenderAvatar, onFetchAvatarPersonaData: onFetchAvatarPersonaData,
24797
+ onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (React__default['default'].createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onRenderAvatar: onRenderAvatar, onFetchAvatarPersonaData: onFetchAvatarPersonaData,
24756
24798
  /* @conditional-compile-remove(pinned-participants) */
24757
24799
  remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenu, drawerMenuHostId: drawerMenuHostId,
24758
24800
  /* @conditional-compile-remove(click-to-call) */
@@ -25922,6 +25964,10 @@ const outboundCallStringsTrampoline = (strings) => {
25922
25964
 
25923
25965
  // Copyright (c) Microsoft Corporation.
25924
25966
  // Licensed under the MIT license.
25967
+ /**
25968
+ * @private
25969
+ */
25970
+ const avatarStyles = { opacity: 0.4 };
25925
25971
  /**
25926
25972
  * @private
25927
25973
  */
@@ -25982,17 +26028,16 @@ const TransferPage = (props) => {
25982
26028
  const callControlOptions = props.mobileView
25983
26029
  ? reduceCallControlsForMobile((_a = props.options) === null || _a === void 0 ? void 0 : _a.callControls)
25984
26030
  : (_b = props.options) === null || _b === void 0 ? void 0 : _b.callControls;
26031
+ const transferor = React.useMemo(() => { var _a; return (remoteParticipants ? (_a = Object.values(remoteParticipants)) === null || _a === void 0 ? void 0 : _a[0] : undefined); }, [remoteParticipants]);
26032
+ /* @conditional-compile-remove(call-transfer) */
26033
+ const transferTarget = React.useMemo(() => { var _a; return ((transferCall === null || transferCall === void 0 ? void 0 : transferCall.remoteParticipants) ? (_a = Object.values(transferCall.remoteParticipants)) === null || _a === void 0 ? void 0 : _a[0] : undefined); }, [transferCall]);
25985
26034
  /* @conditional-compile-remove(call-transfer) */
25986
- // page subject is which should be participant shown in the transfer page depending on the transfer call state
25987
26035
  const pageSubject = React.useMemo(() => {
25988
- if (transferCall && ['Ringing', 'Connected'].includes(transferCall.state)) {
26036
+ if (transferCall && (transferTarget === null || transferTarget === void 0 ? void 0 : transferTarget.displayName)) {
25989
26037
  return 'transferTarget';
25990
26038
  }
25991
26039
  return 'transferor';
25992
- }, [transferCall]);
25993
- const transferor = React.useMemo(() => { var _a; return (remoteParticipants ? (_a = Object.values(remoteParticipants)) === null || _a === void 0 ? void 0 : _a[0] : undefined); }, [remoteParticipants]);
25994
- /* @conditional-compile-remove(call-transfer) */
25995
- const transferTarget = React.useMemo(() => { var _a; return ((transferCall === null || transferCall === void 0 ? void 0 : transferCall.remoteParticipants) ? (_a = Object.values(transferCall.remoteParticipants)) === null || _a === void 0 ? void 0 : _a[0] : undefined); }, [transferCall]);
26040
+ }, [transferCall, transferTarget === null || transferTarget === void 0 ? void 0 : transferTarget.displayName]);
25996
26041
  let transferTileParticipant = transferor;
25997
26042
  /* @conditional-compile-remove(call-transfer) */
25998
26043
  if (pageSubject === 'transferTarget') {
@@ -26040,7 +26085,7 @@ const TransferTile = (props) => {
26040
26085
  hidePersonaDetails: true
26041
26086
  }), [userId, initialsName, displayName, personaSize]);
26042
26087
  const defaultOnRenderAvatar = React.useCallback(() => {
26043
- return personaSize ? React__default['default'].createElement(AvatarPersona, Object.assign({}, placeholderOptions, { dataProvider: onFetchAvatarPersonaData })) : React__default['default'].createElement(React__default['default'].Fragment, null);
26088
+ return personaSize ? (React__default['default'].createElement(AvatarPersona, Object.assign({}, placeholderOptions, { dataProvider: onFetchAvatarPersonaData, className: react.mergeStyles(avatarStyles) }))) : (React__default['default'].createElement(React__default['default'].Fragment, null));
26044
26089
  }, [placeholderOptions, onFetchAvatarPersonaData, personaSize]);
26045
26090
  const defaultAvatar = React.useMemo(() => defaultOnRenderAvatar(), [defaultOnRenderAvatar]);
26046
26091
  return (React__default['default'].createElement("div", { ref: tileRef, className: react.mergeStyles(tileContainerStyles), "data-is-focusable": true },
@@ -26439,7 +26484,6 @@ const CallCompositeInner = (props) => {
26439
26484
  // Warning: this is fragile and works because the call arrangement page is only rendered after the call has connected and thus this
26440
26485
  // LayerHost will be guaranteed to have rendered (and subsequently mounted in the DOM). This ensures the DOM element will be available
26441
26486
  // before the call to `document.getElementById(modalLayerHostId)` is made.
26442
- /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) @conditional-compile-remove(call-readiness) */
26443
26487
  React__default['default'].createElement(react.LayerHost, { id: modalLayerHostId, className: react.mergeStyles(modalLayerHostStyle) })))));
26444
26488
  };
26445
26489
  const getQueryOptions = (options) => {
@@ -26874,6 +26918,9 @@ class AzureCommunicationCallAdapter {
26874
26918
  this.removeParticipant.bind(this);
26875
26919
  this.createStreamView.bind(this);
26876
26920
  this.disposeStreamView.bind(this);
26921
+ this.disposeScreenShareStreamView.bind(this);
26922
+ this.disposeRemoteVideoStreamView.bind(this);
26923
+ this.disposeLocalVideoStreamView.bind(this);
26877
26924
  this.on.bind(this);
26878
26925
  this.off.bind(this);
26879
26926
  this.processNewCall.bind(this);
@@ -27025,6 +27072,21 @@ class AzureCommunicationCallAdapter {
27025
27072
  }
27026
27073
  });
27027
27074
  }
27075
+ disposeScreenShareStreamView(remoteUserId) {
27076
+ return __awaiter$3(this, void 0, void 0, function* () {
27077
+ yield this.handlers.onDisposeRemoteScreenShareStreamView(remoteUserId);
27078
+ });
27079
+ }
27080
+ disposeRemoteVideoStreamView(remoteUserId) {
27081
+ return __awaiter$3(this, void 0, void 0, function* () {
27082
+ yield this.handlers.onDisposeRemoteVideoStreamView(remoteUserId);
27083
+ });
27084
+ }
27085
+ disposeLocalVideoStreamView() {
27086
+ return __awaiter$3(this, void 0, void 0, function* () {
27087
+ yield this.handlers.onDisposeLocalStreamView();
27088
+ });
27089
+ }
27028
27090
  leaveCall(forEveryone) {
27029
27091
  return __awaiter$3(this, void 0, void 0, function* () {
27030
27092
  yield this.handlers.onHangUp(forEveryone);
@@ -27360,7 +27422,19 @@ class AzureCommunicationCallAdapter {
27360
27422
  }
27361
27423
  /* @conditional-compile-remove(call-transfer) */
27362
27424
  transferRequested(args) {
27363
- this.emitter.emit('transferRequested', args);
27425
+ const newArgs = Object.assign(Object.assign({}, args), { accept: (options) => {
27426
+ var _a, _b, _c, _d, _e, _f;
27427
+ const videoSource = (_c = (_b = (_a = this.context.getState().call) === null || _a === void 0 ? void 0 : _a.localVideoStreams) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.source;
27428
+ args.accept({
27429
+ audioOptions: (_d = options === null || options === void 0 ? void 0 : options.audioOptions) !== null && _d !== void 0 ? _d : {
27430
+ muted: !!((_e = this.context.getState().call) === null || _e === void 0 ? void 0 : _e.isMuted)
27431
+ },
27432
+ videoOptions: (_f = options === null || options === void 0 ? void 0 : options.videoOptions) !== null && _f !== void 0 ? _f :
27433
+ /* maintain video state if options.videoOptions is not defined */
27434
+ (videoSource ? { localVideoStreams: [new communicationCalling.LocalVideoStream(videoSource)] } : undefined)
27435
+ });
27436
+ } });
27437
+ this.emitter.emit('transferRequested', newArgs);
27364
27438
  }
27365
27439
  callIdChanged() {
27366
27440
  var _a;
@@ -27810,6 +27884,15 @@ class CallWithChatBackedCallAdapter {
27810
27884
  });
27811
27885
  this.callWithChatAdapter = callWithChatAdapter;
27812
27886
  }
27887
+ disposeScreenShareStreamView(remoteUserId) {
27888
+ return this.callWithChatAdapter.disposeScreenShareStreamView(remoteUserId);
27889
+ }
27890
+ disposeRemoteVideoStreamView(remoteUserId) {
27891
+ return this.callWithChatAdapter.disposeRemoteVideoStreamView(remoteUserId);
27892
+ }
27893
+ disposeLocalVideoStreamView() {
27894
+ return this.callWithChatAdapter.disposeLocalVideoStreamView();
27895
+ }
27813
27896
  /* @conditional-compile-remove(PSTN-calls) */
27814
27897
  addParticipant(participant, options) {
27815
27898
  return __awaiter$2(this, void 0, void 0, function* () {
@@ -28537,6 +28620,7 @@ class AzureCommunicationCallWithChatAdapter {
28537
28620
  this.removeParticipant.bind(this);
28538
28621
  this.createStreamView.bind(this);
28539
28622
  this.disposeStreamView.bind(this);
28623
+ this.disposeScreenShareStreamView.bind(this);
28540
28624
  this.fetchInitialData.bind(this);
28541
28625
  this.sendMessage.bind(this);
28542
28626
  this.sendReadReceipt.bind(this);
@@ -28725,6 +28809,24 @@ class AzureCommunicationCallWithChatAdapter {
28725
28809
  yield this.callAdapter.disposeStreamView(remoteUserId, options);
28726
28810
  });
28727
28811
  }
28812
+ /** Dispose of a remote screen share */
28813
+ disposeScreenShareStreamView(remoteUserId) {
28814
+ return __awaiter(this, void 0, void 0, function* () {
28815
+ yield this.callAdapter.disposeScreenShareStreamView(remoteUserId);
28816
+ });
28817
+ }
28818
+ /** Dispose of a remote video stream */
28819
+ disposeRemoteVideoStreamView(remoteUserId) {
28820
+ return __awaiter(this, void 0, void 0, function* () {
28821
+ yield this.callAdapter.disposeRemoteVideoStreamView(remoteUserId);
28822
+ });
28823
+ }
28824
+ /** Dispose of the local video stream */
28825
+ disposeLocalVideoStreamView() {
28826
+ return __awaiter(this, void 0, void 0, function* () {
28827
+ yield this.callAdapter.disposeLocalVideoStreamView();
28828
+ });
28829
+ }
28728
28830
  /** Fetch initial Call and Chat data such as chat messages. */
28729
28831
  fetchInitialData() {
28730
28832
  return __awaiter(this, void 0, void 0, function* () {