@cloudflare/realtimekit 1.2.2-staging.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.es.js CHANGED
@@ -16629,7 +16629,7 @@ let Ht = (Fg = class extends Y0 {
16629
16629
  const t = yield navigator.mediaDevices.enumerateDevices(), e = (i) => {
16630
16630
  var o;
16631
16631
  const a = ((o = i.label) == null ? void 0 : o.toLowerCase()) || "";
16632
- 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;
16633
16633
  }, r = (i) => {
16634
16634
  var o;
16635
16635
  if (i.kind !== "videoinput")
@@ -16638,14 +16638,20 @@ let Ht = (Fg = class extends Y0 {
16638
16638
  return a.includes("front") || a.includes("user") || a.includes("selfie") ? !0 : !(a.includes("back") || a.includes("rear") || a.includes("environment"));
16639
16639
  };
16640
16640
  return t.sort((i, a) => {
16641
+ var p, g;
16641
16642
  const o = e(i), c = e(a);
16642
16643
  if (o !== c)
16643
16644
  return o - c;
16644
- if (o === c && i.kind === "videoinput" && a.kind === "videoinput") {
16645
- const d = r(i), l = r(a);
16646
- 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)
16647
16653
  return -1;
16648
- if (!d && l)
16654
+ if (!v && S)
16649
16655
  return 1;
16650
16656
  }
16651
16657
  return 0;
@@ -28406,7 +28412,7 @@ let ti = (Kg = class {
28406
28412
  video: !0
28407
28413
  };
28408
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 || (() => {
28409
- })), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.2-staging.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;
28410
28416
  }
28411
28417
  join() {
28412
28418
  return u(this, null, function* () {