@stream-io/video-react-sdk 1.35.1 → 1.36.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 +26 -0
- package/dist/embedded.cjs.js +3 -27
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/embedded.es.js +4 -28
- package/dist/embedded.es.js.map +1 -1
- package/dist/index.cjs.js +4 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5 -29
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/DeviceSettings/DeviceSelectorVideo.d.ts +6 -0
- package/package.json +3 -3
- package/src/components/DeviceSettings/DeviceSelectorVideo.tsx +6 -0
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +1 -0
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +7 -35
package/dist/index.cjs.js
CHANGED
|
@@ -1403,7 +1403,7 @@ const SpeakerTest = (props) => {
|
|
|
1403
1403
|
const audioElementRef = react.useRef(null);
|
|
1404
1404
|
const [isPlaying, setIsPlaying] = react.useState(false);
|
|
1405
1405
|
const { t } = videoReactBindings.useI18n();
|
|
1406
|
-
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.
|
|
1406
|
+
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.36.0"}/assets/piano.mp3`, } = props;
|
|
1407
1407
|
// Update audio output device when selection changes
|
|
1408
1408
|
react.useEffect(() => {
|
|
1409
1409
|
const audio = audioElementRef.current;
|
|
@@ -2380,8 +2380,7 @@ const ParticipantDetails = ({ indicatorsVisible = true, }) => {
|
|
|
2380
2380
|
const hasVideoTrack = videoClient.hasVideo(participant);
|
|
2381
2381
|
const canUnpin = !!pin && pin.isLocalPin;
|
|
2382
2382
|
const isTrackPaused = trackType !== 'none' ? videoClient.hasPausedTrack(participant, trackType) : false;
|
|
2383
|
-
const
|
|
2384
|
-
const isAudioConnecting = hasAudioTrack && !isAudioTrackUnmuted;
|
|
2383
|
+
const isAudioConnecting = videoReactBindings.useIsAudioConnecting(participant);
|
|
2385
2384
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "str-video__participant-details", children: jsxRuntime.jsxs("div", { className: "str-video__participant-details__name", children: [name || userId, indicatorsVisible && isAudioConnecting && (jsxRuntime.jsx(LoadingIndicator, { className: "str-video__participant-details__name--audio-connecting", tooltip: t('Audio is connecting...') })), 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 && pin && (jsxRuntime.jsx("span", { title: canUnpin ? t('Unpin') : t('Pinned'), onClick: canUnpin ? () => call?.unpin(sessionId) : undefined, className: "str-video__participant-details__name--pinned" })), indicatorsVisible && jsxRuntime.jsx(SpeechIndicator, {})] }) }), indicatorsVisible && (jsxRuntime.jsx(Notification, { isVisible: isLocalParticipant &&
|
|
2386
2385
|
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 })) }))] }));
|
|
2387
2386
|
};
|
|
@@ -2390,29 +2389,6 @@ const SpeechIndicator = () => {
|
|
|
2390
2389
|
const { isSpeaking, isDominantSpeaker } = participant;
|
|
2391
2390
|
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" })] }));
|
|
2392
2391
|
};
|
|
2393
|
-
const useIsTrackUnmuted = (participant) => {
|
|
2394
|
-
const audioStream = participant.audioStream;
|
|
2395
|
-
const [unmuted, setUnmuted] = react.useState(() => {
|
|
2396
|
-
const track = audioStream?.getAudioTracks()[0];
|
|
2397
|
-
return !!track && !track.muted;
|
|
2398
|
-
});
|
|
2399
|
-
react.useEffect(() => {
|
|
2400
|
-
const track = audioStream?.getAudioTracks()[0];
|
|
2401
|
-
if (!track)
|
|
2402
|
-
return;
|
|
2403
|
-
setUnmuted(!track.muted);
|
|
2404
|
-
const handler = () => {
|
|
2405
|
-
setUnmuted(!track.muted);
|
|
2406
|
-
};
|
|
2407
|
-
track.addEventListener('mute', handler);
|
|
2408
|
-
track.addEventListener('unmute', handler);
|
|
2409
|
-
return () => {
|
|
2410
|
-
track.removeEventListener('mute', handler);
|
|
2411
|
-
track.removeEventListener('unmute', handler);
|
|
2412
|
-
};
|
|
2413
|
-
}, [audioStream]);
|
|
2414
|
-
return unmuted;
|
|
2415
|
-
};
|
|
2416
2392
|
|
|
2417
2393
|
const ParticipantView = react.forwardRef(function ParticipantView({ participant, trackType = 'videoTrack', mirror, muteAudio, refs: { setVideoElement, setVideoPlaceholderElement } = {}, className, VideoPlaceholder, PictureInPicturePlaceholder, ParticipantViewUI = DefaultParticipantViewUI, }, ref) {
|
|
2418
2394
|
const { isLocalParticipant, isSpeaking, isDominantSpeaker, sessionId } = participant;
|
|
@@ -2938,7 +2914,7 @@ const formatDuration = (durationInMs) => {
|
|
|
2938
2914
|
|
|
2939
2915
|
const GROUP_SIZE = 16;
|
|
2940
2916
|
const PaginatedGridLayoutGroup = ({ group, mirror, VideoPlaceholder, PictureInPicturePlaceholder, ParticipantViewUI, }) => {
|
|
2941
|
-
return (jsxRuntime.jsx("div", { className: clsx('str-video__paginated-grid-layout__group', {
|
|
2917
|
+
return (jsxRuntime.jsx("div", { "data-group-size": group.length, className: clsx('str-video__paginated-grid-layout__group', {
|
|
2942
2918
|
'str-video__paginated-grid-layout--one': group.length === 1,
|
|
2943
2919
|
'str-video__paginated-grid-layout--two-four': group.length >= 2 && group.length <= 4,
|
|
2944
2920
|
'str-video__paginated-grid-layout--five-nine': group.length >= 5 && group.length <= 9,
|
|
@@ -3260,7 +3236,7 @@ const checkCanJoinEarly = (startsAt, joinAheadTimeSeconds) => {
|
|
|
3260
3236
|
return Date.now() >= +startsAt - (joinAheadTimeSeconds ?? 0) * 1000;
|
|
3261
3237
|
};
|
|
3262
3238
|
|
|
3263
|
-
const [major, minor, patch] = ("1.
|
|
3239
|
+
const [major, minor, patch] = ("1.36.0").split('.');
|
|
3264
3240
|
videoClient.setSdkInfo({
|
|
3265
3241
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
3266
3242
|
major,
|