@stream-io/video-react-sdk 1.32.4 → 1.33.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/css/embedded.css +3630 -0
  3. package/dist/css/embedded.css.map +1 -0
  4. package/dist/css/styles.css +13 -2
  5. package/dist/css/styles.css.map +1 -1
  6. package/dist/embedded-BackgroundFilters-RdXfNf6_.es.js +353 -0
  7. package/dist/embedded-BackgroundFilters-RdXfNf6_.es.js.map +1 -0
  8. package/dist/embedded-BackgroundFilters-Zu84SkRR.cjs.js +355 -0
  9. package/dist/embedded-BackgroundFilters-Zu84SkRR.cjs.js.map +1 -0
  10. package/dist/embedded-CallStatsLatencyChart-Bj5OSYzg.es.js +57 -0
  11. package/dist/embedded-CallStatsLatencyChart-Bj5OSYzg.es.js.map +1 -0
  12. package/dist/embedded-CallStatsLatencyChart-CpL1M_s0.cjs.js +59 -0
  13. package/dist/embedded-CallStatsLatencyChart-CpL1M_s0.cjs.js.map +1 -0
  14. package/dist/embedded.cjs.js +3410 -0
  15. package/dist/embedded.cjs.js.map +1 -0
  16. package/dist/embedded.d.ts +1 -0
  17. package/dist/embedded.es.js +3407 -0
  18. package/dist/embedded.es.js.map +1 -0
  19. package/dist/index.cjs.js +67 -202
  20. package/dist/index.cjs.js.map +1 -1
  21. package/dist/index.es.js +69 -204
  22. package/dist/index.es.js.map +1 -1
  23. package/dist/src/embedded/EmbeddedClientProvider.d.ts +21 -0
  24. package/dist/src/embedded/call/CallControls.d.ts +9 -0
  25. package/dist/src/embedded/call/CallHeader.d.ts +4 -0
  26. package/dist/src/embedded/call/CallLayout.d.ts +4 -0
  27. package/dist/src/embedded/call/CallStateRouter.d.ts +4 -0
  28. package/dist/src/embedded/call/EmbeddedCall.d.ts +6 -0
  29. package/dist/src/embedded/call/index.d.ts +1 -0
  30. package/dist/src/embedded/context/ConfigurationContext.d.ts +11 -0
  31. package/dist/src/embedded/context/index.d.ts +1 -0
  32. package/dist/src/embedded/hooks/index.d.ts +8 -0
  33. package/dist/src/embedded/hooks/useCallDuration.d.ts +7 -0
  34. package/dist/src/embedded/hooks/useEmbeddedClient.d.ts +22 -0
  35. package/dist/src/embedded/hooks/useInitializeCall.d.ts +11 -0
  36. package/dist/src/embedded/hooks/useInitializeVideoClient.d.ts +16 -0
  37. package/dist/src/embedded/hooks/useIsLivestreamPaused.d.ts +8 -0
  38. package/dist/src/embedded/hooks/useLayout.d.ts +9 -0
  39. package/dist/src/embedded/hooks/useNoiseCancellationLoader.d.ts +12 -0
  40. package/dist/src/embedded/hooks/useWakeLock.d.ts +5 -0
  41. package/dist/src/embedded/index.d.ts +3 -0
  42. package/dist/src/embedded/livestream/EmbeddedLivestream.d.ts +5 -0
  43. package/dist/src/embedded/livestream/LivestreamUI.d.ts +1 -0
  44. package/dist/src/embedded/livestream/host/HostLayout.d.ts +7 -0
  45. package/dist/src/embedded/livestream/host/HostStateRouter.d.ts +1 -0
  46. package/dist/src/embedded/livestream/index.d.ts +1 -0
  47. package/dist/src/embedded/livestream/viewer/ViewerLayout.d.ts +1 -0
  48. package/dist/src/embedded/livestream/viewer/ViewerLobby.d.ts +4 -0
  49. package/dist/src/embedded/livestream/viewer/ViewerStateRouter.d.ts +1 -0
  50. package/dist/src/embedded/shared/BlurToggleButton/BlurToggleButton.d.ts +2 -0
  51. package/dist/src/embedded/shared/CallFeedback/CallEndedScreen.d.ts +6 -0
  52. package/dist/src/embedded/shared/CallFeedback/CallFeedback.d.ts +4 -0
  53. package/dist/src/embedded/shared/CallFeedback/RatingScreen.d.ts +5 -0
  54. package/dist/src/embedded/shared/CallFeedback/StarRating.d.ts +6 -0
  55. package/dist/src/embedded/shared/CallFeedback/ThankYouScreen.d.ts +1 -0
  56. package/dist/src/embedded/shared/ConnectionNotification/ConnectionNotification.d.ts +1 -0
  57. package/dist/src/embedded/shared/EmbeddedParticipantViewUI/EmbeddedParticipantViewUI.d.ts +1 -0
  58. package/dist/src/embedded/shared/JoinError/JoinError.d.ts +5 -0
  59. package/dist/src/embedded/shared/Lobby/DeviceControls.d.ts +5 -0
  60. package/dist/src/embedded/shared/Lobby/DisabledDeviceButton.d.ts +6 -0
  61. package/dist/src/embedded/shared/Lobby/Lobby.d.ts +10 -0
  62. package/dist/src/embedded/shared/Lobby/ToggleCameraButton.d.ts +1 -0
  63. package/dist/src/embedded/shared/Lobby/ToggleMicButton.d.ts +1 -0
  64. package/dist/src/embedded/shared/Lobby/VideoPreviewFallbacks.d.ts +2 -0
  65. package/dist/src/embedded/shared/ViewersCount/ViewersCount.d.ts +5 -0
  66. package/dist/src/embedded/shared/index.d.ts +7 -0
  67. package/dist/src/embedded/types.d.ts +65 -0
  68. package/dist/src/hooks/usePersistedDevicePreferences.d.ts +3 -12
  69. package/dist/src/translations/index.d.ts +42 -1
  70. package/embedded.ts +1 -0
  71. package/package.json +18 -4
  72. package/src/core/components/CallLayout/LivestreamLayout.tsx +53 -41
  73. package/src/embedded/EmbeddedClientProvider.tsx +125 -0
  74. package/src/embedded/call/CallControls.tsx +124 -0
  75. package/src/embedded/call/CallHeader.tsx +30 -0
  76. package/src/embedded/call/CallLayout.tsx +66 -0
  77. package/src/embedded/call/CallStateRouter.tsx +56 -0
  78. package/src/embedded/call/EmbeddedCall.tsx +14 -0
  79. package/src/embedded/call/index.ts +1 -0
  80. package/src/embedded/context/ConfigurationContext.tsx +36 -0
  81. package/src/embedded/context/index.ts +1 -0
  82. package/src/embedded/hooks/index.ts +8 -0
  83. package/src/embedded/hooks/useCallDuration.ts +40 -0
  84. package/src/embedded/hooks/useEmbeddedClient.ts +64 -0
  85. package/src/embedded/hooks/useInitializeCall.ts +51 -0
  86. package/src/embedded/hooks/useInitializeVideoClient.ts +118 -0
  87. package/src/embedded/hooks/useIsLivestreamPaused.ts +44 -0
  88. package/src/embedded/hooks/useLayout.ts +100 -0
  89. package/src/embedded/hooks/useNoiseCancellationLoader.ts +62 -0
  90. package/src/embedded/hooks/useWakeLock.ts +33 -0
  91. package/src/embedded/index.ts +12 -0
  92. package/src/embedded/livestream/EmbeddedLivestream.tsx +16 -0
  93. package/src/embedded/livestream/LivestreamUI.tsx +17 -0
  94. package/src/embedded/livestream/host/HostLayout.tsx +210 -0
  95. package/src/embedded/livestream/host/HostStateRouter.tsx +100 -0
  96. package/src/embedded/livestream/index.ts +1 -0
  97. package/src/embedded/livestream/viewer/ViewerLayout.tsx +160 -0
  98. package/src/embedded/livestream/viewer/ViewerLobby.tsx +135 -0
  99. package/src/embedded/livestream/viewer/ViewerStateRouter.tsx +82 -0
  100. package/src/embedded/shared/BlurToggleButton/BlurToggleButton.tsx +75 -0
  101. package/src/embedded/shared/CallFeedback/CallEndedScreen.tsx +55 -0
  102. package/src/embedded/shared/CallFeedback/CallFeedback.tsx +51 -0
  103. package/src/embedded/shared/CallFeedback/RatingScreen.tsx +47 -0
  104. package/src/embedded/shared/CallFeedback/StarRating.tsx +46 -0
  105. package/src/embedded/shared/CallFeedback/ThankYouScreen.tsx +19 -0
  106. package/src/embedded/shared/ConnectionNotification/ConnectionNotification.tsx +59 -0
  107. package/src/embedded/shared/EmbeddedParticipantViewUI/EmbeddedParticipantViewUI.tsx +32 -0
  108. package/src/embedded/shared/JoinError/JoinError.tsx +27 -0
  109. package/src/embedded/shared/Lobby/DeviceControls.tsx +54 -0
  110. package/src/embedded/shared/Lobby/DisabledDeviceButton.tsx +21 -0
  111. package/src/embedded/shared/Lobby/Lobby.tsx +59 -0
  112. package/src/embedded/shared/Lobby/ToggleCameraButton.tsx +44 -0
  113. package/src/embedded/shared/Lobby/ToggleMicButton.tsx +48 -0
  114. package/src/embedded/shared/Lobby/VideoPreviewFallbacks.tsx +55 -0
  115. package/src/embedded/shared/ViewersCount/ViewersCount.tsx +18 -0
  116. package/src/embedded/shared/index.ts +7 -0
  117. package/src/embedded/types.ts +80 -0
  118. package/src/hooks/usePersistedDevicePreferences.ts +8 -307
  119. package/src/translations/en.json +44 -2
