@cloudflare/realtimekit 1.2.1 → 1.2.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.d.ts CHANGED
@@ -5662,6 +5662,7 @@ type LogData$2 = {
5662
5662
  pip?: {
5663
5663
  id: string;
5664
5664
  handRaised?: boolean;
5665
+ reaction?: string;
5665
5666
  source?: any;
5666
5667
  };
5667
5668
  memoize?: {
package/dist/index.es.js CHANGED
@@ -6350,8 +6350,8 @@ const Qh = class extends qt {
6350
6350
  n(this, gt) !== void 0 && this.paintCanvas(), n(this, zs) !== void 0 && f(this, zs, requestAnimationFrame(() => this.animate()));
6351
6351
  });
6352
6352
  /**
6353
- * Disable PiP
6354
- */
6353
+ * Disable PiP
6354
+ */
6355
6355
  h(this, "disable", (e = !1) => {
6356
6356
  f(this, Ys, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(n(this, zs)), e !== !0 && document.body.removeChild(n(this, st)), f(this, zs, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
6357
6357
  });
@@ -6476,7 +6476,7 @@ const Qh = class extends qt {
6476
6476
  o - c * 2
6477
6477
  ), l += o + c, S.restore();
6478
6478
  };
6479
- e.pinned && g(n(this, Vn)), e.handRaised && g(n(this, Ln));
6479
+ e.pinned && g(n(this, Vn)), e.handRaised && g(n(this, Ln)), e.reaction && g(e.reaction);
6480
6480
  }
6481
6481
  drawTile(e, r, i) {
6482
6482
  var l, p;
@@ -6623,7 +6623,8 @@ const Qh = class extends qt {
6623
6623
  this.logger.info("Pip::UpdateSource", {
6624
6624
  pip: {
6625
6625
  id: e,
6626
- handRaised: r.handRaised
6626
+ handRaised: r.handRaised,
6627
+ reaction: r.reaction
6627
6628
  }
6628
6629
  });
6629
6630
  const i = n(this, gt)[e];
@@ -6652,8 +6653,8 @@ const Qh = class extends qt {
6652
6653
  f(this, gt, {});
6653
6654
  }
6654
6655
  /**
6655
- * Enable PiP
6656
- */
6656
+ * Enable PiP
6657
+ */
6657
6658
  enable() {
6658
6659
  f(this, Ys, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", n(this, De).videoEnabled), this.updateMediaSession("MIC", n(this, De).audioEnabled), document.body.appendChild(n(this, st)), f(this, zs, requestAnimationFrame(() => this.animate())), n(this, zt).onloadedmetadata = () => {
6659
6660
  n(this, zt).requestPictureInPicture().then(() => {
@@ -16628,7 +16629,7 @@ let Ht = (Fg = class extends Y0 {
16628
16629
  const t = yield navigator.mediaDevices.enumerateDevices(), e = (i) => {
16629
16630
  var o;
16630
16631
  const a = ((o = i.label) == null ? void 0 : o.toLowerCase()) || "";
16631
- return kd(i) ? 4 : i.deviceId === "default" || a.includes("default") ? 0 : (a.includes("airpods") || a.includes("bluetooth") || a.includes("wireless") || a.includes("headphones") || a.includes("headset") || a.includes("earbuds") || a.includes("usb") || a.includes("external")) && !a.includes("default") ? 1 : a.includes("built-in") || a.includes("internal") ? 2 : 3;
16632
+ return kd(i) ? 4 : a.includes("airpods") || a.includes("airdopes") || a.includes("bluetooth") || a.includes("wireless") || a.includes("headphones") || a.includes("headset") || a.includes("earbuds") || a.includes("usb") || a.includes("external") ? 0 : i.deviceId === "default" || a.includes("default") ? 1 : a.includes("built-in") || a.includes("internal") ? 2 : 3;
16632
16633
  }, r = (i) => {
16633
16634
  var o;
16634
16635
  if (i.kind !== "videoinput")
@@ -16637,14 +16638,20 @@ let Ht = (Fg = class extends Y0 {
16637
16638
  return a.includes("front") || a.includes("user") || a.includes("selfie") ? !0 : !(a.includes("back") || a.includes("rear") || a.includes("environment"));
16638
16639
  };
16639
16640
  return t.sort((i, a) => {
16641
+ var p, g;
16640
16642
  const o = e(i), c = e(a);
16641
16643
  if (o !== c)
16642
16644
  return o - c;
16643
- if (o === c && i.kind === "videoinput" && a.kind === "videoinput") {
16644
- const d = r(i), l = r(a);
16645
- if (d && !l)
16645
+ const d = i.deviceId === "default" || ((p = i.label) == null ? void 0 : p.toLowerCase().includes("default")), l = a.deviceId === "default" || ((g = a.label) == null ? void 0 : g.toLowerCase().includes("default"));
16646
+ if (d && !l)
16647
+ return -1;
16648
+ if (!d && l)
16649
+ return 1;
16650
+ if (i.kind === "videoinput" && a.kind === "videoinput") {
16651
+ const v = r(i), S = r(a);
16652
+ if (v && !S)
16646
16653
  return -1;
16647
- if (!d && l)
16654
+ if (!v && S)
16648
16655
  return 1;
16649
16656
  }
16650
16657
  return 0;
@@ -28405,7 +28412,7 @@ let ti = (Kg = class {
28405
28412
  video: !0
28406
28413
  };
28407
28414
  return a.setValue("options", e), a.setValue("peerId", t), a.setValue("modules", o), a.setValue("sdkName", "web-core"), a.setValue("meetingId", r), a.setValue("apiBase", i.apiBase), a.setValue("baseURI", i.baseURI), a.setValue("userId", i.participantId), a.setValue("organizationId", i.orgId), a.setValue("authToken", e.authToken), a.setValue("overrides", (d = e.overrides) != null ? d : {}), a.setValue("env", lw({ baseURI: i.baseURI })), a.setValue("defaults", c), a.setValue("onError", e.onError || (() => {
28408
- })), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.1"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new YO()), a;
28415
+ })), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.2-staging.2"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new YO()), a;
28409
28416
  }
28410
28417
  join() {
28411
28418
  return u(this, null, function* () {