@stream-io/video-react-sdk 1.2.8 → 1.2.10
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 +14 -0
- package/dist/index.cjs.js +12 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +12 -2
- package/dist/index.es.js.map +1 -1
- package/dist/src/core/components/Audio/Audio.d.ts +4 -1
- package/dist/src/core/components/Audio/ParticipantsAudio.d.ts +4 -1
- package/dist/src/core/components/CallLayout/LivestreamLayout.d.ts +4 -1
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.d.ts +4 -1
- package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +4 -1
- package/dist/src/core/components/StreamCall/StreamCall.d.ts +3 -1
- package/dist/src/core/components/StreamVideo/StreamVideo.d.ts +4 -1
- package/dist/src/core/components/Video/Video.d.ts +4 -1
- package/package.json +1 -1
- package/src/components/Menu/MenuToggle.tsx +1 -0
- package/src/core/components/Audio/Audio.tsx +2 -0
- package/src/core/components/Audio/ParticipantsAudio.tsx +2 -0
- package/src/core/components/CallLayout/LivestreamLayout.tsx +2 -0
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +2 -0
- package/src/core/components/CallLayout/SpeakerLayout.tsx +2 -0
- package/src/core/components/ParticipantView/ParticipantView.tsx +2 -0
- package/src/core/components/StreamCall/StreamCall.tsx +10 -2
- package/src/core/components/StreamVideo/StreamVideo.tsx +3 -1
- package/src/core/components/Video/Video.tsx +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [1.2.10](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.2.9...@stream-io/video-react-sdk-1.2.10) (2024-06-26)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **react:** provide displayName for our core components ([#1423](https://github.com/GetStream/stream-video-js/issues/1423)) ([724c444](https://github.com/GetStream/stream-video-js/commit/724c4449f3f4dfd4c468323e1a8dde1d12e56135))
|
|
11
|
+
|
|
12
|
+
### [1.2.9](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.2.8...@stream-io/video-react-sdk-1.2.9) (2024-06-25)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* in some browsers event.key could be undefined ([#1421](https://github.com/GetStream/stream-video-js/issues/1421)) ([0a01c9f](https://github.com/GetStream/stream-video-js/commit/0a01c9fc6148457f9c9de0f8073f71143b05dc80))
|
|
18
|
+
|
|
5
19
|
### [1.2.8](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.2.7...@stream-io/video-react-sdk-1.2.8) (2024-06-25)
|
|
6
20
|
|
|
7
21
|
### Dependency Updates
|
package/dist/index.cjs.js
CHANGED
|
@@ -24,6 +24,7 @@ const Audio = ({ participant, trackType = 'audioTrack', ...rest }) => {
|
|
|
24
24
|
}, [call, sessionId, audioElement, trackType]);
|
|
25
25
|
return (jsxRuntime.jsx("audio", { autoPlay: true, ...rest, ref: setAudioElement, "data-user-id": userId, "data-session-id": sessionId, "data-track-type": trackType }));
|
|
26
26
|
};
|
|
27
|
+
Audio.displayName = 'Audio';
|
|
27
28
|
|
|
28
29
|
const ParticipantsAudio = (props) => {
|
|
29
30
|
const { participants, audioProps } = props;
|
|
@@ -39,6 +40,7 @@ const ParticipantsAudio = (props) => {
|
|
|
39
40
|
return (jsxRuntime.jsxs(react.Fragment, { children: [audioTrackElement, screenShareAudioTrackElement] }, sessionId));
|
|
40
41
|
}) }));
|
|
41
42
|
};
|
|
43
|
+
ParticipantsAudio.displayName = 'ParticipantsAudio';
|
|
42
44
|
|
|
43
45
|
const ParticipantViewContext = react.createContext(undefined);
|
|
44
46
|
const useParticipantViewContext = () => react.useContext(ParticipantViewContext);
|
|
@@ -537,7 +539,8 @@ const MenuToggle = ({ ToggleButton, placement = 'top-start', strategy = 'absolut
|
|
|
537
539
|
}
|
|
538
540
|
};
|
|
539
541
|
const handleKeyDown = (event) => {
|
|
540
|
-
if (event.key
|
|
542
|
+
if (event.key && // key can be undefined in some browsers
|
|
543
|
+
event.key.toLowerCase() === 'escape' &&
|
|
541
544
|
!event.altKey &&
|
|
542
545
|
!event.ctrlKey) {
|
|
543
546
|
setMenuShown(false);
|
|
@@ -1929,6 +1932,7 @@ const Video$1 = ({ trackType, participant, className, VideoPlaceholder = Default
|
|
|
1929
1932
|
refs?.setVideoElement?.(element);
|
|
1930
1933
|
} })), (hasNoVideoOrInvisible || isVideoPaused) && VideoPlaceholder && (jsxRuntime.jsx(VideoPlaceholder, { style: { position: 'absolute' }, participant: participant, ref: refs?.setVideoPlaceholderElement }))] }));
|
|
1931
1934
|
};
|
|
1935
|
+
Video$1.displayName = 'Video';
|
|
1932
1936
|
|
|
1933
1937
|
/**
|
|
1934
1938
|
* @description Extends video element with `stream` property
|
|
@@ -2191,9 +2195,11 @@ const ParticipantView = react.forwardRef(function ParticipantView({ participant,
|
|
|
2191
2195
|
setTrackedElement(element);
|
|
2192
2196
|
}, className: clsx('str-video__participant-view', isDominantSpeaker && 'str-video__participant-view--dominant-speaker', isSpeaking && 'str-video__participant-view--speaking', !hasVideoTrack && 'str-video__participant-view--no-video', !hasAudioTrack && 'str-video__participant-view--no-audio', className), children: jsxRuntime.jsxs(ParticipantViewContext.Provider, { value: participantViewContextValue, children: [!isLocalParticipant && !muteAudio && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasAudioTrack && (jsxRuntime.jsx(Audio, { participant: participant, trackType: "audioTrack" })), hasScreenShareAudioTrack && (jsxRuntime.jsx(Audio, { participant: participant, trackType: "screenShareAudioTrack" }))] })), jsxRuntime.jsx(Video$1, { VideoPlaceholder: VideoPlaceholder, participant: participant, trackType: trackType, refs: videoRefs, autoPlay: true }), isComponentType(ParticipantViewUI) ? (jsxRuntime.jsx(ParticipantViewUI, {})) : (ParticipantViewUI)] }) }));
|
|
2193
2197
|
});
|
|
2198
|
+
ParticipantView.displayName = 'ParticipantView';
|
|
2194
2199
|
|
|
2195
2200
|
// re-exporting the StreamCallProvider as StreamCall
|
|
2196
2201
|
const StreamCall = videoReactBindings.StreamCallProvider;
|
|
2202
|
+
StreamCall.displayName = 'StreamCall';
|
|
2197
2203
|
|
|
2198
2204
|
var Joining = "Joining";
|
|
2199
2205
|
var Mic = "Mic";
|
|
@@ -2315,6 +2321,7 @@ const translations = { en };
|
|
|
2315
2321
|
const StreamVideo = (props) => {
|
|
2316
2322
|
return (jsxRuntime.jsx(videoReactBindings.StreamVideoProvider, { translationsOverrides: translations, ...props }));
|
|
2317
2323
|
};
|
|
2324
|
+
StreamVideo.displayName = 'StreamVideo';
|
|
2318
2325
|
|
|
2319
2326
|
const usePaginatedLayoutSortPreset = (call) => {
|
|
2320
2327
|
react.useEffect(() => {
|
|
@@ -2388,6 +2395,7 @@ const ParticipantOverlay = (props) => {
|
|
|
2388
2395
|
const { t } = videoReactBindings.useI18n();
|
|
2389
2396
|
return (jsxRuntime.jsx("div", { className: "str-video__livestream-layout__overlay", children: jsxRuntime.jsxs("div", { className: "str-video__livestream-layout__overlay__bar", children: [showLiveBadge && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__live-badge", children: t('Live') })), showParticipantCount && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__viewers-count", children: participantCount })), showSpeakerName && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__speaker-name", title: participant.name || participant.userId || '', children: participant.name || participant.userId || '' })), showDuration && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__duration", children: formatDuration(duration) })), enableFullScreen && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__go-fullscreen", onClick: toggleFullScreen }))] }) }));
|
|
2390
2397
|
};
|
|
2398
|
+
LivestreamLayout.displayName = 'LivestreamLayout';
|
|
2391
2399
|
const useUpdateCallDuration = () => {
|
|
2392
2400
|
const { useIsCallLive, useCallSession } = videoReactBindings.useCallStateHooks();
|
|
2393
2401
|
const isCallLive = useIsCallLive();
|
|
@@ -2475,6 +2483,7 @@ const PaginatedGridLayout = (props) => {
|
|
|
2475
2483
|
return null;
|
|
2476
2484
|
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: participantGroups[page], 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)) }))] })] }));
|
|
2477
2485
|
};
|
|
2486
|
+
PaginatedGridLayout.displayName = 'PaginatedGridLayout';
|
|
2478
2487
|
|
|
2479
2488
|
const useCalculateHardLimit = (
|
|
2480
2489
|
/**
|
|
@@ -2569,6 +2578,7 @@ const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, Par
|
|
|
2569
2578
|
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 &&
|
|
2570
2579
|
`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 }))] }))] })] }));
|
|
2571
2580
|
};
|
|
2581
|
+
SpeakerLayout.displayName = 'SpeakerLayout';
|
|
2572
2582
|
const HorizontalScrollButtons = ({ scrollWrapper, }) => {
|
|
2573
2583
|
const scrollPosition = useHorizontalScrollPosition(scrollWrapper);
|
|
2574
2584
|
const scrollStartClickHandler = () => {
|
|
@@ -2612,7 +2622,7 @@ const LivestreamPlayer = (props) => {
|
|
|
2612
2622
|
return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
|
|
2613
2623
|
};
|
|
2614
2624
|
|
|
2615
|
-
const [major, minor, patch] = ("1.2.
|
|
2625
|
+
const [major, minor, patch] = ("1.2.10" ).split('.');
|
|
2616
2626
|
videoClient.setSdkInfo({
|
|
2617
2627
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2618
2628
|
major,
|