@stream-io/video-react-sdk 0.4.11 → 0.4.13

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 CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ### [0.4.13](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.4.12...@stream-io/video-react-sdk-0.4.13) (2023-11-27)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `@stream-io/video-client` updated to version `0.4.10`
10
+ * `@stream-io/video-react-bindings` updated to version `0.3.10`
11
+ ### [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)
12
+
13
+ ### Dependency Updates
14
+
15
+ * `@stream-io/video-client` updated to version `0.4.9`
16
+ * `@stream-io/video-react-bindings` updated to version `0.3.9`
17
+
18
+ ### Features
19
+
20
+ * **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))
21
+
5
22
  ### [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
23
 
7
24
  ### 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: "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
+ (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(className, 'str-video__video', {
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.11" ).split('.');
1969
+ const [major, minor, patch] = ("0.4.13" ).split('.');
1969
1970
  videoClient.setSdkInfo({
1970
1971
  type: videoClient.SfuModels.SdkType.REACT,
1971
1972
  major,