@stream-io/video-react-sdk 1.6.6 → 1.7.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 +23 -0
- package/README.md +1 -1
- package/dist/css/styles.css +1 -1
- package/dist/css/styles.css.map +1 -1
- package/dist/index.cjs.js +45 -30
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +45 -30
- package/dist/index.es.js.map +1 -1
- package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +2 -2
- package/dist/src/core/components/ParticipantView/ParticipantView.d.ts +2 -2
- package/dist/src/core/components/Video/BaseVideoPlaceholder.d.ts +6 -0
- package/dist/src/core/components/Video/DefaultPictureInPicturePlaceholder.d.ts +3 -0
- package/dist/src/core/components/Video/DefaultVideoPlaceholder.d.ts +3 -6
- package/dist/src/core/components/Video/Video.d.ts +12 -1
- package/dist/src/core/hooks/usePictureInPictureState.d.ts +1 -0
- package/package.json +4 -4
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +6 -1
- package/src/core/components/CallLayout/SpeakerLayout.tsx +8 -1
- package/src/core/components/ParticipantView/ParticipantActionsContextMenu.tsx +4 -24
- package/src/core/components/ParticipantView/ParticipantView.tsx +3 -1
- package/src/core/components/Video/BaseVideoPlaceholder.tsx +49 -0
- package/src/core/components/Video/DefaultPictureInPicturePlaceholder.tsx +20 -0
- package/src/core/components/Video/DefaultVideoPlaceholder.tsx +10 -41
- package/src/core/components/Video/Video.tsx +25 -0
- package/src/core/hooks/usePictureInPictureState.ts +27 -0
package/dist/index.cjs.js
CHANGED
|
@@ -393,11 +393,31 @@ const GenericMenuButtonItem = ({ children, ...rest }) => {
|
|
|
393
393
|
|
|
394
394
|
const Icon = ({ className, icon }) => (jsxRuntime.jsx("span", { className: clsx('str-video__icon', icon && `str-video__icon--${icon}`, className) }));
|
|
395
395
|
|
|
396
|
+
function usePictureInPictureState(videoElement) {
|
|
397
|
+
const [isPiP, setIsPiP] = react.useState(document.pictureInPictureElement === videoElement);
|
|
398
|
+
if (!videoElement && isPiP)
|
|
399
|
+
setIsPiP(false);
|
|
400
|
+
react.useEffect(() => {
|
|
401
|
+
if (!videoElement)
|
|
402
|
+
return;
|
|
403
|
+
const handlePiP = () => {
|
|
404
|
+
setIsPiP(document.pictureInPictureElement === videoElement);
|
|
405
|
+
};
|
|
406
|
+
videoElement.addEventListener('enterpictureinpicture', handlePiP);
|
|
407
|
+
videoElement.addEventListener('leavepictureinpicture', handlePiP);
|
|
408
|
+
return () => {
|
|
409
|
+
videoElement.removeEventListener('enterpictureinpicture', handlePiP);
|
|
410
|
+
videoElement.removeEventListener('leavepictureinpicture', handlePiP);
|
|
411
|
+
};
|
|
412
|
+
}, [videoElement]);
|
|
413
|
+
return isPiP;
|
|
414
|
+
}
|
|
415
|
+
|
|
396
416
|
const ParticipantActionsContextMenu = () => {
|
|
397
417
|
const { participant, participantViewElement, videoElement } = useParticipantViewContext();
|
|
398
418
|
const [fullscreenModeOn, setFullscreenModeOn] = react.useState(!!document.fullscreenElement);
|
|
399
|
-
const [pictureInPictureElement, setPictureInPictureElement] = react.useState(document.pictureInPictureElement);
|
|
400
419
|
const call = videoReactBindings.useCall();
|
|
420
|
+
const isPiP = usePictureInPictureState(videoElement ?? undefined);
|
|
401
421
|
const { t } = videoReactBindings.useI18n();
|
|
402
422
|
const { pin, sessionId, userId } = participant;
|
|
403
423
|
const hasAudioTrack = videoClient.hasAudio(participant);
|
|
@@ -466,21 +486,8 @@ const ParticipantActionsContextMenu = () => {
|
|
|
466
486
|
document.removeEventListener('fullscreenchange', handleFullscreenChange);
|
|
467
487
|
};
|
|
468
488
|
}, []);
|
|
469
|
-
react.useEffect(() => {
|
|
470
|
-
if (!videoElement)
|
|
471
|
-
return;
|
|
472
|
-
const handlePiP = () => {
|
|
473
|
-
setPictureInPictureElement(document.pictureInPictureElement);
|
|
474
|
-
};
|
|
475
|
-
videoElement.addEventListener('enterpictureinpicture', handlePiP);
|
|
476
|
-
videoElement.addEventListener('leavepictureinpicture', handlePiP);
|
|
477
|
-
return () => {
|
|
478
|
-
videoElement.removeEventListener('enterpictureinpicture', handlePiP);
|
|
479
|
-
videoElement.removeEventListener('leavepictureinpicture', handlePiP);
|
|
480
|
-
};
|
|
481
|
-
}, [videoElement]);
|
|
482
489
|
const togglePictureInPicture = () => {
|
|
483
|
-
if (videoElement &&
|
|
490
|
+
if (videoElement && !isPiP) {
|
|
484
491
|
return videoElement
|
|
485
492
|
.requestPictureInPicture()
|
|
486
493
|
.catch(console.error);
|
|
@@ -491,9 +498,7 @@ const ParticipantActionsContextMenu = () => {
|
|
|
491
498
|
return (jsxRuntime.jsxs(GenericMenu, { onItemClick: close, children: [jsxRuntime.jsxs(GenericMenuButtonItem, { onClick: toggleParticipantPin, disabled: pin && !pin.isLocalPin, children: [jsxRuntime.jsx(Icon, { icon: "pin" }), pin ? t('Unpin') : t('Pin')] }), jsxRuntime.jsxs(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.PIN_FOR_EVERYONE], children: [jsxRuntime.jsxs(GenericMenuButtonItem, { onClick: pinForEveryone, disabled: pin && !pin.isLocalPin, children: [jsxRuntime.jsx(Icon, { icon: "pin" }), t('Pin for everyone')] }), jsxRuntime.jsxs(GenericMenuButtonItem, { onClick: unpinForEveryone, disabled: !pin || pin.isLocalPin, children: [jsxRuntime.jsx(Icon, { icon: "pin" }), t('Unpin for everyone')] })] }), jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.BLOCK_USERS], children: jsxRuntime.jsxs(GenericMenuButtonItem, { onClick: blockUser, children: [jsxRuntime.jsx(Icon, { icon: "not-allowed" }), t('Block')] }) }), jsxRuntime.jsxs(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.MUTE_USERS], children: [hasVideoTrack && (jsxRuntime.jsxs(GenericMenuButtonItem, { onClick: muteVideo, children: [jsxRuntime.jsx(Icon, { icon: "camera-off-outline" }), t('Turn off video')] })), hasScreenShareTrack && (jsxRuntime.jsxs(GenericMenuButtonItem, { onClick: muteScreenShare, children: [jsxRuntime.jsx(Icon, { icon: "screen-share-off" }), t('Turn off screen share')] })), hasAudioTrack && (jsxRuntime.jsxs(GenericMenuButtonItem, { onClick: muteAudio, children: [jsxRuntime.jsx(Icon, { icon: "no-audio" }), t('Mute audio')] })), hasScreenShareAudioTrack && (jsxRuntime.jsxs(GenericMenuButtonItem, { onClick: muteScreenShareAudio, children: [jsxRuntime.jsx(Icon, { icon: "no-audio" }), t('Mute screen share audio')] }))] }), participantViewElement && (jsxRuntime.jsx(GenericMenuButtonItem, { onClick: toggleFullscreenMode, children: t('{{ direction }} fullscreen', {
|
|
492
499
|
direction: fullscreenModeOn ? t('Leave') : t('Enter'),
|
|
493
500
|
}) })), videoElement && document.pictureInPictureEnabled && (jsxRuntime.jsx(GenericMenuButtonItem, { onClick: togglePictureInPicture, children: t('{{ direction }} picture-in-picture', {
|
|
494
|
-
direction:
|
|
495
|
-
? t('Leave')
|
|
496
|
-
: t('Enter'),
|
|
501
|
+
direction: isPiP ? t('Leave') : t('Enter'),
|
|
497
502
|
}) })), jsxRuntime.jsxs(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.UPDATE_CALL_PERMISSIONS], children: [jsxRuntime.jsx(GenericMenuButtonItem, { onClick: grantPermission(videoClient.OwnCapability.SEND_AUDIO), children: t('Allow audio') }), jsxRuntime.jsx(GenericMenuButtonItem, { onClick: grantPermission(videoClient.OwnCapability.SEND_VIDEO), children: t('Allow video') }), jsxRuntime.jsx(GenericMenuButtonItem, { onClick: grantPermission(videoClient.OwnCapability.SCREENSHARE), children: t('Allow screen sharing') }), jsxRuntime.jsx(GenericMenuButtonItem, { onClick: revokePermission(videoClient.OwnCapability.SEND_AUDIO), children: t('Disable audio') }), jsxRuntime.jsx(GenericMenuButtonItem, { onClick: revokePermission(videoClient.OwnCapability.SEND_VIDEO), children: t('Disable video') }), jsxRuntime.jsx(GenericMenuButtonItem, { onClick: revokePermission(videoClient.OwnCapability.SCREENSHARE), children: t('Disable screen sharing') })] })] }));
|
|
498
503
|
};
|
|
499
504
|
|
|
@@ -548,12 +553,11 @@ const BaseVideo = react.forwardRef(function BaseVideo({ stream, ...rest }, ref)
|
|
|
548
553
|
} }));
|
|
549
554
|
});
|
|
550
555
|
|
|
551
|
-
const
|
|
552
|
-
const { t } = videoReactBindings.useI18n();
|
|
556
|
+
const BaseVideoPlaceholder = react.forwardRef(function DefaultVideoPlaceholder({ participant, style, children }, ref) {
|
|
553
557
|
const [error, setError] = react.useState(false);
|
|
554
558
|
const name = participant.name || participant.userId;
|
|
555
559
|
return (jsxRuntime.jsxs("div", { className: "str-video__video-placeholder", style: style, ref: ref, children: [(!participant.image || error) &&
|
|
556
|
-
(name ? (jsxRuntime.jsx(InitialsFallback, { name: name })) : (jsxRuntime.jsx("div", { className: "str-video__video-placeholder__no-video-label", children:
|
|
560
|
+
(name ? (jsxRuntime.jsx(InitialsFallback, { name: name })) : (jsxRuntime.jsx("div", { className: "str-video__video-placeholder__no-video-label", children: children }))), participant.image && !error && (jsxRuntime.jsx("img", { onError: () => setError(true), alt: name, className: "str-video__video-placeholder__avatar", src: participant.image }))] }));
|
|
557
561
|
});
|
|
558
562
|
const InitialsFallback = (props) => {
|
|
559
563
|
const { name } = props;
|
|
@@ -565,13 +569,24 @@ const InitialsFallback = (props) => {
|
|
|
565
569
|
return (jsxRuntime.jsx("div", { className: "str-video__video-placeholder__initials-fallback", children: initials }));
|
|
566
570
|
};
|
|
567
571
|
|
|
568
|
-
const
|
|
572
|
+
const DefaultVideoPlaceholder = react.forwardRef(function DefaultVideoPlaceholder(props, ref) {
|
|
573
|
+
const { t } = videoReactBindings.useI18n();
|
|
574
|
+
return (jsxRuntime.jsx(BaseVideoPlaceholder, { ref: ref, ...props, children: t('Video is disabled') }));
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
const DefaultPictureInPicturePlaceholder = react.forwardRef(function DefaultPictureInPicturePlaceholder(props, ref) {
|
|
578
|
+
const { t } = videoReactBindings.useI18n();
|
|
579
|
+
return (jsxRuntime.jsx(BaseVideoPlaceholder, { ref: ref, ...props, children: t('Video is playing in a popup') }));
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
const Video$1 = ({ enabled = true, mirror, trackType, participant, className, VideoPlaceholder = DefaultVideoPlaceholder, PictureInPicturePlaceholder = DefaultPictureInPicturePlaceholder, refs, ...rest }) => {
|
|
569
583
|
const { sessionId, videoStream, screenShareStream, viewportVisibilityState, isLocalParticipant, userId, } = participant;
|
|
570
584
|
const call = videoReactBindings.useCall();
|
|
571
585
|
const [videoElement, setVideoElement] = react.useState(null);
|
|
572
586
|
// start with true, will flip once the video starts playing
|
|
573
587
|
const [isVideoPaused, setIsVideoPaused] = react.useState(true);
|
|
574
588
|
const [isWideMode, setIsWideMode] = react.useState(true);
|
|
589
|
+
const isPiP = usePictureInPictureState(videoElement ?? undefined);
|
|
575
590
|
const stream = trackType === 'videoTrack'
|
|
576
591
|
? videoStream
|
|
577
592
|
: trackType === 'screenShareTrack'
|
|
@@ -633,7 +648,7 @@ const Video$1 = ({ enabled = true, mirror, trackType, participant, className, Vi
|
|
|
633
648
|
}), "data-user-id": userId, "data-session-id": sessionId, ref: (element) => {
|
|
634
649
|
setVideoElement(element);
|
|
635
650
|
refs?.setVideoElement?.(element);
|
|
636
|
-
} })), (hasNoVideoOrInvisible || isVideoPaused) && VideoPlaceholder && (jsxRuntime.jsx(VideoPlaceholder, { style: { position: 'absolute' }, participant: participant, ref: refs?.setVideoPlaceholderElement }))] }));
|
|
651
|
+
} })), isPiP && (jsxRuntime.jsx(DefaultPictureInPicturePlaceholder, { style: { position: 'absolute' }, participant: participant })), (hasNoVideoOrInvisible || isVideoPaused) && VideoPlaceholder && (jsxRuntime.jsx(VideoPlaceholder, { style: { position: 'absolute' }, participant: participant, ref: refs?.setVideoPlaceholderElement }))] }));
|
|
637
652
|
};
|
|
638
653
|
Video$1.displayName = 'Video';
|
|
639
654
|
|
|
@@ -2083,7 +2098,7 @@ const SpeechIndicator = () => {
|
|
|
2083
2098
|
return (jsxRuntime.jsxs("span", { className: clsx('str-video__speech-indicator', isSpeaking && 'str-video__speech-indicator--speaking', isDominantSpeaker && 'str-video__speech-indicator--dominant'), children: [jsxRuntime.jsx("span", { className: "str-video__speech-indicator__bar" }), jsxRuntime.jsx("span", { className: "str-video__speech-indicator__bar" }), jsxRuntime.jsx("span", { className: "str-video__speech-indicator__bar" })] }));
|
|
2084
2099
|
};
|
|
2085
2100
|
|
|
2086
|
-
const ParticipantView = react.forwardRef(function ParticipantView({ participant, trackType = 'videoTrack', mirror, muteAudio, refs: { setVideoElement, setVideoPlaceholderElement } = {}, className, VideoPlaceholder, ParticipantViewUI = DefaultParticipantViewUI, }, ref) {
|
|
2101
|
+
const ParticipantView = react.forwardRef(function ParticipantView({ participant, trackType = 'videoTrack', mirror, muteAudio, refs: { setVideoElement, setVideoPlaceholderElement } = {}, className, VideoPlaceholder, PictureInPicturePlaceholder, ParticipantViewUI = DefaultParticipantViewUI, }, ref) {
|
|
2087
2102
|
const { isLocalParticipant, isSpeaking, isDominantSpeaker, sessionId } = participant;
|
|
2088
2103
|
const hasAudioTrack = videoClient.hasAudio(participant);
|
|
2089
2104
|
const hasVideoTrack = videoClient.hasVideo(participant);
|
|
@@ -2125,7 +2140,7 @@ const ParticipantView = react.forwardRef(function ParticipantView({ participant,
|
|
|
2125
2140
|
return (jsxRuntime.jsx("div", { "data-testid": "participant-view", ref: (element) => {
|
|
2126
2141
|
applyElementToRef(ref, element);
|
|
2127
2142
|
setTrackedElement(element);
|
|
2128
|
-
}, 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, enabled: isLocalParticipant ||
|
|
2143
|
+
}, 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, PictureInPicturePlaceholder: PictureInPicturePlaceholder, participant: participant, trackType: trackType, refs: videoRefs, enabled: isLocalParticipant ||
|
|
2129
2144
|
trackType !== 'videoTrack' ||
|
|
2130
2145
|
isParticipantVideoEnabled(participant.sessionId), mirror: mirror, autoPlay: true }), isComponentType(ParticipantViewUI) ? (jsxRuntime.jsx(ParticipantViewUI, {})) : (ParticipantViewUI)] }) }));
|
|
2131
2146
|
});
|
|
@@ -2378,12 +2393,12 @@ const formatDuration = (durationInMs) => {
|
|
|
2378
2393
|
};
|
|
2379
2394
|
|
|
2380
2395
|
const GROUP_SIZE = 16;
|
|
2381
|
-
const PaginatedGridLayoutGroup = ({ group, mirror, VideoPlaceholder, ParticipantViewUI, }) => {
|
|
2396
|
+
const PaginatedGridLayoutGroup = ({ group, mirror, VideoPlaceholder, PictureInPicturePlaceholder, ParticipantViewUI, }) => {
|
|
2382
2397
|
return (jsxRuntime.jsx("div", { className: clsx('str-video__paginated-grid-layout__group', {
|
|
2383
2398
|
'str-video__paginated-grid-layout--one': group.length === 1,
|
|
2384
2399
|
'str-video__paginated-grid-layout--two-four': group.length >= 2 && group.length <= 4,
|
|
2385
2400
|
'str-video__paginated-grid-layout--five-nine': group.length >= 5 && group.length <= 9,
|
|
2386
|
-
}), children: group.map((participant) => (jsxRuntime.jsx(ParticipantView, { participant: participant, muteAudio: true, mirror: mirror, VideoPlaceholder: VideoPlaceholder, ParticipantViewUI: ParticipantViewUI }, participant.sessionId))) }));
|
|
2401
|
+
}), children: group.map((participant) => (jsxRuntime.jsx(ParticipantView, { participant: participant, muteAudio: true, mirror: mirror, VideoPlaceholder: VideoPlaceholder, PictureInPicturePlaceholder: PictureInPicturePlaceholder, ParticipantViewUI: ParticipantViewUI }, participant.sessionId))) }));
|
|
2387
2402
|
};
|
|
2388
2403
|
const PaginatedGridLayout = (props) => {
|
|
2389
2404
|
const { groupSize = (props.groupSize || 0) > 0
|
|
@@ -2475,7 +2490,7 @@ hostElement, limit) => {
|
|
|
2475
2490
|
};
|
|
2476
2491
|
|
|
2477
2492
|
const DefaultParticipantViewUIBar = () => (jsxRuntime.jsx(DefaultParticipantViewUI, { menuPlacement: "top-end" }));
|
|
2478
|
-
const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, ParticipantViewUISpotlight = DefaultParticipantViewUI, VideoPlaceholder, participantsBarPosition = 'bottom', participantsBarLimit, mirrorLocalParticipantVideo = true, excludeLocalParticipant = false, pageArrowsVisible = true, }) => {
|
|
2493
|
+
const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, ParticipantViewUISpotlight = DefaultParticipantViewUI, VideoPlaceholder, PictureInPicturePlaceholder, participantsBarPosition = 'bottom', participantsBarLimit, mirrorLocalParticipantVideo = true, excludeLocalParticipant = false, pageArrowsVisible = true, }) => {
|
|
2479
2494
|
const call = videoReactBindings.useCall();
|
|
2480
2495
|
const { useParticipants, useRemoteParticipants } = videoReactBindings.useCallStateHooks();
|
|
2481
2496
|
const allParticipants = useParticipants();
|
|
@@ -2515,7 +2530,7 @@ const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, Par
|
|
|
2515
2530
|
const renderParticipantsBar = participantsBarPosition &&
|
|
2516
2531
|
(participantsWithAppliedLimit.length > 0 || isSpeakerScreenSharing);
|
|
2517
2532
|
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 &&
|
|
2518
|
-
`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, mirror: mirror, trackType: isSpeakerScreenSharing ? 'screenShareTrack' : 'videoTrack', ParticipantViewUI: ParticipantViewUISpotlight, VideoPlaceholder: VideoPlaceholder })) }), renderParticipantsBar && (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, mirror: mirror, 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, mirror: mirror, muteAudio: true }) }, participant.sessionId)))] }) }), pageArrowsVisible && isVertical && (jsxRuntime.jsx(VerticalScrollButtons, { scrollWrapper: participantsBarWrapperElement })), pageArrowsVisible && isHorizontal && (jsxRuntime.jsx(HorizontalScrollButtons, { scrollWrapper: participantsBarWrapperElement }))] }))] })] }));
|
|
2533
|
+
`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, mirror: mirror, trackType: isSpeakerScreenSharing ? 'screenShareTrack' : 'videoTrack', ParticipantViewUI: ParticipantViewUISpotlight, VideoPlaceholder: VideoPlaceholder, PictureInPicturePlaceholder: PictureInPicturePlaceholder })) }), renderParticipantsBar && (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, PictureInPicturePlaceholder: PictureInPicturePlaceholder, mirror: mirror, 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, PictureInPicturePlaceholder: PictureInPicturePlaceholder, mirror: mirror, muteAudio: true }) }, participant.sessionId)))] }) }), pageArrowsVisible && isVertical && (jsxRuntime.jsx(VerticalScrollButtons, { scrollWrapper: participantsBarWrapperElement })), pageArrowsVisible && isHorizontal && (jsxRuntime.jsx(HorizontalScrollButtons, { scrollWrapper: participantsBarWrapperElement }))] }))] })] }));
|
|
2519
2534
|
};
|
|
2520
2535
|
SpeakerLayout.displayName = 'SpeakerLayout';
|
|
2521
2536
|
const HorizontalScrollButtons = ({ scrollWrapper, }) => {
|
|
@@ -2561,7 +2576,7 @@ const LivestreamPlayer = (props) => {
|
|
|
2561
2576
|
return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
|
|
2562
2577
|
};
|
|
2563
2578
|
|
|
2564
|
-
const [major, minor, patch] = ("1.
|
|
2579
|
+
const [major, minor, patch] = ("1.7.0").split('.');
|
|
2565
2580
|
videoClient.setSdkInfo({
|
|
2566
2581
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2567
2582
|
major,
|