@stream-io/video-react-sdk 1.0.6 → 1.0.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 +11 -0
- package/dist/index.cjs.js +35 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +36 -38
- package/dist/index.es.js.map +1 -1
- package/package.json +3 -3
- package/src/components/CallParticipantsList/CallParticipantListingItem.tsx +10 -9
- package/src/core/components/Audio/ParticipantsAudio.tsx +10 -13
- package/src/core/components/CallLayout/LivestreamLayout.tsx +5 -7
- package/src/core/components/CallLayout/SpeakerLayout.tsx +3 -5
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +12 -12
- package/src/core/components/ParticipantView/ParticipantActionsContextMenu.tsx +16 -14
- package/src/core/components/ParticipantView/ParticipantView.tsx +12 -17
- package/src/core/components/Video/Video.tsx +4 -4
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
|
+
### [1.0.7](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.0.6...@stream-io/video-react-sdk-1.0.7) (2024-05-16)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@stream-io/video-client` updated to version `1.0.6`
|
|
10
|
+
* `@stream-io/video-react-bindings` updated to version `0.4.32`
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **state:** aligns the participant state with other SDKs ([#1357](https://github.com/GetStream/stream-video-js/issues/1357)) ([146e6ac](https://github.com/GetStream/stream-video-js/commit/146e6acd7296488bc18f4bf5c76e9f2c9bfd97af))
|
|
15
|
+
|
|
5
16
|
### [1.0.6](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.0.5...@stream-io/video-react-sdk-1.0.6) (2024-05-16)
|
|
6
17
|
|
|
7
18
|
### Dependency Updates
|
package/dist/index.cjs.js
CHANGED
|
@@ -30,11 +30,11 @@ const ParticipantsAudio = (props) => {
|
|
|
30
30
|
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: participants.map((participant) => {
|
|
31
31
|
if (participant.isLocalParticipant)
|
|
32
32
|
return null;
|
|
33
|
-
const {
|
|
34
|
-
const
|
|
35
|
-
const audioTrackElement =
|
|
36
|
-
const
|
|
37
|
-
const screenShareAudioTrackElement =
|
|
33
|
+
const { audioStream, screenShareAudioStream, sessionId } = participant;
|
|
34
|
+
const hasAudioTrack = videoClient.hasAudio(participant);
|
|
35
|
+
const audioTrackElement = hasAudioTrack && audioStream && (jsxRuntime.jsx(Audio, { ...audioProps, trackType: "audioTrack", participant: participant }));
|
|
36
|
+
const hasScreenShareAudioTrack = videoClient.hasScreenShareAudio(participant);
|
|
37
|
+
const screenShareAudioTrackElement = hasScreenShareAudioTrack &&
|
|
38
38
|
screenShareAudioStream && (jsxRuntime.jsx(Audio, { ...audioProps, trackType: "screenShareAudioTrack", participant: participant }));
|
|
39
39
|
return (jsxRuntime.jsxs(react.Fragment, { children: [audioTrackElement, screenShareAudioTrackElement] }, sessionId));
|
|
40
40
|
}) }));
|
|
@@ -1372,11 +1372,11 @@ const WithTooltip = ({ title, tooltipClassName, tooltipPlacement, ...props }) =>
|
|
|
1372
1372
|
};
|
|
1373
1373
|
|
|
1374
1374
|
const CallParticipantListingItem = ({ participant, DisplayName = DefaultDisplayName, }) => {
|
|
1375
|
-
const isAudioOn =
|
|
1376
|
-
const isVideoOn =
|
|
1377
|
-
const
|
|
1375
|
+
const isAudioOn = videoClient.hasAudio(participant);
|
|
1376
|
+
const isVideoOn = videoClient.hasVideo(participant);
|
|
1377
|
+
const isPinnedOn = videoClient.isPinned(participant);
|
|
1378
1378
|
const { t } = videoReactBindings.useI18n();
|
|
1379
|
-
return (jsxRuntime.jsxs("div", { className: "str-video__participant-listing-item", children: [jsxRuntime.jsx(Avatar, { name: participant.name, imageSrc: participant.image }), jsxRuntime.jsx(DisplayName, { participant: participant }), jsxRuntime.jsxs("div", { className: "str-video__participant-listing-item__media-indicator-group", children: [jsxRuntime.jsx(MediaIndicator, { title: isAudioOn ? t('Microphone on') : t('Microphone off'), className: clsx('str-video__participant-listing-item__icon', `str-video__participant-listing-item__icon-${isAudioOn ? 'mic' : 'mic-off'}`) }), jsxRuntime.jsx(MediaIndicator, { title: isVideoOn ? t('Camera on') : t('Camera off'), className: clsx('str-video__participant-listing-item__icon', `str-video__participant-listing-item__icon-${isVideoOn ? 'camera' : 'camera-off'}`) }),
|
|
1379
|
+
return (jsxRuntime.jsxs("div", { className: "str-video__participant-listing-item", children: [jsxRuntime.jsx(Avatar, { name: participant.name, imageSrc: participant.image }), jsxRuntime.jsx(DisplayName, { participant: participant }), jsxRuntime.jsxs("div", { className: "str-video__participant-listing-item__media-indicator-group", children: [jsxRuntime.jsx(MediaIndicator, { title: isAudioOn ? t('Microphone on') : t('Microphone off'), className: clsx('str-video__participant-listing-item__icon', `str-video__participant-listing-item__icon-${isAudioOn ? 'mic' : 'mic-off'}`) }), jsxRuntime.jsx(MediaIndicator, { title: isVideoOn ? t('Camera on') : t('Camera off'), className: clsx('str-video__participant-listing-item__icon', `str-video__participant-listing-item__icon-${isVideoOn ? 'camera' : 'camera-off'}`) }), isPinnedOn && (jsxRuntime.jsx(MediaIndicator, { title: t('Pinned'), className: clsx('str-video__participant-listing-item__icon', 'str-video__participant-listing-item__icon-pinned') })), jsxRuntime.jsx(MenuToggle, { placement: "bottom-end", ToggleButton: ToggleButton$2, children: jsxRuntime.jsx(ParticipantViewContext.Provider, { value: { participant, trackType: 'none' }, children: jsxRuntime.jsx(ParticipantActionsContextMenu, {}) }) })] })] }));
|
|
1380
1380
|
};
|
|
1381
1381
|
const MediaIndicator = (props) => (jsxRuntime.jsx(WithTooltip, { ...props }));
|
|
1382
1382
|
const DefaultDisplayName = ({ participant }) => {
|
|
@@ -1787,7 +1787,7 @@ const InitialsFallback = (props) => {
|
|
|
1787
1787
|
};
|
|
1788
1788
|
|
|
1789
1789
|
const Video$1 = ({ trackType, participant, className, VideoPlaceholder = DefaultVideoPlaceholder, refs, ...rest }) => {
|
|
1790
|
-
const { sessionId, videoStream, screenShareStream,
|
|
1790
|
+
const { sessionId, videoStream, screenShareStream, viewportVisibilityState, isLocalParticipant, userId, } = participant;
|
|
1791
1791
|
const call = videoReactBindings.useCall();
|
|
1792
1792
|
const [videoElement, setVideoElement] = react.useState(null);
|
|
1793
1793
|
// start with true, will flip once the video starts playing
|
|
@@ -1835,9 +1835,9 @@ const Video$1 = ({ trackType, participant, className, VideoPlaceholder = Default
|
|
|
1835
1835
|
if (!call)
|
|
1836
1836
|
return null;
|
|
1837
1837
|
const isPublishingTrack = trackType === 'videoTrack'
|
|
1838
|
-
?
|
|
1838
|
+
? videoClient.hasVideo(participant)
|
|
1839
1839
|
: trackType === 'screenShareTrack'
|
|
1840
|
-
?
|
|
1840
|
+
? videoClient.hasScreenShare(participant)
|
|
1841
1841
|
: false;
|
|
1842
1842
|
const isInvisible = trackType === 'none' ||
|
|
1843
1843
|
viewportVisibilityState?.[trackType] === videoClient.VisibilityState.INVISIBLE;
|
|
@@ -1921,11 +1921,11 @@ const ParticipantActionsContextMenu = () => {
|
|
|
1921
1921
|
const [pictureInPictureElement, setPictureInPictureElement] = react.useState(document.pictureInPictureElement);
|
|
1922
1922
|
const call = videoReactBindings.useCall();
|
|
1923
1923
|
const { t } = videoReactBindings.useI18n();
|
|
1924
|
-
const { pin,
|
|
1925
|
-
const
|
|
1926
|
-
const
|
|
1927
|
-
const
|
|
1928
|
-
const
|
|
1924
|
+
const { pin, sessionId, userId } = participant;
|
|
1925
|
+
const hasAudioTrack = videoClient.hasAudio(participant);
|
|
1926
|
+
const hasVideoTrack = videoClient.hasVideo(participant);
|
|
1927
|
+
const hasScreenShareTrack = videoClient.hasScreenShare(participant);
|
|
1928
|
+
const hasScreenShareAudioTrack = videoClient.hasScreenShareAudio(participant);
|
|
1929
1929
|
const blockUser = () => call?.blockUser(userId);
|
|
1930
1930
|
const muteAudio = () => call?.muteUser(userId, 'audio');
|
|
1931
1931
|
const muteVideo = () => call?.muteUser(userId, 'video');
|
|
@@ -2010,7 +2010,7 @@ const ParticipantActionsContextMenu = () => {
|
|
|
2010
2010
|
return document.exitPictureInPicture().catch(console.error);
|
|
2011
2011
|
};
|
|
2012
2012
|
const { close } = useMenuContext() || {};
|
|
2013
|
-
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: [
|
|
2013
|
+
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', {
|
|
2014
2014
|
direction: fullscreenModeOn ? t('Leave') : t('Enter'),
|
|
2015
2015
|
}) })), videoElement && document.pictureInPictureEnabled && (jsxRuntime.jsx(GenericMenuButtonItem, { onClick: togglePictureInPicture, children: t('{{ direction }} picture-in-picture', {
|
|
2016
2016
|
direction: pictureInPictureElement === videoElement
|
|
@@ -2045,10 +2045,9 @@ const DefaultScreenShareOverlay = () => {
|
|
|
2045
2045
|
};
|
|
2046
2046
|
const DefaultParticipantViewUI = ({ indicatorsVisible = true, menuPlacement = 'bottom-start', showMenuButton = true, ParticipantActionsContextMenu: ParticipantActionsContextMenu$1 = ParticipantActionsContextMenu, }) => {
|
|
2047
2047
|
const { participant, trackType } = useParticipantViewContext();
|
|
2048
|
-
const
|
|
2049
|
-
const hasScreenShare = publishedTracks.includes(videoClient.SfuModels.TrackType.SCREEN_SHARE);
|
|
2048
|
+
const isScreenSharing = videoClient.hasScreenShare(participant);
|
|
2050
2049
|
if (participant.isLocalParticipant &&
|
|
2051
|
-
|
|
2050
|
+
isScreenSharing &&
|
|
2052
2051
|
trackType === 'screenShareTrack') {
|
|
2053
2052
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DefaultScreenShareOverlay, {}), jsxRuntime.jsx(ParticipantDetails, { indicatorsVisible: indicatorsVisible })] }));
|
|
2054
2053
|
}
|
|
@@ -2056,15 +2055,15 @@ const DefaultParticipantViewUI = ({ indicatorsVisible = true, menuPlacement = 'b
|
|
|
2056
2055
|
};
|
|
2057
2056
|
const ParticipantDetails = ({ indicatorsVisible = true, }) => {
|
|
2058
2057
|
const { participant } = useParticipantViewContext();
|
|
2059
|
-
const { isLocalParticipant, connectionQuality,
|
|
2058
|
+
const { isLocalParticipant, connectionQuality, pin, sessionId, name, userId, } = participant;
|
|
2060
2059
|
const call = videoReactBindings.useCall();
|
|
2061
2060
|
const { t } = videoReactBindings.useI18n();
|
|
2062
2061
|
const connectionQualityAsString = !!connectionQuality &&
|
|
2063
2062
|
videoClient.SfuModels.ConnectionQuality[connectionQuality].toLowerCase();
|
|
2064
|
-
const
|
|
2065
|
-
const
|
|
2063
|
+
const hasAudioTrack = videoClient.hasAudio(participant);
|
|
2064
|
+
const hasVideoTrack = videoClient.hasVideo(participant);
|
|
2066
2065
|
const canUnpin = !!pin && pin.isLocalPin;
|
|
2067
|
-
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 && !
|
|
2066
|
+
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 && canUnpin && (
|
|
2068
2067
|
// TODO: remove this monstrosity once we have a proper design
|
|
2069
2068
|
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 &&
|
|
2070
2069
|
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 })) }))] }));
|
|
@@ -2076,10 +2075,10 @@ const SpeechIndicator = () => {
|
|
|
2076
2075
|
};
|
|
2077
2076
|
|
|
2078
2077
|
const ParticipantView = react.forwardRef(function ParticipantView({ participant, trackType = 'videoTrack', muteAudio, refs: { setVideoElement, setVideoPlaceholderElement } = {}, className, VideoPlaceholder, ParticipantViewUI = DefaultParticipantViewUI, }, ref) {
|
|
2079
|
-
const { isLocalParticipant, isSpeaking, isDominantSpeaker,
|
|
2080
|
-
const
|
|
2081
|
-
const
|
|
2082
|
-
const
|
|
2078
|
+
const { isLocalParticipant, isSpeaking, isDominantSpeaker, sessionId } = participant;
|
|
2079
|
+
const hasAudioTrack = videoClient.hasAudio(participant);
|
|
2080
|
+
const hasVideoTrack = videoClient.hasVideo(participant);
|
|
2081
|
+
const hasScreenShareAudioTrack = videoClient.hasScreenShareAudio(participant);
|
|
2083
2082
|
const [trackedElement, setTrackedElement] = react.useState(null);
|
|
2084
2083
|
const [contextVideoElement, setContextVideoElement] = react.useState(null);
|
|
2085
2084
|
const [contextVideoPlaceholderElement, setContextVideoPlaceholderElement] = react.useState(null);
|
|
@@ -2115,7 +2114,7 @@ const ParticipantView = react.forwardRef(function ParticipantView({ participant,
|
|
|
2115
2114
|
return (jsxRuntime.jsx("div", { "data-testid": "participant-view", ref: (element) => {
|
|
2116
2115
|
applyElementToRef(ref, element);
|
|
2117
2116
|
setTrackedElement(element);
|
|
2118
|
-
}, className: clsx('str-video__participant-view', isDominantSpeaker && 'str-video__participant-view--dominant-speaker', isSpeaking && 'str-video__participant-view--speaking', !
|
|
2117
|
+
}, 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, autoPlay: true }), isComponentType(ParticipantViewUI) ? (jsxRuntime.jsx(ParticipantViewUI, {})) : (ParticipantViewUI)] }) }));
|
|
2119
2118
|
});
|
|
2120
2119
|
|
|
2121
2120
|
// re-exporting the StreamCallProvider as StreamCall
|
|
@@ -2284,12 +2283,13 @@ const loggedIn = (a, b) => {
|
|
|
2284
2283
|
const LivestreamLayout = (props) => {
|
|
2285
2284
|
const { useParticipants, useRemoteParticipants, useHasOngoingScreenShare } = videoReactBindings.useCallStateHooks();
|
|
2286
2285
|
const call = videoReactBindings.useCall();
|
|
2287
|
-
const
|
|
2286
|
+
const participants = useParticipants();
|
|
2287
|
+
const [currentSpeaker] = participants;
|
|
2288
2288
|
const remoteParticipants = useRemoteParticipants();
|
|
2289
2289
|
const hasOngoingScreenShare = useHasOngoingScreenShare();
|
|
2290
2290
|
const presenter = hasOngoingScreenShare
|
|
2291
|
-
? hasScreenShare
|
|
2292
|
-
:
|
|
2291
|
+
? participants.find(videoClient.hasScreenShare)
|
|
2292
|
+
: undefined;
|
|
2293
2293
|
usePaginatedLayoutSortPreset(call);
|
|
2294
2294
|
const Overlay = (jsxRuntime.jsx(ParticipantOverlay, { showParticipantCount: props.showParticipantCount, showDuration: props.showDuration, showLiveBadge: props.showLiveBadge, showSpeakerName: props.showSpeakerName }));
|
|
2295
2295
|
const { floatingParticipantProps } = props;
|
|
@@ -2303,7 +2303,6 @@ const LivestreamLayout = (props) => {
|
|
|
2303
2303
|
clsx('str-video__livestream-layout__floating-participant', `str-video__livestream-layout__floating-participant--${floatingParticipantProps?.position ?? 'top-right'}`)), participant: currentSpeaker, ParticipantViewUI: FloatingParticipantOverlay || Overlay, muteAudio // audio is rendered by ParticipantsAudio
|
|
2304
2304
|
: true }))] }));
|
|
2305
2305
|
};
|
|
2306
|
-
const hasScreenShare$1 = (p) => !!p?.publishedTracks.includes(videoClient.SfuModels.TrackType.SCREEN_SHARE);
|
|
2307
2306
|
const ParticipantOverlay = (props) => {
|
|
2308
2307
|
const { enableFullScreen = true, showParticipantCount = true, showDuration = true, showLiveBadge = true, showSpeakerName = false, } = props;
|
|
2309
2308
|
const { participant } = useParticipantViewContext();
|
|
@@ -2467,7 +2466,7 @@ const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, Par
|
|
|
2467
2466
|
const [participantsBarWrapperElement, setParticipantsBarWrapperElement] = react.useState(null);
|
|
2468
2467
|
const [participantsBarElement, setParticipantsBarElement] = react.useState(null);
|
|
2469
2468
|
const [buttonsWrapperElement, setButtonsWrapperElement] = react.useState(null);
|
|
2470
|
-
const isSpeakerScreenSharing = hasScreenShare(participantInSpotlight);
|
|
2469
|
+
const isSpeakerScreenSharing = participantInSpotlight && videoClient.hasScreenShare(participantInSpotlight);
|
|
2471
2470
|
const hardLimit = useCalculateHardLimit(buttonsWrapperElement, participantsBarElement, participantsBarLimit);
|
|
2472
2471
|
const isVertical = participantsBarPosition === 'left' || participantsBarPosition === 'right';
|
|
2473
2472
|
const isHorizontal = participantsBarPosition === 'top' || participantsBarPosition === 'bottom';
|
|
@@ -2515,9 +2514,8 @@ const VerticalScrollButtons = ({ scrollWrapper, }) => {
|
|
|
2515
2514
|
};
|
|
2516
2515
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [scrollPosition && scrollPosition !== 'top' && (jsxRuntime.jsx(IconButton, { onClick: scrollTopClickHandler, icon: "caret-up", className: "str-video__speaker-layout__participants-bar--button-top" })), scrollPosition && scrollPosition !== 'bottom' && (jsxRuntime.jsx(IconButton, { onClick: scrollBottomClickHandler, icon: "caret-down", className: "str-video__speaker-layout__participants-bar--button-bottom" }))] }));
|
|
2517
2516
|
};
|
|
2518
|
-
const hasScreenShare = (p) => !!p?.publishedTracks.includes(videoClient.SfuModels.TrackType.SCREEN_SHARE);
|
|
2519
2517
|
|
|
2520
|
-
const [major, minor, patch] = ("1.0.
|
|
2518
|
+
const [major, minor, patch] = ("1.0.7" ).split('.');
|
|
2521
2519
|
videoClient.setSdkInfo({
|
|
2522
2520
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2523
2521
|
major,
|