@@ -0,0 +1,21 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { LogLevel, TokenProvider } from '@stream-io/video-client';
3
+ import type { EmbeddedUser, LayoutOption } from './types';
4
+ export interface EmbeddedClientProviderProps {
5
+ apiKey: string;
6
+ user: EmbeddedUser;
7
+ callId: string;
8
+ callType: string;
9
+ token?: string;
10
+ tokenProvider?: TokenProvider;
11
+ logLevel?: LogLevel;
12
+ onError?: (error: any) => void;
13
+ layout?: LayoutOption;
14
+ theme?: Record<string, string>;
15
+ children: ReactNode;
16
+ }
17
+ /**
18
+ * Shared provider wrapper for embedded components.
19
+ * Handles client/call initialization and wraps children with all necessary providers.
20
+ */
21
+ export declare const EmbeddedClientProvider: ({ apiKey, user, callId, callType, token, tokenProvider, logLevel, onError, layout, theme, children, }: EmbeddedClientProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ interface CallControlsProps {
2
+ showParticipants: boolean;
3
+ onToggleParticipants: () => void;
4
+ }
5
+ /**
6
+ * Renders the active call control bar
7
+ */
8
+ export declare const CallControls: ({ showParticipants, onToggleParticipants, }: CallControlsProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Renders the call header bar with elapsed time and leave/end call button.
3
+ */
4
+ export declare const CallHeader: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * CallLayout renders the active call experience with layout, controls and sidebar.
3
+ */
4
+ export declare const CallLayout: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * CallStateRouter is the state decider component that manages view state transitions.
3
+ */
4
+ export declare const CallStateRouter: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { EmbeddedMeetingProps } from '../types';
2
+ /**
3
+ * Drop-in video call component that renders a lobby, active call,
4
+ * and post-call feedback screen. Handles client and call setup internally.
5
+ */
6
+ export declare const EmbeddedCall: ({ children, ...props }: EmbeddedMeetingProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './EmbeddedCall';
@@ -0,0 +1,11 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import type { LayoutOption } from '../types';
3
+ export interface EmbeddedConfiguration {
4
+ layout?: LayoutOption;
5
+ onError?: (error: any) => void;
6
+ }
7
+ export declare const ConfigurationProvider: ({ children, layout, onError, }: PropsWithChildren<EmbeddedConfiguration>) => import("react/jsx-runtime").JSX.Element;
8
+ /**
9
+ * Hook to access embedded configuration settings.
10
+ */
11
+ export declare const useEmbeddedConfiguration: () => EmbeddedConfiguration;
@@ -0,0 +1 @@
1
+ export * from './ConfigurationContext';
@@ -0,0 +1,8 @@
1
+ export * from './useInitializeVideoClient';
2
+ export * from './useInitializeCall';
3
+ export * from './useLayout';
4
+ export * from './useNoiseCancellationLoader';
5
+ export * from './useWakeLock';
6
+ export * from './useCallDuration';
7
+ export * from './useEmbeddedClient';
8
+ export * from './useIsLivestreamPaused';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Returns a live-updating formatted elapsed duration string
3
+ * computed from the given start date.
4
+ */
5
+ export declare const useCallDuration: (startedAt?: string) => {
6
+ elapsed: string;
7
+ };
@@ -0,0 +1,22 @@
1
+ import type { EmbeddedUser } from '../types';
2
+ import { LogLevel, TokenProvider } from '@stream-io/video-client';
3
+ export interface UseEmbeddedClientProps {
4
+ apiKey: string;
5
+ user: EmbeddedUser;
6
+ callId: string;
7
+ callType: string;
8
+ token?: string;
9
+ tokenProvider?: TokenProvider;
10
+ logLevel?: LogLevel;
11
+ handleError: (error: any) => void;
12
+ }
13
+ /**
14
+ * Hook that initializes the Stream Video client and call.
15
+ * Combines useInitializeVideoClient, useInitializeCall, and useNoiseCancellationLoader.
16
+ */
17
+ export declare const useEmbeddedClient: ({ apiKey, user, callId, callType, token, tokenProvider, logLevel, handleError, }: UseEmbeddedClientProps) => {
18
+ client: import("@stream-io/video-client").StreamVideoClient | undefined;
19
+ call: import("@stream-io/video-client").Call | undefined;
20
+ noiseCancellation: import("@stream-io/audio-filters-web").INoiseCancellation | undefined;
21
+ noiseCancellationReady: boolean;
22
+ };
@@ -0,0 +1,11 @@
1
+ import { Call, StreamVideoClient } from '@stream-io/video-client';
2
+ export interface UseInitializeCallProps {
3
+ client?: StreamVideoClient;
4
+ callType: string;
5
+ callId: string;
6
+ handleError: (error: any) => void;
7
+ }
8
+ /**
9
+ * Hook to initialize and manage a Call instance.
10
+ */
11
+ export declare const useInitializeCall: ({ client, callType, callId, handleError, }: UseInitializeCallProps) => Call | undefined;
@@ -0,0 +1,16 @@
1
+ import { LogLevel, StreamVideoClient, TokenProvider } from '@stream-io/video-client';
2
+ import type { EmbeddedUser } from '../types';
3
+ export interface UseInitializeVideoClientProps {
4
+ apiKey: string;
5
+ user: EmbeddedUser;
6
+ token?: string;
7
+ tokenProvider?: TokenProvider;
8
+ logLevel?: LogLevel;
9
+ handleError: (error: any) => void;
10
+ }
11
+ /**
12
+ * Hook that creates a StreamVideoClient and connects the user.
13
+ * Disconnects and cleans up on unmount or when props change.
14
+ *
15
+ */
16
+ export declare const useInitializeVideoClient: ({ apiKey, user, token, tokenProvider, logLevel, handleError, }: UseInitializeVideoClientProps) => StreamVideoClient | undefined;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Distinguishes a temporary live pause (host went backstage) from a real
3
+ * call end. Returns `true` when the viewer was kicked because the host
4
+ * paused the livestream — not because the call was fully terminated.
5
+ *
6
+ * Resets to `false` on rejoin or when `call.ended` (real end) arrives.
7
+ */
8
+ export declare const useIsLivestreamPaused: () => boolean;
@@ -0,0 +1,9 @@
1
+ import type { ComponentType } from 'react';
2
+ /**
3
+ * Hook to manage layout selection.
4
+ * Returns the layout Component and its props.
5
+ */
6
+ export declare const useLayout: () => {
7
+ Component: ComponentType<Record<string, unknown>>;
8
+ props: Record<string, unknown>;
9
+ };
@@ -0,0 +1,12 @@
1
+ import { type Call } from '@stream-io/video-client';
2
+ /**
3
+ * Hook that lazily loads the noise cancellation module from @stream-io/audio-filters-web.
4
+ * Skips loading if the server-side noise cancellation setting is disabled.
5
+ * Returns the NoiseCancellation instance when loaded, or undefined if unavailable.
6
+ * The `ready` flag becomes `true` once loading completes (even on failure),
7
+ * or immediately if noise cancellation is disabled by server settings.
8
+ */
9
+ export declare const useNoiseCancellationLoader: (call?: Call) => {
10
+ noiseCancellation: import("@stream-io/audio-filters-web").INoiseCancellation | undefined;
11
+ ready: boolean;
12
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Hook to prevent screen from going to sleep during active calls.
3
+ * Uses the Screen Wake Lock API when available.
4
+ */
5
+ export declare const useWakeLock: () => void;
@@ -0,0 +1,3 @@
1
+ export { EmbeddedCall } from './call';
2
+ export { EmbeddedLivestream } from './livestream';
3
+ export type { EmbeddedMeetingProps, EmbeddedLivestreamProps, EmbeddedUser, EmbeddedAuthenticatedUser, EmbeddedGuestUser, EmbeddedAnonymousUser, LayoutOption, } from './types';
@@ -0,0 +1,5 @@
1
+ import type { EmbeddedLivestreamProps } from '../types';
2
+ /**
3
+ * Drop-in livestream component. Renders host or viewer UI based on permissions.
4
+ */
5
+ export declare const EmbeddedLivestream: ({ children, ...props }: EmbeddedLivestreamProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const LivestreamUI: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export type HostViewProps = {
2
+ isLive: boolean;
3
+ isBackstageEnabled: boolean;
4
+ onGoLive: () => void;
5
+ onStopLive: () => void;
6
+ };
7
+ export declare const HostLayout: ({ isLive, isBackstageEnabled, onGoLive, onStopLive, }: HostViewProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const HostStateRouter: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './EmbeddedLivestream';
@@ -0,0 +1 @@
1
+ export declare const ViewerLayout: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type ViewerLobbyProps = {
2
+ onJoin: () => Promise<void>;
3
+ };
4
+ export declare const ViewerLobby: ({ onJoin }: ViewerLobbyProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const ViewerStateRouter: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const BlurToggleButton: () => import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const CameraMenuWithBlur: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface CallEndedScreenProps {
2
+ onJoin?: () => void;
3
+ onFeedback: () => void;
4
+ }
5
+ export declare const CallEndedScreen: ({ onJoin, onFeedback, }: CallEndedScreenProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface CallFeedbackProps {
2
+ onJoin?: () => void;
3
+ }
4
+ export declare const CallFeedback: ({ onJoin }: CallFeedbackProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ interface RatingScreenProps {
2
+ onSubmit: (rating: number, message: string) => void;
3
+ }
4
+ export declare const RatingScreen: ({ onSubmit }: RatingScreenProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ interface StarRatingProps {
2
+ value: number;
3
+ onChange: (rating: number) => void;
4
+ }
5
+ export declare const StarRating: ({ value, onChange }: StarRatingProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare const ThankYouScreen: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const ConnectionNotification: () => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const EmbeddedParticipantViewUI: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ interface JoinErrorProps {
2
+ onJoin: () => void;
3
+ }
4
+ export declare const JoinError: ({ onJoin }: JoinErrorProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ interface DeviceControlsProps {
2
+ isVideoEnabled: boolean;
3
+ }
4
+ export declare const DeviceControls: ({ isVideoEnabled }: DeviceControlsProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ interface DisabledDeviceButtonProps {
2
+ icon: string;
3
+ label: string;
4
+ }
5
+ export declare const DisabledDeviceButton: ({ icon, label, }: DisabledDeviceButtonProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ interface LobbyProps {
2
+ onJoin: () => void;
3
+ title?: string;
4
+ joinLabel?: string;
5
+ }
6
+ /**
7
+ * Lobby component - Device setup screen before joining a call.
8
+ */
9
+ export declare const Lobby: ({ onJoin, title, joinLabel }: LobbyProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ export declare const ToggleCameraButton: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const ToggleMicButton: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const DisabledVideoPreview: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const NoCameraPreview: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ interface ViewersCountProps {
2
+ count: number;
3
+ }
4
+ export declare const ViewersCount: ({ count }: ViewersCountProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,7 @@
1
+ export * from './BlurToggleButton/BlurToggleButton';
2
+ export * from './CallFeedback/CallFeedback';
3
+ export * from './ConnectionNotification/ConnectionNotification';
4
+ export * from './EmbeddedParticipantViewUI/EmbeddedParticipantViewUI';
5
+ export * from './JoinError/JoinError';
6
+ export * from './Lobby/Lobby';
7
+ export * from './ViewersCount/ViewersCount';
@@ -0,0 +1,65 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { LogLevel, TokenProvider } from '@stream-io/video-client';
3
+ /**
4
+ * Available layout options.
5
+ */
6
+ export type LayoutOption = 'Livestream' | 'PaginatedGrid' | 'SpeakerLeft' | 'SpeakerRight' | 'SpeakerTop' | 'SpeakerBottom';
7
+ /**
8
+ * An authenticated user with a known identity.
9
+ * Requires a `token` or `tokenProvider` on the component props.
10
+ */
11
+ export interface EmbeddedAuthenticatedUser {
12
+ type?: 'authenticated';
13
+ id: string;
14
+ name?: string;
15
+ image?: string;
16
+ }
17
+ /**
18
+ * A guest user — the server generates credentials automatically.
19
+ */
20
+ export interface EmbeddedGuestUser {
21
+ type: 'guest';
22
+ id: string;
23
+ name?: string;
24
+ image?: string;
25
+ }
26
+ /**
27
+ * An anonymous user with no identity.
28
+ * May optionally receive a call-scoped token via the `token` prop.
29
+ */
30
+ export interface EmbeddedAnonymousUser {
31
+ type: 'anonymous';
32
+ id?: '!anon';
33
+ name?: string;
34
+ image?: string;
35
+ }
36
+ /**
37
+ * Discriminated union for embedded user configuration.
38
+ */
39
+ export type EmbeddedUser = EmbeddedAuthenticatedUser | EmbeddedGuestUser | EmbeddedAnonymousUser;
40
+ /**
41
+ * Base props shared by EmbeddedCall and EmbeddedLivestream.
42
+ */
43
+ export interface EmbeddedClientBaseProps {
44
+ apiKey: string;
45
+ callType: string;
46
+ callId: string;
47
+ user: EmbeddedUser;
48
+ token?: string;
49
+ tokenProvider?: TokenProvider;
50
+ logLevel?: LogLevel;
51
+ layout?: LayoutOption;
52
+ theme?: Record<string, string>;
53
+ onError?: (error: any) => void;
54
+ children?: ReactNode;
55
+ }
56
+ /**
57
+ * Props for the EmbeddedCall component.
58
+ */
59
+ export interface EmbeddedMeetingProps extends EmbeddedClientBaseProps {
60
+ }
61
+ /**
62
+ * Props for the EmbeddedLivestream component.
63
+ */
64
+ export interface EmbeddedLivestreamProps extends EmbeddedClientBaseProps {
65
+ }
@@ -1,16 +1,7 @@
1
- export type LocalDevicePreference = {
2
- selectedDeviceId: string;
3
- selectedDeviceLabel: string;
4
- muted?: boolean;
5
- };
6
- export type LocalDevicePreferences = {
7
- [type in DeviceKey]?: LocalDevicePreference | LocalDevicePreference[];
8
- };
9
- type DeviceKey = 'microphone' | 'camera' | 'speaker';
10
1
  /**
11
- * This hook will apply and persist the device preferences from local storage.
2
+ * This hook is a no-op. Device preference persistence is now handled
3
+ * by the low-level client SDK.
12
4
  *
13
- * @param key the key to use for local storage.
5
+ * @deprecated use the devicePreferences API of the StreamVideoClient.
14
6
  */
15
7
  export declare const usePersistedDevicePreferences: (key?: string) => void;
16
- export {};
@@ -15,7 +15,7 @@ export declare const translations: {
15
15
  "Background filters performance is degraded. Consider disabling filters for better performance.": string;
16
16
  Live: string;
17
17
  "Livestream starts soon": string;
18
- "Livestream starts at {{ startsAt }}": string;
18
+ "Livestream starts at {{ time }}": string;
19
19
  "{{ count }} participants joined early_one": string;
20
20
  "{{ count }} participants joined early_other": string;
21
21
  "You can now speak.": string;
@@ -95,5 +95,46 @@ export declare const translations: {
95
95
  "{{ userName }} is requesting to share their camera": string;
96
96
  "{{ userName }} is requesting to present their screen": string;
97
97
  "{{ userName }} is requesting permission: {{ permission }}": string;
98
+ "Applying...": string;
99
+ "Disable blur": string;
100
+ "Blur background": string;
101
+ "Migrating...": string;
102
+ "Reconnecting...": string;
103
+ "You are offline. Check your internet connection.": string;
104
+ "Failed to restore connection. Please try again.": string;
105
+ "Failed to join. Please try again.": string;
106
+ "Set up your call before joining": string;
107
+ "Please grant your browser permission to access your camera and microphone.": string;
108
+ "Start call": string;
109
+ Speaker: string;
110
+ Microphone: string;
111
+ Backstage: string;
112
+ "Go Live": string;
113
+ "Stop Live": string;
114
+ "Enter Backstage": string;
115
+ "Prepare your livestream": string;
116
+ "Ready to go live": string;
117
+ "Stream is ready!": string;
118
+ "Waiting for the livestream to start": string;
119
+ "{{ count }} waiting": string;
120
+ "Join Stream": string;
121
+ "Join automatically when stream starts": string;
122
+ "Display name": string;
123
+ "Permission needed": string;
124
+ "Call ended": string;
125
+ "Rejoin call": string;
126
+ "Left by mistake?": string;
127
+ "Help us improve": string;
128
+ "Leave feedback": string;
129
+ "Failed to rejoin. Please try again.": string;
130
+ "Share your feedback": string;
131
+ "Tell us about your experience...": string;
132
+ "Submit feedback": string;
133
+ "Feedback message": string;
134
+ "How was your call quality?": string;
135
+ "Rate {{ count }} star_one": string;
136
+ "Rate {{ count }} star_other": string;
137
+ "Thank you!": string;
138
+ "Your feedback helps improve call quality.": string;
98
139
  };
99
140
  };
package/embedded.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './src/embedded';
package/package.json CHANGED
@@ -1,9 +1,22 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-sdk",
3
- "version": "1.32.4",
3
+ "version": "1.33.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.es.js",
10
+ "require": "./dist/index.cjs.js",
11
+ "types": "./dist/index.d.ts"
12
+ },
13
+ "./embedded": {
14
+ "types": "./dist/embedded.d.ts",
15
+ "import": "./dist/embedded.es.js",
16
+ "require": "./dist/embedded.cjs.js"
17
+ },
18
+ "./dist/css/*": "./dist/css/*"
19
+ },
7
20
  "license": "See license in LICENSE",
8
21
  "scripts": {
9
22
  "clean": "rimraf dist",
@@ -21,6 +34,7 @@
21
34
  "src",
22
35
  "assets",
23
36
  "index.ts",
37
+ "embedded.ts",
24
38
  "package.json",
25
39
  "README.md",
26
40
  "LICENSE",
@@ -31,9 +45,9 @@
31
45
  ],
32
46
  "dependencies": {
33
47
  "@floating-ui/react": "^0.27.6",
34
- "@stream-io/video-client": "1.43.0",
48
+ "@stream-io/video-client": "1.44.0",
35
49
  "@stream-io/video-filters-web": "0.7.2",
36
- "@stream-io/video-react-bindings": "1.13.8",
50
+ "@stream-io/video-react-bindings": "1.13.9",
37
51
  "chart.js": "^4.4.4",
38
52
  "clsx": "^2.0.0",
39
53
  "react-chartjs-2": "^5.3.0"
@@ -47,7 +61,7 @@
47
61
  "@rollup/plugin-replace": "^6.0.2",
48
62
  "@rollup/plugin-typescript": "^12.1.4",
49
63
  "@stream-io/audio-filters-web": "^0.7.2",
50
- "@stream-io/video-styling": "^1.10.0",
64
+ "@stream-io/video-styling": "^1.11.0",
51
65
  "@types/react": "~19.1.17",
52
66
  "@types/react-dom": "~19.1.11",
53
67
  "react": "19.1.0",