@stream-io/video-react-sdk 1.14.1 → 1.14.3

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.
package/dist/index.cjs.js CHANGED
@@ -2656,13 +2656,15 @@ const VerticalScrollButtons = ({ scrollWrapper, }) => {
2656
2656
  };
2657
2657
 
2658
2658
  const Pip = (props) => {
2659
- const { excludeLocalParticipant = false, filterParticipants, mirrorLocalParticipantVideo = true, VideoPlaceholder, ParticipantViewUI = DefaultParticipantViewUI, PictureInPicturePlaceholder, } = props;
2659
+ const { t } = videoReactBindings.useI18n();
2660
+ const { excludeLocalParticipant = false, filterParticipants, mirrorLocalParticipantVideo = true, VideoPlaceholder, ParticipantViewUI = DefaultParticipantViewUI, } = props;
2660
2661
  const [layoutWrapperElement, setLayoutWrapperElement] = react.useState(null);
2661
2662
  const call = videoReactBindings.useCall();
2662
2663
  const participants = useFilteredParticipants({
2663
2664
  excludeLocalParticipant,
2664
2665
  filterParticipants,
2665
2666
  });
2667
+ const screenSharingParticipant = participants.find((p) => videoClient.hasScreenShare(p));
2666
2668
  usePaginatedLayoutSortPreset(call);
2667
2669
  react.useEffect(() => {
2668
2670
  if (!layoutWrapperElement || !call)
@@ -2672,7 +2674,8 @@ const Pip = (props) => {
2672
2674
  const mirror = mirrorLocalParticipantVideo ? undefined : false;
2673
2675
  if (!call)
2674
2676
  return null;
2675
- return (jsxRuntime.jsx("div", { className: "str-video__pip-layout", ref: setLayoutWrapperElement, children: participants.map((participant) => (jsxRuntime.jsx(ParticipantView, { participant: participant, muteAudio: true, mirror: mirror, VideoPlaceholder: VideoPlaceholder, PictureInPicturePlaceholder: PictureInPicturePlaceholder, ParticipantViewUI: ParticipantViewUI }, participant.sessionId))) }));
2677
+ return (jsxRuntime.jsxs("div", { className: "str-video__pip-layout", ref: setLayoutWrapperElement, children: [screenSharingParticipant &&
2678
+ (screenSharingParticipant.isLocalParticipant ? (jsxRuntime.jsxs("div", { className: "str-video__pip-screen-share-local", children: [jsxRuntime.jsx(Icon, { icon: "screen-share-off" }), jsxRuntime.jsx("span", { className: "str-video__pip-screen-share-local__title", children: t('You are presenting your screen') })] })) : (jsxRuntime.jsx(ParticipantView, { participant: screenSharingParticipant, trackType: "screenShareTrack", muteAudio: true, mirror: false, VideoPlaceholder: VideoPlaceholder, ParticipantViewUI: ParticipantViewUI }))), participants.map((participant) => (jsxRuntime.jsx(ParticipantView, { participant: participant, muteAudio: true, mirror: mirror, VideoPlaceholder: VideoPlaceholder, ParticipantViewUI: ParticipantViewUI }, participant.sessionId)))] }));
2676
2679
  };
2677
2680
  Pip.displayName = 'PipLayout.Pip';
2678
2681
  const Host = () => {
@@ -2707,7 +2710,7 @@ const LivestreamPlayer = (props) => {
2707
2710
  return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
2708
2711
  };
2709
2712
 
2710
- const [major, minor, patch] = ("1.14.1").split('.');
2713
+ const [major, minor, patch] = ("1.14.3").split('.');
2711
2714
  videoClient.setSdkInfo({
2712
2715
  type: videoClient.SfuModels.SdkType.REACT,
2713
2716
  major,
@@ -2797,6 +2800,7 @@ exports.defaultReactions = defaultReactions;
2797
2800
  exports.translations = translations;
2798
2801
  exports.useBackgroundFilters = useBackgroundFilters;
2799
2802
  exports.useDeviceList = useDeviceList;
2803
+ exports.useFilteredParticipants = useFilteredParticipants;
2800
2804
  exports.useHorizontalScrollPosition = useHorizontalScrollPosition;
2801
2805
  exports.useMenuContext = useMenuContext;
2802
2806
  exports.useNoiseCancellation = useNoiseCancellation;