@azure/communication-react 1.11.1-alpha-202312280012 → 1.11.1-alpha-202401030012

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.
@@ -170,7 +170,7 @@ function getDefaultExportFromCjs (x) {
170
170
  // Copyright (c) Microsoft Corporation.
171
171
  // Licensed under the MIT License.
172
172
  // GENERATED FILE. DO NOT EDIT MANUALLY.
173
- var telemetryVersion = '1.11.1-alpha-202312280012';
173
+ var telemetryVersion = '1.11.1-alpha-202401030012';
174
174
 
175
175
 
176
176
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -13282,10 +13282,18 @@ const loadingStyle = react.mergeStyles({
13282
13282
  * https://reactjs.org/docs/react-api.html#reactmemo
13283
13283
  */
13284
13284
  const RemoteScreenShare = React.memo((props) => {
13285
- const { userId, displayName, isMuted, renderElement, onCreateRemoteStreamView, onDisposeRemoteStreamView, isReceiving } = props;
13285
+ const { userId, displayName, isMuted, renderElement, onCreateRemoteStreamView, onDisposeRemoteStreamView, isReceiving, participantVideoScalingMode } = props;
13286
13286
  const locale = useLocale$1();
13287
13287
  if (!renderElement) {
13288
- onCreateRemoteStreamView && onCreateRemoteStreamView(userId);
13288
+ /**
13289
+ * TODO: We need to pass in the scaling mode of the screen share participant to this function because when we
13290
+ * call this it will recreate both streams (video and screen share) and we need to make sure that the scaling
13291
+ * mode is the same as before we started the screen share.
13292
+ *
13293
+ * We should deprecate the current function and replace it with a
13294
+ * createRemoteScreenShareStreamView and createRemoteVideoStreamView.
13295
+ */
13296
+ onCreateRemoteStreamView && onCreateRemoteStreamView(userId, participantVideoScalingMode);
13289
13297
  }
13290
13298
  React.useEffect(() => {
13291
13299
  return () => {
@@ -15878,7 +15886,7 @@ const VideoGallery = (props) => {
15878
15886
  }
15879
15887
  : remoteVideoViewOptions;
15880
15888
  };
15881
- return (React.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 && createViewOptions() ? createViewOptions() : undefined, onRenderAvatar: onRenderAvatar, showMuteIndicator: showMuteIndicator, strings: strings,
15889
+ return (React.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: createViewOptions(), onRenderAvatar: onRenderAvatar, showMuteIndicator: showMuteIndicator, strings: strings,
15882
15890
  /* @conditional-compile-remove(PSTN-calls) */
15883
15891
  participantState: participant.state,
15884
15892
  /* @conditional-compile-remove(pinned-participants) */
@@ -15922,7 +15930,7 @@ const VideoGallery = (props) => {
15922
15930
  ]);
15923
15931
  const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
15924
15932
  const localScreenShareStreamComponent = React.createElement(LocalScreenShare, { localParticipant: localParticipant });
15925
- 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 })));
15933
+ 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] })));
15926
15934
  const screenShareComponent = remoteScreenShareComponent
15927
15935
  ? remoteScreenShareComponent
15928
15936
  : localParticipant.isScreenSharingOn