@cloudflare/realtimekit-react 0.5.0-staging.120 → 0.5.0-staging.122

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/dist/index.es.js CHANGED
@@ -21819,7 +21819,11 @@ const jc = (im = class {
21819
21819
  var o, c, d;
21820
21820
  if (((d = (c = (o = this.context.getValue("connectionHandler")) == null ? void 0 : o.mediaState) == null ? void 0 : c.recv) == null ? void 0 : d.state) !== "connected")
21821
21821
  return;
21822
- v(this, jn, false);
21822
+ if (a(this, _i)) {
21823
+ v(this, jn, true);
21824
+ return;
21825
+ }
21826
+ v(this, _i, true), v(this, jn, false);
21823
21827
  const [s, t] = jc.mapDiff(
21824
21828
  a(this, Hn),
21825
21829
  this.participants.videoSubscribed
@@ -21843,18 +21847,12 @@ const jc = (im = class {
21843
21847
  ...this.mapPeerIdsToProducers(t, ["video"]),
21844
21848
  ...this.mapPeerIdsToProducers(r, ["audio"])
21845
21849
  ];
21846
- if (!(i.length === 0 && n.length === 0)) {
21847
- if (a(this, _i)) {
21848
- v(this, jn, true);
21849
- return;
21850
- }
21851
- try {
21852
- v(this, _i, true), yield this.updateConsumers(i, n);
21853
- } finally {
21854
- v(this, _i, false);
21855
- }
21856
- a(this, jn) && this.syncConsumers();
21850
+ try {
21851
+ (i.length > 0 || n.length > 0) && (yield this.updateConsumers(i, n));
21852
+ } finally {
21853
+ v(this, _i, false);
21857
21854
  }
21855
+ a(this, jn) && this.syncConsumers();
21858
21856
  });
21859
21857
  }
21860
21858
  static mapDiff(s, t) {
@@ -21922,6 +21920,8 @@ const jc = (im = class {
21922
21920
  }
21923
21921
  const c = n.shift();
21924
21922
  e[c] = o;
21923
+ }), n.forEach((o) => {
21924
+ e.splice(o, 1);
21925
21925
  }), Array.from(s.keys()).forEach((o) => {
21926
21926
  s.delete(o, !i.has(o));
21927
21927
  }), e.forEach((o) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/realtimekit-react",
3
- "version": "0.5.0-staging.120",
3
+ "version": "0.5.0-staging.122",
4
4
  "description": "A real-time video and audio SDK for building custom, collaborative communication experiences.",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "private": false,
19
19
  "dependencies": {
20
- "@cloudflare/realtimekit": "0.5.0-staging.120"
20
+ "@cloudflare/realtimekit": "0.5.0-staging.122"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=16.8.6"