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

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,15 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [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)
6
+
7
+
8
+ ### Features
9
+
10
+ * server-side participant counting ([#481](https://github.com/GetStream/stream-video-js/issues/481)) ([3410c25](https://github.com/GetStream/stream-video-js/commit/3410c25ec1449f4d39b44080ad64238b38446612))
11
+
12
+
13
+
5
14
  ## [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
15
 
7
16
 
@@ -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;;;;;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;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"}
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;;;;;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;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.134",
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.134",
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.22"
43
43
  }
@@ -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
+ };