@stream-io/video-react-sdk 1.0.12 → 1.0.13
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 +7 -0
- package/dist/index.cjs.js +24 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +25 -3
- package/dist/index.es.js.map +1 -1
- package/dist/src/wrappers/LivestreamPlayer/LivestreamPlayer.d.ts +16 -0
- package/dist/src/wrappers/LivestreamPlayer/index.d.ts +1 -0
- package/dist/src/wrappers/index.d.ts +1 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/src/wrappers/LivestreamPlayer/LivestreamPlayer.tsx +49 -0
- package/src/wrappers/LivestreamPlayer/index.ts +1 -0
- package/src/wrappers/index.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export * from '@stream-io/video-client';
|
|
|
2
2
|
export * from '@stream-io/video-react-bindings';
|
|
3
3
|
export * from './src/core';
|
|
4
4
|
export * from './src/components';
|
|
5
|
+
export * from './src/wrappers';
|
|
5
6
|
export * from './src/translations';
|
|
6
7
|
export { useHorizontalScrollPosition, useVerticalScrollPosition, useRequestPermission, usePersistedDevicePreferences, } from './src/hooks';
|
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hasAudio, hasScreenShareAudio, disposeOfMediaStream, CallingState, OwnCapability, getLogger, hasVideo, isPinned, name, NoiseCancellationSettingsModeEnum, hasScreenShare, VisibilityState, Browsers, SfuModels, paginatedLayoutSortPreset, combineComparators, screenSharing, speakerLayoutSortPreset, CallTypes, defaultSortPreset, setSdkInfo } from '@stream-io/video-client';
|
|
2
2
|
export * from '@stream-io/video-client';
|
|
3
|
-
import { useCall, useCallStateHooks, useI18n, Restricted, useConnectedUser, StreamCallProvider, StreamVideoProvider } from '@stream-io/video-react-bindings';
|
|
3
|
+
import { useCall, useCallStateHooks, useI18n, Restricted, useConnectedUser, StreamCallProvider, StreamVideoProvider, useStreamVideoClient } from '@stream-io/video-react-bindings';
|
|
4
4
|
export * from '@stream-io/video-react-bindings';
|
|
5
5
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
import { useState, useEffect, Fragment as Fragment$1, createContext, useContext, useCallback, useRef, useMemo, forwardRef, isValidElement, useLayoutEffect } from 'react';
|
|
@@ -2569,7 +2569,29 @@ const VerticalScrollButtons = ({ scrollWrapper, }) => {
|
|
|
2569
2569
|
return (jsxs(Fragment, { children: [scrollPosition && scrollPosition !== 'top' && (jsx(IconButton, { onClick: scrollTopClickHandler, icon: "caret-up", className: "str-video__speaker-layout__participants-bar--button-top" })), scrollPosition && scrollPosition !== 'bottom' && (jsx(IconButton, { onClick: scrollBottomClickHandler, icon: "caret-down", className: "str-video__speaker-layout__participants-bar--button-bottom" }))] }));
|
|
2570
2570
|
};
|
|
2571
2571
|
|
|
2572
|
-
const
|
|
2572
|
+
const LivestreamPlayer = (props) => {
|
|
2573
|
+
const { callType, callId, layoutProps } = props;
|
|
2574
|
+
const client = useStreamVideoClient();
|
|
2575
|
+
const [call, setCall] = useState();
|
|
2576
|
+
useEffect(() => {
|
|
2577
|
+
if (!client)
|
|
2578
|
+
return;
|
|
2579
|
+
const myCall = client.call(callType, callId);
|
|
2580
|
+
setCall(myCall);
|
|
2581
|
+
myCall.join().catch((e) => {
|
|
2582
|
+
console.error('Failed to join call', e);
|
|
2583
|
+
});
|
|
2584
|
+
return () => {
|
|
2585
|
+
myCall.leave().catch((e) => {
|
|
2586
|
+
console.error('Failed to leave call', e);
|
|
2587
|
+
});
|
|
2588
|
+
setCall(undefined);
|
|
2589
|
+
};
|
|
2590
|
+
}, [callId, callType, client]);
|
|
2591
|
+
return (jsx(StreamCall, { call: call, children: jsx(LivestreamLayout, { ...layoutProps }) }));
|
|
2592
|
+
};
|
|
2593
|
+
|
|
2594
|
+
const [major, minor, patch] = ("1.0.13" ).split('.');
|
|
2573
2595
|
setSdkInfo({
|
|
2574
2596
|
type: SfuModels.SdkType.REACT,
|
|
2575
2597
|
major,
|
|
@@ -2577,5 +2599,5 @@ setSdkInfo({
|
|
|
2577
2599
|
patch,
|
|
2578
2600
|
});
|
|
2579
2601
|
|
|
2580
|
-
export { AcceptCallButton, Audio, Avatar, AvatarFallback, BackgroundFiltersProvider, BaseVideo, CallControls, CallParticipantListing, CallParticipantListingItem, CallParticipantsList, CallPreview, CallRecordingList, CallRecordingListHeader, CallRecordingListItem, CallStats, CallStatsButton, CallStatsLatencyChart, CancelCallButton, CancelCallConfirmButton, CompositeButton, DefaultParticipantViewUI, DefaultReactionsMenu, DefaultScreenShareOverlay, DefaultVideoPlaceholder, DeviceSelector, DeviceSelectorAudioInput, DeviceSelectorAudioOutput, DeviceSelectorVideo, DeviceSettings, DropDownSelect, DropDownSelectOption, EmptyCallRecordingListing, GenericMenu, GenericMenuButtonItem, Icon, IconButton, LivestreamLayout, LoadingCallRecordingListing, LoadingIndicator, MenuToggle, MenuVisualType, NoiseCancellationProvider, Notification, PaginatedGridLayout, ParticipantActionsContextMenu, ParticipantDetails, ParticipantView, ParticipantViewContext, ParticipantsAudio, PermissionNotification, PermissionRequestList, PermissionRequests, ReactionsButton, RecordCallButton, RecordCallConfirmationButton, RecordingInProgressNotification, RingingCall, RingingCallControls, ScreenShareButton, SearchInput, SearchResults, SpeakerLayout, SpeakingWhileMutedNotification, SpeechIndicator, StatCard, StatCardExplanation, StatsTag, Statuses, StreamCall, StreamTheme, StreamVideo, TextButton, ToggleAudioOutputButton, ToggleAudioPreviewButton, ToggleAudioPublishingButton, ToggleVideoPreviewButton, ToggleVideoPublishingButton, Tooltip, Video$1 as Video, VideoPreview, WithTooltip, defaultReactions, translations, useBackgroundFilters, useHorizontalScrollPosition, useMenuContext, useNoiseCancellation, useParticipantViewContext, usePersistedDevicePreferences, useRequestPermission, useTrackElementVisibility, useVerticalScrollPosition };
|
|
2602
|
+
export { AcceptCallButton, Audio, Avatar, AvatarFallback, BackgroundFiltersProvider, BaseVideo, CallControls, CallParticipantListing, CallParticipantListingItem, CallParticipantsList, CallPreview, CallRecordingList, CallRecordingListHeader, CallRecordingListItem, CallStats, CallStatsButton, CallStatsLatencyChart, CancelCallButton, CancelCallConfirmButton, CompositeButton, DefaultParticipantViewUI, DefaultReactionsMenu, DefaultScreenShareOverlay, DefaultVideoPlaceholder, DeviceSelector, DeviceSelectorAudioInput, DeviceSelectorAudioOutput, DeviceSelectorVideo, DeviceSettings, DropDownSelect, DropDownSelectOption, EmptyCallRecordingListing, GenericMenu, GenericMenuButtonItem, Icon, IconButton, LivestreamLayout, LivestreamPlayer, LoadingCallRecordingListing, LoadingIndicator, MenuToggle, MenuVisualType, NoiseCancellationProvider, Notification, PaginatedGridLayout, ParticipantActionsContextMenu, ParticipantDetails, ParticipantView, ParticipantViewContext, ParticipantsAudio, PermissionNotification, PermissionRequestList, PermissionRequests, ReactionsButton, RecordCallButton, RecordCallConfirmationButton, RecordingInProgressNotification, RingingCall, RingingCallControls, ScreenShareButton, SearchInput, SearchResults, SpeakerLayout, SpeakingWhileMutedNotification, SpeechIndicator, StatCard, StatCardExplanation, StatsTag, Statuses, StreamCall, StreamTheme, StreamVideo, TextButton, ToggleAudioOutputButton, ToggleAudioPreviewButton, ToggleAudioPublishingButton, ToggleVideoPreviewButton, ToggleVideoPublishingButton, Tooltip, Video$1 as Video, VideoPreview, WithTooltip, defaultReactions, translations, useBackgroundFilters, useHorizontalScrollPosition, useMenuContext, useNoiseCancellation, useParticipantViewContext, usePersistedDevicePreferences, useRequestPermission, useTrackElementVisibility, useVerticalScrollPosition };
|
|
2581
2603
|
//# sourceMappingURL=index.es.js.map
|