File tree Expand file tree Collapse file tree 3 files changed +32
-3
lines changed
packages/react-sdk/src/embedded Expand file tree Collapse file tree 3 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,24 @@ import { LivestreamUI } from './LivestreamUI';
2828 * user={{ type: 'anonymous' }}
2929 * callId="my-stream"
3030 * />
31+ *
32+ * // With additional content alongside the default UI
33+ * <EmbeddedLivestream
34+ * apiKey="YOUR_API_KEY"
35+ * user={{ type: 'authenticated', id: 'host-1', name: 'Jane' }}
36+ * callId="my-stream"
37+ * token="user-token"
38+ * >
39+ * <MyCustomOverlay />
40+ * </EmbeddedLivestream>
3141 * ```
3242 */
33- export const EmbeddedLivestream = ( props : EmbeddedLivestreamProps ) => (
43+ export const EmbeddedLivestream = ( {
44+ children,
45+ ...props
46+ } : EmbeddedLivestreamProps ) => (
3447 < EmbeddedClientProvider { ...props } >
3548 < LivestreamUI />
49+ { children }
3650 </ EmbeddedClientProvider >
3751) ;
Original file line number Diff line number Diff line change @@ -32,10 +32,24 @@ import { CallStateRouter } from './CallStateRouter';
3232 * user={{ type: 'anonymous' }}
3333 * callId="my-meeting"
3434 * />
35+ *
36+ * // With additional content alongside the default UI
37+ * <EmbeddedMeeting
38+ * apiKey="YOUR_API_KEY"
39+ * user={{ type: 'authenticated', id: 'user-1', name: 'John' }}
40+ * callId="my-meeting"
41+ * token="user-token"
42+ * >
43+ * <MyCustomPanel />
44+ * </EmbeddedMeeting>
3545 * ```
3646 */
37- export const EmbeddedMeeting = ( props : EmbeddedMeetingProps ) => (
47+ export const EmbeddedMeeting = ( {
48+ children,
49+ ...props
50+ } : EmbeddedMeetingProps ) => (
3851 < EmbeddedClientProvider { ...props } >
3952 < CallStateRouter />
53+ { children }
4054 </ EmbeddedClientProvider >
4155) ;
Original file line number Diff line number Diff line change 1- import type { CSSProperties } from 'react' ;
1+ import type { CSSProperties , ReactNode } from 'react' ;
22
33/**
44 * Log level for the StreamVideoClient.
@@ -84,6 +84,7 @@ export interface EmbeddedClientBaseProps {
8484 layout ?: LayoutOption ;
8585 style ?: CSSProperties ;
8686 onError ?: ( error : any ) => void ;
87+ children ?: ReactNode ;
8788}
8889
8990/**
You can’t perform that action at this time.
0 commit comments