@stream-io/video-react-sdk 0.4.11 → 0.4.12
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 +11 -0
- package/dist/index.cjs.js +5 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6 -5
- package/dist/index.es.js.map +1 -1
- package/dist/src/core/components/ParticipantView/ParticipantView.d.ts +16 -6
- package/dist/src/core/components/Video/Video.d.ts +4 -1
- package/package.json +3 -3
- package/src/core/components/ParticipantView/ParticipantView.tsx +8 -3
- package/src/core/components/Video/DefaultVideoPlaceholder.tsx +3 -1
- package/src/core/components/Video/Video.tsx +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [0.4.12](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.4.11...@stream-io/video-react-sdk-0.4.12) (2023-11-22)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@stream-io/video-client` updated to version `0.4.9`
|
|
10
|
+
* `@stream-io/video-react-bindings` updated to version `0.3.9`
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **participant-view:** allow opting-out from rendering VideoPlaceholder ([#1198](https://github.com/GetStream/stream-video-js/issues/1198)) ([acb020c](https://github.com/GetStream/stream-video-js/commit/acb020c8157a1338771bef11ef5e501bc9cd6f69))
|
|
15
|
+
|
|
5
16
|
### [0.4.11](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.4.10...@stream-io/video-react-sdk-0.4.11) (2023-11-16)
|
|
6
17
|
|
|
7
18
|
### Dependency Updates
|
package/dist/index.cjs.js
CHANGED
|
@@ -90,10 +90,11 @@ const BaseVideo = react.forwardRef(({ stream, ...rest }, ref) => {
|
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
const DefaultVideoPlaceholder = react.forwardRef(({ participant, style }, ref) => {
|
|
93
|
+
const { t } = videoReactBindings.useI18n();
|
|
93
94
|
const [error, setError] = react.useState(false);
|
|
94
95
|
const name = participant.name || participant.userId;
|
|
95
96
|
return (jsxRuntime.jsxs("div", { className: "str-video__video-placeholder", style: style, ref: ref, children: [(!participant.image || error) &&
|
|
96
|
-
(name ? (jsxRuntime.jsx("div", { className: "str-video__video-placeholder__initials-fallback", children: jsxRuntime.jsx("div", { children: name[0] }) })) : (jsxRuntime.jsx("div", { children:
|
|
97
|
+
(name ? (jsxRuntime.jsx("div", { className: "str-video__video-placeholder__initials-fallback", children: jsxRuntime.jsx("div", { children: name[0] }) })) : (jsxRuntime.jsx("div", { children: t('Video is disabled') }))), participant.image && !error && (jsxRuntime.jsx("img", { onError: () => setError(true), alt: "video-placeholder", className: "str-video__video-placeholder__avatar", src: participant.image }))] }));
|
|
97
98
|
});
|
|
98
99
|
|
|
99
100
|
const Video$1 = ({ trackType, participant, className, VideoPlaceholder = DefaultVideoPlaceholder, refs, ...rest }) => {
|
|
@@ -154,7 +155,7 @@ const Video$1 = ({ trackType, participant, className, VideoPlaceholder = Default
|
|
|
154
155
|
const hasNoVideoOrInvisible = !isPublishingTrack || isInvisible;
|
|
155
156
|
const mirrorVideo = isLocalParticipant && trackType === 'videoTrack';
|
|
156
157
|
const isScreenShareTrack = trackType === 'screenShareTrack';
|
|
157
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!hasNoVideoOrInvisible && (jsxRuntime.jsx("video", { ...rest, className: clsx(
|
|
158
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!hasNoVideoOrInvisible && (jsxRuntime.jsx("video", { ...rest, className: clsx('str-video__video', className, {
|
|
158
159
|
'str-video__video--not-playing': isVideoPaused,
|
|
159
160
|
'str-video__video--tall': !isWideMode,
|
|
160
161
|
'str-video__video--mirror': mirrorVideo,
|
|
@@ -162,7 +163,7 @@ const Video$1 = ({ trackType, participant, className, VideoPlaceholder = Default
|
|
|
162
163
|
}), "data-user-id": userId, "data-session-id": sessionId, ref: (element) => {
|
|
163
164
|
setVideoElement(element);
|
|
164
165
|
refs?.setVideoElement?.(element);
|
|
165
|
-
} })), (hasNoVideoOrInvisible || isVideoPaused) && (jsxRuntime.jsx(VideoPlaceholder, { style: { position: 'absolute' }, participant: participant, ref: refs?.setVideoPlaceholderElement }))] }));
|
|
166
|
+
} })), (hasNoVideoOrInvisible || isVideoPaused) && VideoPlaceholder && (jsxRuntime.jsx(VideoPlaceholder, { style: { position: 'absolute' }, participant: participant, ref: refs?.setVideoPlaceholderElement }))] }));
|
|
166
167
|
};
|
|
167
168
|
|
|
168
169
|
const useTrackElementVisibility = ({ trackedElement, dynascaleManager: propsDynascaleManager, sessionId, trackType, }) => {
|
|
@@ -1965,7 +1966,7 @@ const VerticalScrollButtons = ({ scrollWrapper, }) => {
|
|
|
1965
1966
|
};
|
|
1966
1967
|
const hasScreenShare = (p) => !!p?.publishedTracks.includes(videoClient.SfuModels.TrackType.SCREEN_SHARE);
|
|
1967
1968
|
|
|
1968
|
-
const [major, minor, patch] = ("0.4.
|
|
1969
|
+
const [major, minor, patch] = ("0.4.12" ).split('.');
|
|
1969
1970
|
videoClient.setSdkInfo({
|
|
1970
1971
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
1971
1972
|
major,
|