@stream-io/video-react-bindings 0.0.1-alpha.21 → 0.0.1-alpha.23

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 CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.0.1-alpha.23](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-0.0.1-alpha.22...@stream-io/video-react-bindings-0.0.1-alpha.23) (2023-05-12)
6
+
7
+
8
+
9
+ ## [0.0.1-alpha.22](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-0.0.1-alpha.21...@stream-io/video-react-bindings-0.0.1-alpha.22) (2023-05-11)
10
+
11
+
12
+ ### Features
13
+
14
+ * server-side participant counting ([#481](https://github.com/GetStream/stream-video-js/issues/481)) ([3410c25](https://github.com/GetStream/stream-video-js/commit/3410c25ec1449f4d39b44080ad64238b38446612))
15
+
16
+
17
+
5
18
  ## [0.0.1-alpha.21](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-0.0.1-alpha.20...@stream-io/video-react-bindings-0.0.1-alpha.21) (2023-05-11)
6
19
 
7
20
 
@@ -14,6 +14,8 @@ export interface StreamCallProviderProps {
14
14
  * @returns
15
15
  *
16
16
  * @category Call State
17
+ *
18
+ * @react If you're using the React SDK we recommend using the `StreamMeeting` component that wraps the `StreamCallProvider`. You only need to use the `StreamCallProvider` for advanced use-cases.
17
19
  */
18
20
  export declare const StreamCallProvider: (props: PropsWithChildren<StreamCallProviderProps>) => JSX.Element;
19
21
  /**
@@ -7,6 +7,8 @@ const StreamCallContext = createContext(undefined);
7
7
  * @returns
8
8
  *
9
9
  * @category Call State
10
+ *
11
+ * @react If you're using the React SDK we recommend using the `StreamMeeting` component that wraps the `StreamCallProvider`. You only need to use the `StreamCallProvider` for advanced use-cases.
10
12
  */
11
13
  export const StreamCallProvider = (props) => {
12
14
  const { call, children } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"StreamCallContext.js","sourceRoot":"","sources":["../../../src/contexts/StreamCallContext.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAC;AAGrE,MAAM,iBAAiB,GAAG,aAAa,CAAmB,SAAS,CAAC,CAAC;AAWrE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAAiD,EACjD,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACjC,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,kBAAC,KAAK,EAAE,IAAI,gBACpC,QAAQ,IACkB,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,OAAO,UAAU,CAAC,iBAAiB,CAAC,CAAC;AACvC,CAAC,CAAC"}
1
+ {"version":3,"file":"StreamCallContext.js","sourceRoot":"","sources":["../../../src/contexts/StreamCallContext.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAC;AAGrE,MAAM,iBAAiB,GAAG,aAAa,CAAmB,SAAS,CAAC,CAAC;AAWrE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAAiD,EACjD,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACjC,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,kBAAC,KAAK,EAAE,IAAI,gBACpC,QAAQ,IACkB,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,OAAO,UAAU,CAAC,iBAAiB,CAAC,CAAC;AACvC,CAAC,CAAC"}
@@ -28,3 +28,10 @@ export declare const useLocalParticipant: () => import("@stream-io/video-client"
28
28
  * @category Call State
29
29
  */
30
30
  export declare const useRemoteParticipants: () => StreamVideoParticipant[];
31
+ /**
32
+ * Returns the approximate participant count of the active call.
33
+ * This includes the anonymous users as well, and it is computed on the server.
34
+ *
35
+ * @category Call State
36
+ */
37
+ export declare const useParticipantCount: () => number;
@@ -39,4 +39,14 @@ export const useRemoteParticipants = () => {
39
39
  const { remoteParticipants$ } = useCallState();
40
40
  return useObservableValue(remoteParticipants$);
41
41
  };
42
+ /**
43
+ * Returns the approximate participant count of the active call.
44
+ * This includes the anonymous users as well, and it is computed on the server.
45
+ *
46
+ * @category Call State
47
+ */
48
+ export const useParticipantCount = () => {
49
+ const { participantCount$ } = useCallState();
50
+ return useObservableValue(participantCount$);
51
+ };
42
52
  //# sourceMappingURL=participants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"participants.js","sourceRoot":"","sources":["../../../src/hooks/participants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAKvC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,MAAM,MAOJ,EAAE,EAAE,EAAE;IACR,MAAM,EAAE,aAAa,EAAE,GAAG,YAAY,EAAE,CAAC;IACzC,MAAM,YAAY,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAEvD,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,MAAM,EAAE;YACV,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACvC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF;;;;;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AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,MAAM,EAAE,mBAAmB,EAAE,GAAG,YAAY,EAAE,CAAC;IAC/C,OAAO,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,EAAE,iBAAiB,EAAE,GAAG,YAAY,EAAE,CAAC;IAC7C,OAAO,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;AAC/C,CAAC,CAAC"}
package/package.json CHANGED
@@ -24,12 +24,12 @@
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@stream-io/i18n": "^0.0.1-alpha.12",
27
- "@stream-io/video-client": "^0.0.1-alpha.133",
27
+ "@stream-io/video-client": "^0.0.1-alpha.135",
28
28
  "react": ">=17.0.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@stream-io/i18n": "^0.0.1-alpha.12",
32
- "@stream-io/video-client": "^0.0.1-alpha.133",
32
+ "@stream-io/video-client": "^0.0.1-alpha.135",
33
33
  "@types/react": "^18.0.26",
34
34
  "@types/rimraf": "^3.0.2",
35
35
  "react": "^18.2.0",
@@ -39,5 +39,5 @@
39
39
  "typedoc-plugin-markdown": "^3.13.6",
40
40
  "typescript": "^4.9.5"
41
41
  },
42
- "version": "0.0.1-alpha.21"
42
+ "version": "0.0.1-alpha.23"
43
43
  }
@@ -18,6 +18,8 @@ export interface StreamCallProviderProps {
18
18
  * @returns
19
19
  *
20
20
  * @category Call State
21
+ *
22
+ * @react If you're using the React SDK we recommend using the `StreamMeeting` component that wraps the `StreamCallProvider`. You only need to use the `StreamCallProvider` for advanced use-cases.
21
23
  */
22
24
  export const StreamCallProvider = (
23
25
  props: PropsWithChildren<StreamCallProviderProps>,
@@ -55,3 +55,14 @@ export const useRemoteParticipants = () => {
55
55
  const { remoteParticipants$ } = useCallState();
56
56
  return useObservableValue(remoteParticipants$);
57
57
  };
58
+
59
+ /**
60
+ * Returns the approximate participant count of the active call.
61
+ * This includes the anonymous users as well, and it is computed on the server.
62
+ *
63
+ * @category Call State
64
+ */
65
+ export const useParticipantCount = () => {
66
+ const { participantCount$ } = useCallState();
67
+ return useObservableValue(participantCount$);
68
+ };