@stream-io/video-react-sdk 1.6.5 → 1.6.7
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 +19 -0
- package/dist/css/styles.css +1 -1
- package/dist/css/styles.css.map +1 -1
- package/dist/index.cjs.js +49 -31
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +49 -31
- 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/components/CallControls/CallControls.tsx +24 -7
- 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.es.js
CHANGED
|
@@ -393,11 +393,31 @@ const GenericMenuButtonItem = ({ children, ...rest }) => {
|
|
|
393
393
|
|
|
394
394
|
const Icon = ({ className, icon }) => (jsx("span", { className: clsx('str-video__icon', icon && `str-video__icon--${icon}`, className) }));
|
|
395
395
|
|
|
396
|
+
function usePictureInPictureState(videoElement) {
|
|
397
|
+
const [isPiP, setIsPiP] = useState(document.pictureInPictureElement === videoElement);
|
|
398
|
+
if (!videoElement && isPiP)
|
|
399
|
+
setIsPiP(false);
|
|
400
|
+
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] = useState(!!document.fullscreenElement);
|
|
399
|
-
const [pictureInPictureElement, setPictureInPictureElement] = useState(document.pictureInPictureElement);
|
|
400
419
|
const call = useCall();
|
|
420
|
+
const isPiP = usePictureInPictureState(videoElement ?? undefined);
|
|
401
421
|
const { t } = useI18n();
|
|
402
422
|
const { pin, sessionId, userId } = participant;
|
|
403
423
|
const hasAudioTrack = hasAudio(participant);
|
|
@@ -466,21 +486,8 @@ const ParticipantActionsContextMenu = () => {
|
|
|
466
486
|
document.removeEventListener('fullscreenchange', handleFullscreenChange);
|
|
467
487
|
};
|
|
468
488
|
}, []);
|
|
469
|
-
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 (jsxs(GenericMenu, { onItemClick: close, children: [jsxs(GenericMenuButtonItem, { onClick: toggleParticipantPin, disabled: pin && !pin.isLocalPin, children: [jsx(Icon, { icon: "pin" }), pin ? t('Unpin') : t('Pin')] }), jsxs(Restricted, { requiredGrants: [OwnCapability.PIN_FOR_EVERYONE], children: [jsxs(GenericMenuButtonItem, { onClick: pinForEveryone, disabled: pin && !pin.isLocalPin, children: [jsx(Icon, { icon: "pin" }), t('Pin for everyone')] }), jsxs(GenericMenuButtonItem, { onClick: unpinForEveryone, disabled: !pin || pin.isLocalPin, children: [jsx(Icon, { icon: "pin" }), t('Unpin for everyone')] })] }), jsx(Restricted, { requiredGrants: [OwnCapability.BLOCK_USERS], children: jsxs(GenericMenuButtonItem, { onClick: blockUser, children: [jsx(Icon, { icon: "not-allowed" }), t('Block')] }) }), jsxs(Restricted, { requiredGrants: [OwnCapability.MUTE_USERS], children: [hasVideoTrack && (jsxs(GenericMenuButtonItem, { onClick: muteVideo, children: [jsx(Icon, { icon: "camera-off-outline" }), t('Turn off video')] })), hasScreenShareTrack && (jsxs(GenericMenuButtonItem, { onClick: muteScreenShare, children: [jsx(Icon, { icon: "screen-share-off" }), t('Turn off screen share')] })), hasAudioTrack && (jsxs(GenericMenuButtonItem, { onClick: muteAudio, children: [jsx(Icon, { icon: "no-audio" }), t('Mute audio')] })), hasScreenShareAudioTrack && (jsxs(GenericMenuButtonItem, { onClick: muteScreenShareAudio, children: [jsx(Icon, { icon: "no-audio" }), t('Mute screen share audio')] }))] }), participantViewElement && (jsx(GenericMenuButtonItem, { onClick: toggleFullscreenMode, children: t('{{ direction }} fullscreen', {
|
|
492
499
|
direction: fullscreenModeOn ? t('Leave') : t('Enter'),
|
|
493
500
|
}) })), videoElement && document.pictureInPictureEnabled && (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
|
}) })), jsxs(Restricted, { requiredGrants: [OwnCapability.UPDATE_CALL_PERMISSIONS], children: [jsx(GenericMenuButtonItem, { onClick: grantPermission(OwnCapability.SEND_AUDIO), children: t('Allow audio') }), jsx(GenericMenuButtonItem, { onClick: grantPermission(OwnCapability.SEND_VIDEO), children: t('Allow video') }), jsx(GenericMenuButtonItem, { onClick: grantPermission(OwnCapability.SCREENSHARE), children: t('Allow screen sharing') }), jsx(GenericMenuButtonItem, { onClick: revokePermission(OwnCapability.SEND_AUDIO), children: t('Disable audio') }), jsx(GenericMenuButtonItem, { onClick: revokePermission(OwnCapability.SEND_VIDEO), children: t('Disable video') }), jsx(GenericMenuButtonItem, { onClick: revokePermission(OwnCapability.SCREENSHARE), children: t('Disable screen sharing') })] })] }));
|
|
498
503
|
};
|
|
499
504
|
|
|
@@ -548,12 +553,11 @@ const BaseVideo = forwardRef(function BaseVideo({ stream, ...rest }, ref) {
|
|
|
548
553
|
} }));
|
|
549
554
|
});
|
|
550
555
|
|
|
551
|
-
const
|
|
552
|
-
const { t } = useI18n();
|
|
556
|
+
const BaseVideoPlaceholder = forwardRef(function DefaultVideoPlaceholder({ participant, style, children }, ref) {
|
|
553
557
|
const [error, setError] = useState(false);
|
|
554
558
|
const name = participant.name || participant.userId;
|
|
555
559
|
return (jsxs("div", { className: "str-video__video-placeholder", style: style, ref: ref, children: [(!participant.image || error) &&
|
|
556
|
-
(name ? (jsx(InitialsFallback, { name: name })) : (jsx("div", { className: "str-video__video-placeholder__no-video-label", children:
|
|
560
|
+
(name ? (jsx(InitialsFallback, { name: name })) : (jsx("div", { className: "str-video__video-placeholder__no-video-label", children: children }))), participant.image && !error && (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 (jsx("div", { className: "str-video__video-placeholder__initials-fallback", children: initials }));
|
|
566
570
|
};
|
|
567
571
|
|
|
568
|
-
const
|
|
572
|
+
const DefaultVideoPlaceholder = forwardRef(function DefaultVideoPlaceholder(props, ref) {
|
|
573
|
+
const { t } = useI18n();
|
|
574
|
+
return (jsx(BaseVideoPlaceholder, { ref: ref, ...props, children: t('Video is disabled') }));
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
const DefaultPictureInPicturePlaceholder = forwardRef(function DefaultPictureInPicturePlaceholder(props, ref) {
|
|
578
|
+
const { t } = useI18n();
|
|
579
|
+
return (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 = useCall();
|
|
571
585
|
const [videoElement, setVideoElement] = useState(null);
|
|
572
586
|
// start with true, will flip once the video starts playing
|
|
573
587
|
const [isVideoPaused, setIsVideoPaused] = useState(true);
|
|
574
588
|
const [isWideMode, setIsWideMode] = 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 && (jsx(VideoPlaceholder, { style: { position: 'absolute' }, participant: participant, ref: refs?.setVideoPlaceholderElement }))] }));
|
|
651
|
+
} })), isPiP && (jsx(DefaultPictureInPicturePlaceholder, { style: { position: 'absolute' }, participant: participant })), (hasNoVideoOrInvisible || isVideoPaused) && VideoPlaceholder && (jsx(VideoPlaceholder, { style: { position: 'absolute' }, participant: participant, ref: refs?.setVideoPlaceholderElement }))] }));
|
|
637
652
|
};
|
|
638
653
|
Video$1.displayName = 'Video';
|
|
639
654
|
|
|
@@ -1437,7 +1452,10 @@ const CancelCallButton = ({ disabled, caption, onClick, onLeave, }) => {
|
|
|
1437
1452
|
return (jsx(IconButton, { disabled: disabled, icon: "call-end", variant: "danger", title: caption ?? t('Leave call'), "data-testid": "cancel-call-button", onClick: handleClick }));
|
|
1438
1453
|
};
|
|
1439
1454
|
|
|
1440
|
-
const CallControls = ({ onLeave }) => (jsxs("div", { className: "str-video__call-controls", children: [jsx(SpeakingWhileMutedNotification, { children: jsx(ToggleAudioPublishingButton, {}) }), jsx(
|
|
1455
|
+
const CallControls = ({ onLeave }) => (jsxs("div", { className: "str-video__call-controls", children: [jsx(Restricted, { requiredGrants: [OwnCapability.SEND_AUDIO], children: jsx(SpeakingWhileMutedNotification, { children: jsx(ToggleAudioPublishingButton, {}) }) }), jsx(Restricted, { requiredGrants: [OwnCapability.SEND_VIDEO], children: jsx(ToggleVideoPublishingButton, {}) }), jsx(Restricted, { requiredGrants: [OwnCapability.CREATE_REACTION], children: jsx(ReactionsButton, {}) }), jsx(Restricted, { requiredGrants: [OwnCapability.SCREENSHARE], children: jsx(ScreenShareButton, {}) }), jsx(Restricted, { requiredGrants: [
|
|
1456
|
+
OwnCapability.START_RECORD_CALL,
|
|
1457
|
+
OwnCapability.STOP_RECORD_CALL,
|
|
1458
|
+
], children: jsx(RecordCallButton, {}) }), jsx(CancelCallButton, { onLeave: onLeave })] }));
|
|
1441
1459
|
|
|
1442
1460
|
const CallStatsLatencyChart = lazy(() => import('./latency-chart-Bj5OSYzg.es.js'));
|
|
1443
1461
|
var Status;
|
|
@@ -2080,7 +2098,7 @@ const SpeechIndicator = () => {
|
|
|
2080
2098
|
return (jsxs("span", { className: clsx('str-video__speech-indicator', isSpeaking && 'str-video__speech-indicator--speaking', isDominantSpeaker && 'str-video__speech-indicator--dominant'), children: [jsx("span", { className: "str-video__speech-indicator__bar" }), jsx("span", { className: "str-video__speech-indicator__bar" }), jsx("span", { className: "str-video__speech-indicator__bar" })] }));
|
|
2081
2099
|
};
|
|
2082
2100
|
|
|
2083
|
-
const ParticipantView = forwardRef(function ParticipantView({ participant, trackType = 'videoTrack', mirror, muteAudio, refs: { setVideoElement, setVideoPlaceholderElement } = {}, className, VideoPlaceholder, ParticipantViewUI = DefaultParticipantViewUI, }, ref) {
|
|
2101
|
+
const ParticipantView = forwardRef(function ParticipantView({ participant, trackType = 'videoTrack', mirror, muteAudio, refs: { setVideoElement, setVideoPlaceholderElement } = {}, className, VideoPlaceholder, PictureInPicturePlaceholder, ParticipantViewUI = DefaultParticipantViewUI, }, ref) {
|
|
2084
2102
|
const { isLocalParticipant, isSpeaking, isDominantSpeaker, sessionId } = participant;
|
|
2085
2103
|
const hasAudioTrack = hasAudio(participant);
|
|
2086
2104
|
const hasVideoTrack = hasVideo(participant);
|
|
@@ -2122,7 +2140,7 @@ const ParticipantView = forwardRef(function ParticipantView({ participant, track
|
|
|
2122
2140
|
return (jsx("div", { "data-testid": "participant-view", ref: (element) => {
|
|
2123
2141
|
applyElementToRef(ref, element);
|
|
2124
2142
|
setTrackedElement(element);
|
|
2125
|
-
}, 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: jsxs(ParticipantViewContext.Provider, { value: participantViewContextValue, children: [!isLocalParticipant && !muteAudio && (jsxs(Fragment, { children: [hasAudioTrack && (jsx(Audio, { participant: participant, trackType: "audioTrack" })), hasScreenShareAudioTrack && (jsx(Audio, { participant: participant, trackType: "screenShareAudioTrack" }))] })), 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: jsxs(ParticipantViewContext.Provider, { value: participantViewContextValue, children: [!isLocalParticipant && !muteAudio && (jsxs(Fragment, { children: [hasAudioTrack && (jsx(Audio, { participant: participant, trackType: "audioTrack" })), hasScreenShareAudioTrack && (jsx(Audio, { participant: participant, trackType: "screenShareAudioTrack" }))] })), jsx(Video$1, { VideoPlaceholder: VideoPlaceholder, PictureInPicturePlaceholder: PictureInPicturePlaceholder, participant: participant, trackType: trackType, refs: videoRefs, enabled: isLocalParticipant ||
|
|
2126
2144
|
trackType !== 'videoTrack' ||
|
|
2127
2145
|
isParticipantVideoEnabled(participant.sessionId), mirror: mirror, autoPlay: true }), isComponentType(ParticipantViewUI) ? (jsx(ParticipantViewUI, {})) : (ParticipantViewUI)] }) }));
|
|
2128
2146
|
});
|
|
@@ -2375,12 +2393,12 @@ const formatDuration = (durationInMs) => {
|
|
|
2375
2393
|
};
|
|
2376
2394
|
|
|
2377
2395
|
const GROUP_SIZE = 16;
|
|
2378
|
-
const PaginatedGridLayoutGroup = ({ group, mirror, VideoPlaceholder, ParticipantViewUI, }) => {
|
|
2396
|
+
const PaginatedGridLayoutGroup = ({ group, mirror, VideoPlaceholder, PictureInPicturePlaceholder, ParticipantViewUI, }) => {
|
|
2379
2397
|
return (jsx("div", { className: clsx('str-video__paginated-grid-layout__group', {
|
|
2380
2398
|
'str-video__paginated-grid-layout--one': group.length === 1,
|
|
2381
2399
|
'str-video__paginated-grid-layout--two-four': group.length >= 2 && group.length <= 4,
|
|
2382
2400
|
'str-video__paginated-grid-layout--five-nine': group.length >= 5 && group.length <= 9,
|
|
2383
|
-
}), children: group.map((participant) => (jsx(ParticipantView, { participant: participant, muteAudio: true, mirror: mirror, VideoPlaceholder: VideoPlaceholder, ParticipantViewUI: ParticipantViewUI }, participant.sessionId))) }));
|
|
2401
|
+
}), children: group.map((participant) => (jsx(ParticipantView, { participant: participant, muteAudio: true, mirror: mirror, VideoPlaceholder: VideoPlaceholder, PictureInPicturePlaceholder: PictureInPicturePlaceholder, ParticipantViewUI: ParticipantViewUI }, participant.sessionId))) }));
|
|
2384
2402
|
};
|
|
2385
2403
|
const PaginatedGridLayout = (props) => {
|
|
2386
2404
|
const { groupSize = (props.groupSize || 0) > 0
|
|
@@ -2472,7 +2490,7 @@ hostElement, limit) => {
|
|
|
2472
2490
|
};
|
|
2473
2491
|
|
|
2474
2492
|
const DefaultParticipantViewUIBar = () => (jsx(DefaultParticipantViewUI, { menuPlacement: "top-end" }));
|
|
2475
|
-
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, }) => {
|
|
2476
2494
|
const call = useCall();
|
|
2477
2495
|
const { useParticipants, useRemoteParticipants } = useCallStateHooks();
|
|
2478
2496
|
const allParticipants = useParticipants();
|
|
@@ -2512,7 +2530,7 @@ const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, Par
|
|
|
2512
2530
|
const renderParticipantsBar = participantsBarPosition &&
|
|
2513
2531
|
(participantsWithAppliedLimit.length > 0 || isSpeakerScreenSharing);
|
|
2514
2532
|
return (jsxs("div", { className: "str-video__speaker-layout__wrapper", children: [jsx(ParticipantsAudio, { participants: remoteParticipants }), jsxs("div", { className: clsx('str-video__speaker-layout', participantsBarPosition &&
|
|
2515
|
-
`str-video__speaker-layout--variant-${participantsBarPosition}`), children: [jsx("div", { className: "str-video__speaker-layout__spotlight", children: participantInSpotlight && (jsx(ParticipantView, { participant: participantInSpotlight, muteAudio: true, mirror: mirror, trackType: isSpeakerScreenSharing ? 'screenShareTrack' : 'videoTrack', ParticipantViewUI: ParticipantViewUISpotlight, VideoPlaceholder: VideoPlaceholder })) }), renderParticipantsBar && (jsxs("div", { ref: setButtonsWrapperElement, className: "str-video__speaker-layout__participants-bar-buttons-wrapper", children: [jsx("div", { className: "str-video__speaker-layout__participants-bar-wrapper", ref: setParticipantsBarWrapperElement, children: jsxs("div", { ref: setParticipantsBarElement, className: "str-video__speaker-layout__participants-bar", children: [isSpeakerScreenSharing && (jsx("div", { className: "str-video__speaker-layout__participant-tile", children: jsx(ParticipantView, { participant: participantInSpotlight, ParticipantViewUI: ParticipantViewUIBar, VideoPlaceholder: VideoPlaceholder, mirror: mirror, muteAudio: true }) }, participantInSpotlight.sessionId)), participantsWithAppliedLimit.map((participant) => (jsx("div", { className: "str-video__speaker-layout__participant-tile", children: jsx(ParticipantView, { participant: participant, ParticipantViewUI: ParticipantViewUIBar, VideoPlaceholder: VideoPlaceholder, mirror: mirror, muteAudio: true }) }, participant.sessionId)))] }) }), pageArrowsVisible && isVertical && (jsx(VerticalScrollButtons, { scrollWrapper: participantsBarWrapperElement })), pageArrowsVisible && isHorizontal && (jsx(HorizontalScrollButtons, { scrollWrapper: participantsBarWrapperElement }))] }))] })] }));
|
|
2533
|
+
`str-video__speaker-layout--variant-${participantsBarPosition}`), children: [jsx("div", { className: "str-video__speaker-layout__spotlight", children: participantInSpotlight && (jsx(ParticipantView, { participant: participantInSpotlight, muteAudio: true, mirror: mirror, trackType: isSpeakerScreenSharing ? 'screenShareTrack' : 'videoTrack', ParticipantViewUI: ParticipantViewUISpotlight, VideoPlaceholder: VideoPlaceholder, PictureInPicturePlaceholder: PictureInPicturePlaceholder })) }), renderParticipantsBar && (jsxs("div", { ref: setButtonsWrapperElement, className: "str-video__speaker-layout__participants-bar-buttons-wrapper", children: [jsx("div", { className: "str-video__speaker-layout__participants-bar-wrapper", ref: setParticipantsBarWrapperElement, children: jsxs("div", { ref: setParticipantsBarElement, className: "str-video__speaker-layout__participants-bar", children: [isSpeakerScreenSharing && (jsx("div", { className: "str-video__speaker-layout__participant-tile", children: jsx(ParticipantView, { participant: participantInSpotlight, ParticipantViewUI: ParticipantViewUIBar, VideoPlaceholder: VideoPlaceholder, PictureInPicturePlaceholder: PictureInPicturePlaceholder, mirror: mirror, muteAudio: true }) }, participantInSpotlight.sessionId)), participantsWithAppliedLimit.map((participant) => (jsx("div", { className: "str-video__speaker-layout__participant-tile", children: jsx(ParticipantView, { participant: participant, ParticipantViewUI: ParticipantViewUIBar, VideoPlaceholder: VideoPlaceholder, PictureInPicturePlaceholder: PictureInPicturePlaceholder, mirror: mirror, muteAudio: true }) }, participant.sessionId)))] }) }), pageArrowsVisible && isVertical && (jsx(VerticalScrollButtons, { scrollWrapper: participantsBarWrapperElement })), pageArrowsVisible && isHorizontal && (jsx(HorizontalScrollButtons, { scrollWrapper: participantsBarWrapperElement }))] }))] })] }));
|
|
2516
2534
|
};
|
|
2517
2535
|
SpeakerLayout.displayName = 'SpeakerLayout';
|
|
2518
2536
|
const HorizontalScrollButtons = ({ scrollWrapper, }) => {
|
|
@@ -2558,7 +2576,7 @@ const LivestreamPlayer = (props) => {
|
|
|
2558
2576
|
return (jsx(StreamCall, { call: call, children: jsx(LivestreamLayout, { ...layoutProps }) }));
|
|
2559
2577
|
};
|
|
2560
2578
|
|
|
2561
|
-
const [major, minor, patch] = ("1.6.
|
|
2579
|
+
const [major, minor, patch] = ("1.6.7").split('.');
|
|
2562
2580
|
setSdkInfo({
|
|
2563
2581
|
type: SfuModels.SdkType.REACT,
|
|
2564
2582
|
major,
|