@stream-io/video-react-sdk 1.39.1 → 1.39.3
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 +25 -2
- package/dist/embedded.cjs.js +2 -25
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/embedded.es.js +3 -26
- package/dist/embedded.es.js.map +1 -1
- package/dist/index.cjs.js +3 -26
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +4 -27
- package/dist/index.es.js.map +1 -1
- package/dist/src/core/components/CallLayout/hooks.d.ts +0 -1
- package/package.json +5 -5
- package/src/core/components/CallLayout/SpeakerLayout.tsx +5 -2
- package/src/core/components/CallLayout/hooks.ts +0 -28
package/dist/index.cjs.js
CHANGED
|
@@ -1406,7 +1406,7 @@ const SpeakerTest = (props) => {
|
|
|
1406
1406
|
const audioElementRef = react.useRef(null);
|
|
1407
1407
|
const [isPlaying, setIsPlaying] = react.useState(false);
|
|
1408
1408
|
const { t } = videoReactBindings.useI18n();
|
|
1409
|
-
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.39.
|
|
1409
|
+
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.39.3"}/assets/piano.mp3`, } = props;
|
|
1410
1410
|
// Update audio output device when selection changes
|
|
1411
1411
|
react.useEffect(() => {
|
|
1412
1412
|
const audio = audioElementRef.current;
|
|
@@ -2791,22 +2791,6 @@ const usePaginatedLayoutSortPreset = (call) => {
|
|
|
2791
2791
|
};
|
|
2792
2792
|
}, [call]);
|
|
2793
2793
|
};
|
|
2794
|
-
const useSpeakerLayoutSortPreset = (call, isOneOnOneCall) => {
|
|
2795
|
-
react.useEffect(() => {
|
|
2796
|
-
if (!call)
|
|
2797
|
-
return;
|
|
2798
|
-
// always show the remote participant in the spotlight
|
|
2799
|
-
if (isOneOnOneCall) {
|
|
2800
|
-
call.setSortParticipantsBy(videoClient.combineComparators(videoClient.screenSharing, loggedIn));
|
|
2801
|
-
}
|
|
2802
|
-
else {
|
|
2803
|
-
call.setSortParticipantsBy(videoClient.speakerLayoutSortPreset);
|
|
2804
|
-
}
|
|
2805
|
-
return () => {
|
|
2806
|
-
resetSortPreset(call);
|
|
2807
|
-
};
|
|
2808
|
-
}, [call, isOneOnOneCall]);
|
|
2809
|
-
};
|
|
2810
2794
|
const useRawRemoteParticipants = () => {
|
|
2811
2795
|
const { useRawParticipants } = videoReactBindings.useCallStateHooks();
|
|
2812
2796
|
const rawParticipants = useRawParticipants();
|
|
@@ -2817,13 +2801,6 @@ const resetSortPreset = (call) => {
|
|
|
2817
2801
|
const callConfig = videoClient.CallTypes.get(call.type);
|
|
2818
2802
|
call.setSortParticipantsBy(callConfig.options.sortParticipantsBy || videoClient.defaultSortPreset);
|
|
2819
2803
|
};
|
|
2820
|
-
const loggedIn = (a, b) => {
|
|
2821
|
-
if (a.isLocalParticipant)
|
|
2822
|
-
return 1;
|
|
2823
|
-
if (b.isLocalParticipant)
|
|
2824
|
-
return -1;
|
|
2825
|
-
return 0;
|
|
2826
|
-
};
|
|
2827
2804
|
|
|
2828
2805
|
const LivestreamLayout = (props) => {
|
|
2829
2806
|
const { useParticipants, useHasOngoingScreenShare } = videoReactBindings.useCallStateHooks();
|
|
@@ -3080,7 +3057,7 @@ const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, Par
|
|
|
3080
3057
|
return () => cleanup?.();
|
|
3081
3058
|
}, [participantsBarWrapperElement, call]);
|
|
3082
3059
|
const isOneOnOneCall = allParticipants.length === 2;
|
|
3083
|
-
useSpeakerLayoutSortPreset(call, isOneOnOneCall);
|
|
3060
|
+
videoReactBindings.useSpeakerLayoutSortPreset(call, isOneOnOneCall);
|
|
3084
3061
|
useDragToScroll(participantsBarWrapperElement, {
|
|
3085
3062
|
enabled: enableDragToScroll,
|
|
3086
3063
|
});
|
|
@@ -3284,7 +3261,7 @@ const checkCanJoinEarly = (startsAt, joinAheadTimeSeconds) => {
|
|
|
3284
3261
|
return Date.now() >= +startsAt - (joinAheadTimeSeconds ?? 0) * 1000;
|
|
3285
3262
|
};
|
|
3286
3263
|
|
|
3287
|
-
const [major, minor, patch] = ("1.39.
|
|
3264
|
+
const [major, minor, patch] = ("1.39.3").split('.');
|
|
3288
3265
|
videoClient.setSdkInfo({
|
|
3289
3266
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
3290
3267
|
major,
|