@stream-io/video-react-sdk 1.18.1 → 1.18.2
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/CHANGELOG.md +12 -0
- package/dist/index.cjs.js +12 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +12 -9
- package/dist/index.es.js.map +1 -1
- package/dist/src/core/components/CallLayout/hooks.d.ts +1 -0
- package/package.json +4 -4
- package/src/core/components/CallLayout/LivestreamLayout.tsx +6 -4
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +3 -3
- package/src/core/components/CallLayout/PipLayout.tsx +5 -9
- package/src/core/components/CallLayout/SpeakerLayout.tsx +3 -2
- package/src/core/components/CallLayout/hooks.ts +9 -0
package/dist/index.es.js
CHANGED
|
@@ -2539,6 +2539,11 @@ const useSpeakerLayoutSortPreset = (call, isOneOnOneCall) => {
|
|
|
2539
2539
|
};
|
|
2540
2540
|
}, [call, isOneOnOneCall]);
|
|
2541
2541
|
};
|
|
2542
|
+
const useRawRemoteParticipants = () => {
|
|
2543
|
+
const { useRawParticipants } = useCallStateHooks();
|
|
2544
|
+
const rawParicipants = useRawParticipants();
|
|
2545
|
+
return useMemo(() => rawParicipants.filter((p) => !p.isLocalParticipant), [rawParicipants]);
|
|
2546
|
+
};
|
|
2542
2547
|
const resetSortPreset = (call) => {
|
|
2543
2548
|
// reset the sorting to the default for the call type
|
|
2544
2549
|
const callConfig = CallTypes.get(call.type);
|
|
@@ -2553,11 +2558,11 @@ const loggedIn = (a, b) => {
|
|
|
2553
2558
|
};
|
|
2554
2559
|
|
|
2555
2560
|
const LivestreamLayout = (props) => {
|
|
2556
|
-
const { useParticipants,
|
|
2561
|
+
const { useParticipants, useHasOngoingScreenShare } = useCallStateHooks();
|
|
2557
2562
|
const call = useCall();
|
|
2558
2563
|
const participants = useParticipants();
|
|
2559
2564
|
const [currentSpeaker] = participants;
|
|
2560
|
-
const remoteParticipants =
|
|
2565
|
+
const remoteParticipants = useRawRemoteParticipants();
|
|
2561
2566
|
const hasOngoingScreenShare = useHasOngoingScreenShare();
|
|
2562
2567
|
const presenter = hasOngoingScreenShare
|
|
2563
2568
|
? participants.find(hasScreenShare)
|
|
@@ -2661,8 +2666,7 @@ const PaginatedGridLayout = (props) => {
|
|
|
2661
2666
|
const [page, setPage] = useState(0);
|
|
2662
2667
|
const [paginatedGridLayoutWrapperElement, setPaginatedGridLayoutWrapperElement,] = useState(null);
|
|
2663
2668
|
const call = useCall();
|
|
2664
|
-
const
|
|
2665
|
-
const remoteParticipants = useRemoteParticipants();
|
|
2669
|
+
const remoteParticipants = useRawRemoteParticipants();
|
|
2666
2670
|
const participants = useFilteredParticipants({
|
|
2667
2671
|
excludeLocalParticipant,
|
|
2668
2672
|
filterParticipants,
|
|
@@ -2749,9 +2753,9 @@ hostElement, limit) => {
|
|
|
2749
2753
|
const DefaultParticipantViewUIBar = () => (jsx(DefaultParticipantViewUI, { menuPlacement: "top-end" }));
|
|
2750
2754
|
const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, ParticipantViewUISpotlight = DefaultParticipantViewUI, VideoPlaceholder, PictureInPicturePlaceholder, participantsBarPosition = 'bottom', participantsBarLimit, mirrorLocalParticipantVideo = true, excludeLocalParticipant = false, filterParticipants, pageArrowsVisible = true, muted, }) => {
|
|
2751
2755
|
const call = useCall();
|
|
2752
|
-
const { useParticipants
|
|
2756
|
+
const { useParticipants } = useCallStateHooks();
|
|
2753
2757
|
const allParticipants = useParticipants();
|
|
2754
|
-
const remoteParticipants =
|
|
2758
|
+
const remoteParticipants = useRawRemoteParticipants();
|
|
2755
2759
|
const [participantInSpotlight, ...otherParticipants] = useFilteredParticipants({ excludeLocalParticipant, filterParticipants });
|
|
2756
2760
|
const [participantsBarWrapperElement, setParticipantsBarWrapperElement] = useState(null);
|
|
2757
2761
|
const [participantsBarElement, setParticipantsBarElement] = useState(null);
|
|
@@ -2833,8 +2837,7 @@ const Pip = (props) => {
|
|
|
2833
2837
|
};
|
|
2834
2838
|
Pip.displayName = 'PipLayout.Pip';
|
|
2835
2839
|
const Host = () => {
|
|
2836
|
-
const
|
|
2837
|
-
const remoteParticipants = useRemoteParticipants();
|
|
2840
|
+
const remoteParticipants = useRawRemoteParticipants();
|
|
2838
2841
|
return jsx(ParticipantsAudio, { participants: remoteParticipants });
|
|
2839
2842
|
};
|
|
2840
2843
|
Host.displayName = 'PipLayout.Host';
|
|
@@ -2931,7 +2934,7 @@ const checkCanJoinEarly = (startsAt, joinAheadTimeSeconds) => {
|
|
|
2931
2934
|
return Date.now() >= +startsAt - (joinAheadTimeSeconds ?? 0) * 1000;
|
|
2932
2935
|
};
|
|
2933
2936
|
|
|
2934
|
-
const [major, minor, patch] = ("1.18.
|
|
2937
|
+
const [major, minor, patch] = ("1.18.2").split('.');
|
|
2935
2938
|
setSdkInfo({
|
|
2936
2939
|
type: SfuModels.SdkType.REACT,
|
|
2937
2940
|
major,
|