@stream-io/video-react-sdk 1.3.0 → 1.3.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 +13 -0
- package/dist/index.cjs.js +9 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +9 -8
- package/dist/index.es.js.map +1 -1
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.d.ts +2 -0
- package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +17 -1
- package/package.json +3 -3
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +3 -2
- package/src/core/components/CallLayout/SpeakerLayout.tsx +26 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.3.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.3.1...@stream-io/video-react-sdk-1.3.2) (2024-09-05)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@stream-io/video-client` updated to version `1.6.1`
|
|
10
|
+
* `@stream-io/video-react-bindings` updated to version `1.0.1`
|
|
11
|
+
## [1.3.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.3.0...@stream-io/video-react-sdk-1.3.1) (2024-09-05)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **composite:** hide the local participant for call recordings ([#1475](https://github.com/GetStream/stream-video-js/issues/1475)) ([f20ab9b](https://github.com/GetStream/stream-video-js/commit/f20ab9b6dc9a85d6d4d832d94ca1b369ba909658))
|
|
17
|
+
|
|
5
18
|
## [1.3.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.2.23...@stream-io/video-react-sdk-1.3.0) (2024-09-03)
|
|
6
19
|
|
|
7
20
|
### Dependency Updates
|
package/dist/index.cjs.js
CHANGED
|
@@ -2442,7 +2442,6 @@ const PaginatedGridLayout = (props) => {
|
|
|
2442
2442
|
const call = videoReactBindings.useCall();
|
|
2443
2443
|
const { useParticipants, useRemoteParticipants } = videoReactBindings.useCallStateHooks();
|
|
2444
2444
|
const participants = useParticipants();
|
|
2445
|
-
// used to render audio elements
|
|
2446
2445
|
const remoteParticipants = useRemoteParticipants();
|
|
2447
2446
|
usePaginatedLayoutSortPreset(call);
|
|
2448
2447
|
react.useEffect(() => {
|
|
@@ -2463,7 +2462,7 @@ const PaginatedGridLayout = (props) => {
|
|
|
2463
2462
|
const selectedGroup = participantGroups[page];
|
|
2464
2463
|
if (!call)
|
|
2465
2464
|
return null;
|
|
2466
|
-
return (jsxRuntime.jsxs("div", { className: "str-video__paginated-grid-layout__wrapper", ref: setPaginatedGridLayoutWrapperElement, children: [jsxRuntime.jsx(ParticipantsAudio, { participants: remoteParticipants }), jsxRuntime.jsxs("div", { className: "str-video__paginated-grid-layout", children: [pageArrowsVisible && pageCount > 1 && (jsxRuntime.jsx(IconButton, { icon: "caret-left", disabled: page === 0, onClick: () => setPage((currentPage) => Math.max(0, currentPage - 1)) })), selectedGroup && (jsxRuntime.jsx(PaginatedGridLayoutGroup, { group:
|
|
2465
|
+
return (jsxRuntime.jsxs("div", { className: "str-video__paginated-grid-layout__wrapper", ref: setPaginatedGridLayoutWrapperElement, children: [jsxRuntime.jsx(ParticipantsAudio, { participants: remoteParticipants }), jsxRuntime.jsxs("div", { className: "str-video__paginated-grid-layout", children: [pageArrowsVisible && pageCount > 1 && (jsxRuntime.jsx(IconButton, { icon: "caret-left", disabled: page === 0, onClick: () => setPage((currentPage) => Math.max(0, currentPage - 1)) })), selectedGroup && (jsxRuntime.jsx(PaginatedGridLayoutGroup, { group: selectedGroup, VideoPlaceholder: VideoPlaceholder, ParticipantViewUI: ParticipantViewUI })), pageArrowsVisible && pageCount > 1 && (jsxRuntime.jsx(IconButton, { disabled: page === pageCount - 1, icon: "caret-right", onClick: () => setPage((currentPage) => Math.min(pageCount - 1, currentPage + 1)) }))] })] }));
|
|
2467
2466
|
};
|
|
2468
2467
|
PaginatedGridLayout.displayName = 'PaginatedGridLayout';
|
|
2469
2468
|
|
|
@@ -2523,12 +2522,14 @@ hostElement, limit) => {
|
|
|
2523
2522
|
};
|
|
2524
2523
|
|
|
2525
2524
|
const DefaultParticipantViewUIBar = () => (jsxRuntime.jsx(DefaultParticipantViewUI, { menuPlacement: "top-end" }));
|
|
2526
|
-
const
|
|
2527
|
-
const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, ParticipantViewUISpotlight = DefaultParticipantViewUISpotlight, VideoPlaceholder, participantsBarPosition = 'bottom', participantsBarLimit, }) => {
|
|
2525
|
+
const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, ParticipantViewUISpotlight = DefaultParticipantViewUI, VideoPlaceholder, participantsBarPosition = 'bottom', participantsBarLimit, excludeLocalParticipant = false, pageArrowsVisible = true, }) => {
|
|
2528
2526
|
const call = videoReactBindings.useCall();
|
|
2529
2527
|
const { useParticipants, useRemoteParticipants } = videoReactBindings.useCallStateHooks();
|
|
2530
|
-
const
|
|
2528
|
+
const allParticipants = useParticipants();
|
|
2531
2529
|
const remoteParticipants = useRemoteParticipants();
|
|
2530
|
+
const [participantInSpotlight, ...otherParticipants] = excludeLocalParticipant
|
|
2531
|
+
? remoteParticipants
|
|
2532
|
+
: allParticipants;
|
|
2532
2533
|
const [participantsBarWrapperElement, setParticipantsBarWrapperElement] = react.useState(null);
|
|
2533
2534
|
const [participantsBarElement, setParticipantsBarElement] = react.useState(null);
|
|
2534
2535
|
const [buttonsWrapperElement, setButtonsWrapperElement] = react.useState(null);
|
|
@@ -2542,7 +2543,7 @@ const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, Par
|
|
|
2542
2543
|
const cleanup = call.setViewport(participantsBarWrapperElement);
|
|
2543
2544
|
return () => cleanup();
|
|
2544
2545
|
}, [participantsBarWrapperElement, call]);
|
|
2545
|
-
const isOneOnOneCall =
|
|
2546
|
+
const isOneOnOneCall = allParticipants.length === 2;
|
|
2546
2547
|
useSpeakerLayoutSortPreset(call, isOneOnOneCall);
|
|
2547
2548
|
let participantsWithAppliedLimit = otherParticipants;
|
|
2548
2549
|
const hardLimitToApply = isVertical
|
|
@@ -2558,7 +2559,7 @@ const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, Par
|
|
|
2558
2559
|
if (!call)
|
|
2559
2560
|
return null;
|
|
2560
2561
|
return (jsxRuntime.jsxs("div", { className: "str-video__speaker-layout__wrapper", children: [jsxRuntime.jsx(ParticipantsAudio, { participants: remoteParticipants }), jsxRuntime.jsxs("div", { className: clsx('str-video__speaker-layout', participantsBarPosition &&
|
|
2561
|
-
`str-video__speaker-layout--variant-${participantsBarPosition}`), children: [jsxRuntime.jsx("div", { className: "str-video__speaker-layout__spotlight", children: participantInSpotlight && (jsxRuntime.jsx(ParticipantView, { participant: participantInSpotlight, muteAudio: true, trackType: isSpeakerScreenSharing ? 'screenShareTrack' : 'videoTrack', ParticipantViewUI: ParticipantViewUISpotlight, VideoPlaceholder: VideoPlaceholder })) }), participantsWithAppliedLimit.length > 0 && participantsBarPosition && (jsxRuntime.jsxs("div", { ref: setButtonsWrapperElement, className: "str-video__speaker-layout__participants-bar-buttons-wrapper", children: [jsxRuntime.jsx("div", { className: "str-video__speaker-layout__participants-bar-wrapper", ref: setParticipantsBarWrapperElement, children: jsxRuntime.jsxs("div", { ref: setParticipantsBarElement, className: "str-video__speaker-layout__participants-bar", children: [isSpeakerScreenSharing && (jsxRuntime.jsx("div", { className: "str-video__speaker-layout__participant-tile", children: jsxRuntime.jsx(ParticipantView, { participant: participantInSpotlight, ParticipantViewUI: ParticipantViewUIBar, VideoPlaceholder: VideoPlaceholder, muteAudio: true }) }, participantInSpotlight.sessionId)), participantsWithAppliedLimit.map((participant) => (jsxRuntime.jsx("div", { className: "str-video__speaker-layout__participant-tile", children: jsxRuntime.jsx(ParticipantView, { participant: participant, ParticipantViewUI: ParticipantViewUIBar, VideoPlaceholder: VideoPlaceholder, muteAudio: true }) }, participant.sessionId)))] }) }), isVertical && (jsxRuntime.jsx(VerticalScrollButtons, { scrollWrapper: participantsBarWrapperElement })), isHorizontal && (jsxRuntime.jsx(HorizontalScrollButtons, { scrollWrapper: participantsBarWrapperElement }))] }))] })] }));
|
|
2562
|
+
`str-video__speaker-layout--variant-${participantsBarPosition}`), children: [jsxRuntime.jsx("div", { className: "str-video__speaker-layout__spotlight", children: participantInSpotlight && (jsxRuntime.jsx(ParticipantView, { participant: participantInSpotlight, muteAudio: true, trackType: isSpeakerScreenSharing ? 'screenShareTrack' : 'videoTrack', ParticipantViewUI: ParticipantViewUISpotlight, VideoPlaceholder: VideoPlaceholder })) }), participantsWithAppliedLimit.length > 0 && participantsBarPosition && (jsxRuntime.jsxs("div", { ref: setButtonsWrapperElement, className: "str-video__speaker-layout__participants-bar-buttons-wrapper", children: [jsxRuntime.jsx("div", { className: "str-video__speaker-layout__participants-bar-wrapper", ref: setParticipantsBarWrapperElement, children: jsxRuntime.jsxs("div", { ref: setParticipantsBarElement, className: "str-video__speaker-layout__participants-bar", children: [isSpeakerScreenSharing && (jsxRuntime.jsx("div", { className: "str-video__speaker-layout__participant-tile", children: jsxRuntime.jsx(ParticipantView, { participant: participantInSpotlight, ParticipantViewUI: ParticipantViewUIBar, VideoPlaceholder: VideoPlaceholder, muteAudio: true }) }, participantInSpotlight.sessionId)), participantsWithAppliedLimit.map((participant) => (jsxRuntime.jsx("div", { className: "str-video__speaker-layout__participant-tile", children: jsxRuntime.jsx(ParticipantView, { participant: participant, ParticipantViewUI: ParticipantViewUIBar, VideoPlaceholder: VideoPlaceholder, muteAudio: true }) }, participant.sessionId)))] }) }), pageArrowsVisible && isVertical && (jsxRuntime.jsx(VerticalScrollButtons, { scrollWrapper: participantsBarWrapperElement })), pageArrowsVisible && isHorizontal && (jsxRuntime.jsx(HorizontalScrollButtons, { scrollWrapper: participantsBarWrapperElement }))] }))] })] }));
|
|
2562
2563
|
};
|
|
2563
2564
|
SpeakerLayout.displayName = 'SpeakerLayout';
|
|
2564
2565
|
const HorizontalScrollButtons = ({ scrollWrapper, }) => {
|
|
@@ -2604,7 +2605,7 @@ const LivestreamPlayer = (props) => {
|
|
|
2604
2605
|
return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
|
|
2605
2606
|
};
|
|
2606
2607
|
|
|
2607
|
-
const [major, minor, patch] = ("1.3.
|
|
2608
|
+
const [major, minor, patch] = ("1.3.2" ).split('.');
|
|
2608
2609
|
videoClient.setSdkInfo({
|
|
2609
2610
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2610
2611
|
major,
|