@stream-io/video-react-sdk 1.24.0 → 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.
@@ -4,9 +4,10 @@ export type FilterableParticipant = Pick<StreamVideoParticipant, 'userId' | 'isS
4
4
  isPinned: boolean;
5
5
  hasVideo: boolean;
6
6
  hasAudio: boolean;
7
+ hasScreenShare: boolean;
7
8
  };
8
9
  export type ParticipantFilter = Filter<FilterableParticipant>;
9
- export type ParticipantPredicate = (paritcipant: StreamVideoParticipant) => boolean;
10
+ export type ParticipantPredicate = (participant: StreamVideoParticipant) => boolean;
10
11
  export declare const useFilteredParticipants: ({ excludeLocalParticipant, filterParticipants, }: {
11
12
  excludeLocalParticipant?: boolean;
12
13
  filterParticipants?: ParticipantFilter | ParticipantPredicate;
@@ -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.0",
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.0",
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.0",
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"
@@ -6,6 +6,7 @@ import {
6
6
  Comparator,
7
7
  defaultSortPreset,
8
8
  hasAudio,
9
+ hasScreenShare,
9
10
  hasVideo,
10
11
  isPinned,
11
12
  paginatedLayoutSortPreset,
@@ -23,11 +24,12 @@ export type FilterableParticipant = Pick<
23
24
  isPinned: boolean;
24
25
  hasVideo: boolean;
25
26
  hasAudio: boolean;
27
+ hasScreenShare: boolean;
26
28
  };
27
29
 
28
30
  export type ParticipantFilter = Filter<FilterableParticipant>;
29
31
  export type ParticipantPredicate = (
30
- paritcipant: StreamVideoParticipant,
32
+ participant: StreamVideoParticipant,
31
33
  ) => boolean;
32
34
 
33
35
  export const useFilteredParticipants = ({
@@ -74,6 +76,7 @@ export const applyParticipantsFilter = (
74
76
  isPinned: isPinned(participant),
75
77
  hasVideo: hasVideo(participant),
76
78
  hasAudio: hasAudio(participant),
79
+ hasScreenShare: hasScreenShare(participant),
77
80
  },
78
81
  filter,
79
82
  );
@@ -111,10 +114,10 @@ export const useSpeakerLayoutSortPreset = (
111
114
 
112
115
  export const useRawRemoteParticipants = () => {
113
116
  const { useRawParticipants } = useCallStateHooks();
114
- const rawParicipants = useRawParticipants();
117
+ const rawParticipants = useRawParticipants();
115
118
  return useMemo(
116
- () => rawParicipants.filter((p) => !p.isLocalParticipant),
117
- [rawParicipants],
119
+ () => rawParticipants.filter((p) => !p.isLocalParticipant),
120
+ [rawParticipants],
118
121
  );
119
122
  };
120
123
 
@@ -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
  };