@cloudflare/realtimekit 1.0.1 → 1.0.2-staging.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.
package/dist/index.es.js CHANGED
@@ -21835,7 +21835,7 @@ const Kc = (fm = class {
21835
21835
  );
21836
21836
  this.updateParticipantsMap(
21837
21837
  a(this, qn),
21838
- this.participants.videoSubscribed.toArray().map(({ id: h }) => h)
21838
+ this.participants.videoSubscribed.toArray().filter(({ videoEnabled: h }) => !!h).map(({ id: h }) => h)
21839
21839
  );
21840
21840
  const [e, r] = Kc.mapDiff(
21841
21841
  a(this, jn),
@@ -21843,7 +21843,7 @@ const Kc = (fm = class {
21843
21843
  );
21844
21844
  this.updateParticipantsMap(
21845
21845
  a(this, jn),
21846
- this.participants.audioSubscribed.toArray().map(({ id: h }) => h)
21846
+ this.participants.audioSubscribed.toArray().filter(({ audioEnabled: h }) => !!h).map(({ id: h }) => h)
21847
21847
  );
21848
21848
  const i = [
21849
21849
  ...this.mapPeerIdsToProducers(s, ["video"]),
@@ -21910,7 +21910,7 @@ const Kc = (fm = class {
21910
21910
  producingPeerId: s,
21911
21911
  mimeType: i.mimeType
21912
21912
  }));
21913
- }), this.roomNodeClient.handlePeerCapabilities(s, e), z.hasFeature(re.FORCE_VIDEO_CODEC) || this.roomNodeClient.shareWebcam(this.self.videoTrack), r.producers.length > 0 && k.emit(I.UPDATE_ACTIVE);
21913
+ }), this.roomNodeClient.handlePeerCapabilities(s, e), z.hasFeature(re.FORCE_VIDEO_CODEC) || this.roomNodeClient.shareWebcam(this.self.videoTrack), k.emit(I.UPDATE_ACTIVE);
21914
21914
  }
21915
21915
  updateParticipantsMapMinReplacement(s, t) {
21916
21916
  const e = Array.from(s.keys()), r = new Map(s), i = new Set(t), n = [];
@@ -24284,11 +24284,12 @@ class Eh extends wl {
24284
24284
  }
24285
24285
  connect() {
24286
24286
  return u(this, null, function* () {
24287
- const e = this.pc.createDataChannel("dyte"), r = yield this.pc.createOffer();
24288
- return yield this.pc.setLocalDescription(r), l.info(`connect offer: ${JSON.stringify(r)}`), {
24289
- offerSdp: r,
24290
- callback: (n) => u(this, null, function* () {
24291
- l.debug(`${this.name}::connect() | calling pc.setRemoteDescription() [answer:${JSON.stringify(n)}]`), yield this.pc.setRemoteDescription(n), e.close();
24287
+ this.pc.addTransceiver("video", { direction: "sendonly" });
24288
+ const e = yield this.pc.createOffer();
24289
+ return yield this.pc.setLocalDescription(e), l.info(`connect offer: ${JSON.stringify(e)}`), {
24290
+ offerSdp: e,
24291
+ callback: (i) => u(this, null, function* () {
24292
+ l.debug(`${this.name}::connect() | calling pc.setRemoteDescription() [answer:${JSON.stringify(i)}]`), yield this.pc.setRemoteDescription(i);
24292
24293
  })
24293
24294
  };
24294
24295
  });
@@ -29072,7 +29073,8 @@ const gv = (Sm = class {
29072
29073
  ping: this.capabilities.includes("PING"),
29073
29074
  capabilities: this.capabilities.map((o) => od[o]).join(" "),
29074
29075
  joinWithDetails: true,
29075
- useCfWorker: true
29076
+ useCfWorker: true,
29077
+ useStartSession: true
29076
29078
  });
29077
29079
  return Object.entries(n).forEach(([o, c]) => {
29078
29080
  r.searchParams.append(o, c.toString());
@@ -29817,7 +29819,7 @@ let jr = (Em = class {
29817
29819
  var c;
29818
29820
  const n = $i.createContext(t, e), o = O(O({}, BP), e == null ? void 0 : e.modules);
29819
29821
  return n.setValue("peerId", t), n.setValue("modules", o), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (c = e.overrides) != null ? c : {}), n.setValue("env", HP({ baseURI: i.baseURI })), n.setValue("defaults", e.defaults || { audio: true, video: true }), n.setValue("onError", e.onError || (() => {
29820
- })), n.setValue("cachedUserDetails", fs(e.cachedUserDetails)), n.setValue("sdkVersion", "3.0.1"), n;
29822
+ })), n.setValue("cachedUserDetails", fs(e.cachedUserDetails)), n.setValue("sdkVersion", "3.0.2-staging.2"), n;
29821
29823
  }
29822
29824
  join() {
29823
29825
  return u(this, null, function* () {