@stream-io/video-react-sdk 1.18.13 → 1.19.0
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/css/styles.css +10 -0
- package/dist/css/styles.css.map +1 -1
- package/dist/index.cjs.js +13 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +14 -7
- package/dist/index.es.js.map +1 -1
- package/dist/src/translations/index.d.ts +1 -0
- package/package.json +4 -4
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +14 -2
- package/src/core/components/Video/Video.tsx +6 -1
- package/src/translations/en.json +1 -0
package/dist/index.cjs.js
CHANGED
|
@@ -787,7 +787,10 @@ const Video$1 = ({ enabled = true, mirror, trackType, participant, className, Vi
|
|
|
787
787
|
: false;
|
|
788
788
|
const isInvisible = trackType === 'none' ||
|
|
789
789
|
viewportVisibilityState?.[trackType] === videoClient.VisibilityState.INVISIBLE;
|
|
790
|
-
const hasNoVideoOrInvisible = !enabled ||
|
|
790
|
+
const hasNoVideoOrInvisible = !enabled ||
|
|
791
|
+
!isPublishingTrack ||
|
|
792
|
+
isInvisible ||
|
|
793
|
+
videoClient.hasPausedTrack(participant, trackType);
|
|
791
794
|
const mirrorVideo = mirror === undefined
|
|
792
795
|
? isLocalParticipant && trackType === 'videoTrack'
|
|
793
796
|
: mirror;
|
|
@@ -2217,9 +2220,11 @@ const DefaultScreenShareOverlay = () => {
|
|
|
2217
2220
|
const call = videoReactBindings.useCall();
|
|
2218
2221
|
const { t } = videoReactBindings.useI18n();
|
|
2219
2222
|
const stopScreenShare = () => {
|
|
2220
|
-
call?.screenShare.disable()
|
|
2223
|
+
call?.screenShare.disable().catch((err) => {
|
|
2224
|
+
console.error('Failed to stop screen sharing:', err);
|
|
2225
|
+
});
|
|
2221
2226
|
};
|
|
2222
|
-
return (jsxRuntime.jsxs("div", { className: "str-video__screen-share-overlay", children: [jsxRuntime.jsx(Icon, { icon: "screen-share-off" }), jsxRuntime.jsx("span", { className: "str-video__screen-share-overlay__title", children: t('You are presenting your screen') }), jsxRuntime.jsxs("button", { onClick: stopScreenShare, className: "str-video__screen-share-overlay__button", children: [jsxRuntime.jsx(Icon, { icon: "close" }), " ", t('Stop Screen Sharing')] })] }));
|
|
2227
|
+
return (jsxRuntime.jsxs("div", { className: "str-video__screen-share-overlay", children: [jsxRuntime.jsx(Icon, { icon: "screen-share-off" }), jsxRuntime.jsx("span", { className: "str-video__screen-share-overlay__title", children: t('You are presenting your screen') }), jsxRuntime.jsxs("button", { onClick: stopScreenShare, type: "button", className: "str-video__screen-share-overlay__button", children: [jsxRuntime.jsx(Icon, { icon: "close" }), " ", t('Stop Screen Sharing')] })] }));
|
|
2223
2228
|
};
|
|
2224
2229
|
const DefaultParticipantViewUI = ({ indicatorsVisible = true, menuPlacement = 'bottom-start', showMenuButton = true, ParticipantActionsContextMenu: ParticipantActionsContextMenu$1 = ParticipantActionsContextMenu, }) => {
|
|
2225
2230
|
const { participant, trackType } = useParticipantViewContext();
|
|
@@ -2232,7 +2237,7 @@ const DefaultParticipantViewUI = ({ indicatorsVisible = true, menuPlacement = 'b
|
|
|
2232
2237
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showMenuButton && (jsxRuntime.jsx(MenuToggle, { strategy: "fixed", placement: menuPlacement, ToggleButton: ToggleButton, children: jsxRuntime.jsx(ParticipantActionsContextMenu$1, {}) })), jsxRuntime.jsx(Reaction, { participant: participant }), jsxRuntime.jsx(ParticipantDetails, { indicatorsVisible: indicatorsVisible })] }));
|
|
2233
2238
|
};
|
|
2234
2239
|
const ParticipantDetails = ({ indicatorsVisible = true, }) => {
|
|
2235
|
-
const { participant } = useParticipantViewContext();
|
|
2240
|
+
const { participant, trackType } = useParticipantViewContext();
|
|
2236
2241
|
const { isLocalParticipant, connectionQuality, pin, sessionId, name, userId, } = participant;
|
|
2237
2242
|
const call = videoReactBindings.useCall();
|
|
2238
2243
|
const { t } = videoReactBindings.useI18n();
|
|
@@ -2241,7 +2246,8 @@ const ParticipantDetails = ({ indicatorsVisible = true, }) => {
|
|
|
2241
2246
|
const hasAudioTrack = videoClient.hasAudio(participant);
|
|
2242
2247
|
const hasVideoTrack = videoClient.hasVideo(participant);
|
|
2243
2248
|
const canUnpin = !!pin && pin.isLocalPin;
|
|
2244
|
-
|
|
2249
|
+
const isTrackPaused = trackType !== 'none' ? videoClient.hasPausedTrack(participant, trackType) : false;
|
|
2250
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "str-video__participant-details", children: jsxRuntime.jsxs("span", { className: "str-video__participant-details__name", children: [name || userId, indicatorsVisible && !hasAudioTrack && (jsxRuntime.jsx("span", { className: "str-video__participant-details__name--audio-muted" })), indicatorsVisible && !hasVideoTrack && (jsxRuntime.jsx("span", { className: "str-video__participant-details__name--video-muted" })), indicatorsVisible && isTrackPaused && (jsxRuntime.jsx("span", { title: t('Video paused due to insufficient bandwidth'), className: "str-video__participant-details__name--track-paused" })), indicatorsVisible && canUnpin && (
|
|
2245
2251
|
// TODO: remove this monstrosity once we have a proper design
|
|
2246
2252
|
jsxRuntime.jsx("span", { title: t('Unpin'), onClick: () => call?.unpin(sessionId), className: "str-video__participant-details__name--pinned" })), indicatorsVisible && jsxRuntime.jsx(SpeechIndicator, {})] }) }), indicatorsVisible && (jsxRuntime.jsx(Notification, { isVisible: isLocalParticipant &&
|
|
2247
2253
|
connectionQuality === videoClient.SfuModels.ConnectionQuality.POOR, message: t('Poor connection quality'), children: connectionQualityAsString && (jsxRuntime.jsx("span", { className: clsx('str-video__participant-details__connection-quality', `str-video__participant-details__connection-quality--${connectionQualityAsString}`), title: connectionQualityAsString })) }))] }));
|
|
@@ -2414,6 +2420,7 @@ var en = {
|
|
|
2414
2420
|
"{{ direction }} picture-in-picture": "{{ direction }} picture-in-picture",
|
|
2415
2421
|
"Dominant Speaker": "Dominant Speaker",
|
|
2416
2422
|
"Poor connection quality": "Poor connection quality. Please check your internet connection.",
|
|
2423
|
+
"Video paused due to insufficient bandwidth": "Video paused due to insufficient bandwidth",
|
|
2417
2424
|
Participants: Participants,
|
|
2418
2425
|
Anonymous: Anonymous,
|
|
2419
2426
|
"No participants found": "No participants found",
|
|
@@ -2937,7 +2944,7 @@ const checkCanJoinEarly = (startsAt, joinAheadTimeSeconds) => {
|
|
|
2937
2944
|
return Date.now() >= +startsAt - (joinAheadTimeSeconds ?? 0) * 1000;
|
|
2938
2945
|
};
|
|
2939
2946
|
|
|
2940
|
-
const [major, minor, patch] = ("1.
|
|
2947
|
+
const [major, minor, patch] = ("1.19.0").split('.');
|
|
2941
2948
|
videoClient.setSdkInfo({
|
|
2942
2949
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2943
2950
|
major,
|