@stream-io/video-react-sdk 1.24.1 → 1.24.2

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.
@@ -1,3 +1,4 @@
1
+ import { PropsWithChildren } from 'react';
1
2
  import { BackstageLayoutProps, LivestreamLayoutProps } from '../../core';
2
3
  export type LivestreamPlayerProps = {
3
4
  /**
@@ -13,7 +14,7 @@ export type LivestreamPlayerProps = {
13
14
  *
14
15
  * `"asap"` behavior means joining the call as soon as it is possible
15
16
  * (either the `join_ahead_time_seconds` setting allows it, or the user
16
- * has a the capability to join backstage).
17
+ * has the capability to join backstage).
17
18
  *
18
19
  * `"live"` behavior means joining the call when it goes live.
19
20
  *
@@ -33,4 +34,4 @@ export type LivestreamPlayerProps = {
33
34
  */
34
35
  onError?: (error: any) => void;
35
36
  };
36
- export declare const LivestreamPlayer: (props: LivestreamPlayerProps) => import("react/jsx-runtime").JSX.Element | null;
37
+ export declare const LivestreamPlayer: (props: PropsWithChildren<LivestreamPlayerProps>) => import("react/jsx-runtime").JSX.Element | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-sdk",
3
- "version": "1.24.1",
3
+ "version": "1.24.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",
@@ -30,9 +30,9 @@
30
30
  ],
31
31
  "dependencies": {
32
32
  "@floating-ui/react": "^0.27.6",
33
- "@stream-io/video-client": "1.34.1",
33
+ "@stream-io/video-client": "1.35.0",
34
34
  "@stream-io/video-filters-web": "0.3.0",
35
- "@stream-io/video-react-bindings": "1.10.1",
35
+ "@stream-io/video-react-bindings": "1.10.2",
36
36
  "chart.js": "^4.4.4",
37
37
  "clsx": "^2.0.0",
38
38
  "react-chartjs-2": "^5.3.0"
@@ -1,8 +1,9 @@
1
- import { useEffect, useState } from 'react';
1
+ import { PropsWithChildren, useEffect, useState } from 'react';
2
2
  import { Call, CallingState } from '@stream-io/video-client';
3
3
  import {
4
4
  useCall,
5
5
  useCallStateHooks,
6
+ useEffectEvent,
6
7
  useStreamVideoClient,
7
8
  } from '@stream-io/video-react-bindings';
8
9
  import {
@@ -12,7 +13,6 @@ import {
12
13
  LivestreamLayoutProps,
13
14
  StreamCall,
14
15
  } from '../../core';
15
- import { useEffectEvent } from '@stream-io/video-react-bindings';
16
16
 
17
17
  export type LivestreamPlayerProps = {
18
18
  /**
@@ -28,7 +28,7 @@ export type LivestreamPlayerProps = {
28
28
  *
29
29
  * `"asap"` behavior means joining the call as soon as it is possible
30
30
  * (either the `join_ahead_time_seconds` setting allows it, or the user
31
- * has a the capability to join backstage).
31
+ * has the capability to join backstage).
32
32
  *
33
33
  * `"live"` behavior means joining the call when it goes live.
34
34
  *
@@ -49,8 +49,10 @@ export type LivestreamPlayerProps = {
49
49
  onError?: (error: any) => void;
50
50
  };
51
51
 
52
- export const LivestreamPlayer = (props: LivestreamPlayerProps) => {
53
- const { callType, callId, ...restProps } = props;
52
+ export const LivestreamPlayer = (
53
+ props: PropsWithChildren<LivestreamPlayerProps>,
54
+ ) => {
55
+ const { callType, callId, children, ...restProps } = props;
54
56
  const client = useStreamVideoClient();
55
57
  const [call, setCall] = useState<Call>();
56
58
  const onError = useEffectEvent(props.onError ?? (() => {}));
@@ -78,6 +80,7 @@ export const LivestreamPlayer = (props: LivestreamPlayerProps) => {
78
80
  return (
79
81
  <StreamCall call={call}>
80
82
  <LivestreamCall {...restProps} />
83
+ {children}
81
84
  </StreamCall>
82
85
  );
83
86
  };