@stream-io/video-react-sdk 1.39.2 → 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 +15 -0
- 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/embedded.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { memo, useState, useEffect, Fragment as Fragment$1, createContext, useContext, useCallback, useMemo, useRef, isValidElement, forwardRef, useLayoutEffect, lazy, Suspense } from 'react';
|
|
3
|
-
import { useCall, useCallStateHooks, useI18n, Restricted, useToggleCallRecording, useConnectedUser, useEffectEvent, useIsAudioConnecting, useIsVideoConnecting, StreamCallProvider, StreamVideoProvider } from '@stream-io/video-react-bindings';
|
|
4
|
-
import { hasAudio, hasScreenShareAudio, hasVideo, hasScreenShare, OwnCapability, Browsers, VisibilityState, hasPausedTrack, createSoundDetector, SfuModels, isPinned, name, NoiseCancellationSettingsModeEnum, CallingState,
|
|
3
|
+
import { useCall, useCallStateHooks, useI18n, Restricted, useToggleCallRecording, useConnectedUser, useEffectEvent, useIsAudioConnecting, useIsVideoConnecting, StreamCallProvider, StreamVideoProvider, useSpeakerLayoutSortPreset } from '@stream-io/video-react-bindings';
|
|
4
|
+
import { hasAudio, hasScreenShareAudio, hasVideo, hasScreenShare, OwnCapability, Browsers, VisibilityState, hasPausedTrack, createSoundDetector, SfuModels, isPinned, name, NoiseCancellationSettingsModeEnum, CallingState, paginatedLayoutSortPreset, CallTypes, defaultSortPreset, humanize, StreamVideoClient } from '@stream-io/video-client';
|
|
5
5
|
import { useFloating, offset, shift, flip, size, autoUpdate, FloatingOverlay, FloatingPortal, arrow, FloatingArrow, useListItem, useListNavigation, useTypeahead, useClick, useDismiss, useRole, useInteractions, FloatingFocusManager, FloatingList } from '@floating-ui/react';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
|
|
@@ -1208,7 +1208,7 @@ const SpeakerTest = (props) => {
|
|
|
1208
1208
|
const audioElementRef = useRef(null);
|
|
1209
1209
|
const [isPlaying, setIsPlaying] = useState(false);
|
|
1210
1210
|
const { t } = useI18n();
|
|
1211
|
-
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.39.
|
|
1211
|
+
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.39.3"}/assets/piano.mp3`, } = props;
|
|
1212
1212
|
// Update audio output device when selection changes
|
|
1213
1213
|
useEffect(() => {
|
|
1214
1214
|
const audio = audioElementRef.current;
|
|
@@ -2293,22 +2293,6 @@ const usePaginatedLayoutSortPreset = (call) => {
|
|
|
2293
2293
|
};
|
|
2294
2294
|
}, [call]);
|
|
2295
2295
|
};
|
|
2296
|
-
const useSpeakerLayoutSortPreset = (call, isOneOnOneCall) => {
|
|
2297
|
-
useEffect(() => {
|
|
2298
|
-
if (!call)
|
|
2299
|
-
return;
|
|
2300
|
-
// always show the remote participant in the spotlight
|
|
2301
|
-
if (isOneOnOneCall) {
|
|
2302
|
-
call.setSortParticipantsBy(combineComparators(screenSharing, loggedIn));
|
|
2303
|
-
}
|
|
2304
|
-
else {
|
|
2305
|
-
call.setSortParticipantsBy(speakerLayoutSortPreset);
|
|
2306
|
-
}
|
|
2307
|
-
return () => {
|
|
2308
|
-
resetSortPreset(call);
|
|
2309
|
-
};
|
|
2310
|
-
}, [call, isOneOnOneCall]);
|
|
2311
|
-
};
|
|
2312
2296
|
const useRawRemoteParticipants = () => {
|
|
2313
2297
|
const { useRawParticipants } = useCallStateHooks();
|
|
2314
2298
|
const rawParticipants = useRawParticipants();
|
|
@@ -2319,13 +2303,6 @@ const resetSortPreset = (call) => {
|
|
|
2319
2303
|
const callConfig = CallTypes.get(call.type);
|
|
2320
2304
|
call.setSortParticipantsBy(callConfig.options.sortParticipantsBy || defaultSortPreset);
|
|
2321
2305
|
};
|
|
2322
|
-
const loggedIn = (a, b) => {
|
|
2323
|
-
if (a.isLocalParticipant)
|
|
2324
|
-
return 1;
|
|
2325
|
-
if (b.isLocalParticipant)
|
|
2326
|
-
return -1;
|
|
2327
|
-
return 0;
|
|
2328
|
-
};
|
|
2329
2306
|
|
|
2330
2307
|
const LivestreamLayout = (props) => {
|
|
2331
2308
|
const { useParticipants, useHasOngoingScreenShare } = useCallStateHooks();
|