@cloudflare/realtimekit-react 1.1.7-staging.2 → 1.1.7-staging.4

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
@@ -18944,9 +18944,10 @@ class Ot extends Jn {
18944
18944
  }
18945
18945
  setupSpeaker() {
18946
18946
  return u(this, null, function* () {
18947
- yield a(this, zs).setupSpeaker();
18948
18947
  const { speaker: e } = this.getCurrentDevices();
18949
- e && this.emit("DEVICE_CHANGE", { device: e });
18948
+ yield a(this, zs).setupSpeaker();
18949
+ const { speaker: r } = this.getCurrentDevices();
18950
+ (e == null ? void 0 : e.deviceId) !== (r == null ? void 0 : r.deviceId) && r && this.emit("DEVICE_CHANGE", { device: r });
18950
18951
  });
18951
18952
  }
18952
18953
  setSpeakerDevice(e) {
@@ -19403,7 +19404,7 @@ class n0 {
19403
19404
  };
19404
19405
  });
19405
19406
  h(this, "getAudioConstraints", (t2) => {
19406
- var n, o, c, d, l, p, f, S;
19407
+ var n, o, c, d, l, p, f;
19407
19408
  const e2 = {}, r = (n = a(this, ki)) == null ? void 0 : n.audio, i = r != null && r.enableStereo ? 2 : 1;
19408
19409
  return Te.isFirefox() || Te.isWebKitBased() ? (e2.audio = {
19409
19410
  deviceId: t2,
@@ -19411,15 +19412,12 @@ class n0 {
19411
19412
  echoCancellation: (c = r == null ? void 0 : r.echoCancellation) != null ? c : true,
19412
19413
  noiseSuppression: (d = r == null ? void 0 : r.noiseSupression) != null ? d : true,
19413
19414
  channelCount: i
19414
- }, e2) : (e2.audio = {}, e2.audio.optional = [
19415
- t2 ? { sourceId: t2 } : { sourceId: "default" },
19416
- { channelCount: i },
19417
- { echoCancellation: (l = r == null ? void 0 : r.echoCancellation) != null ? l : true },
19418
- { googEchoCancellation: (p = r == null ? void 0 : r.echoCancellation) != null ? p : true },
19419
- { googAutoGainControl: (f = r == null ? void 0 : r.autoGainControl) != null ? f : true },
19420
- { googNoiseSuppression: (S = r == null ? void 0 : r.noiseSupression) != null ? S : true },
19421
- { googHighpassFilter: true }
19422
- ], e2);
19415
+ }, e2) : (e2.audio = {
19416
+ autoGainControl: (l = r == null ? void 0 : r.autoGainControl) != null ? l : true,
19417
+ echoCancellation: (p = r == null ? void 0 : r.echoCancellation) != null ? p : true,
19418
+ noiseSuppression: (f = r == null ? void 0 : r.noiseSupression) != null ? f : true,
19419
+ channelCount: i
19420
+ }, t2 && t2 !== "default" && (e2.audio.deviceId = { exact: t2 }), e2);
19423
19421
  });
19424
19422
  h(this, "getVideoConstraints", (t2) => {
19425
19423
  var n, o, c, d;
@@ -20008,12 +20006,12 @@ let Ld = class extends Jn {
20008
20006
  });
20009
20007
  }
20010
20008
  getCurrentDeviceId() {
20011
- var e, r;
20009
+ var e, r, i, n;
20012
20010
  const { kind: t } = this.mediaTrack;
20013
20011
  switch (t) {
20014
20012
  case "audio": {
20015
- const i = this.mediaTrack.getConstraints();
20016
- return this.userSelectedDevice ? (r = (e = i == null ? void 0 : i.deviceId) != null ? e : i == null ? void 0 : i.advanced[0].deviceId) != null ? r : this.mediaTrack.getSettings().deviceId : this.mediaTrack.getSettings().deviceId;
20013
+ const o = this.mediaTrack.getConstraints();
20014
+ return this.userSelectedDevice ? (n = (i = (r = o == null ? void 0 : o.deviceId) != null ? r : (e = o == null ? void 0 : o.advanced) == null ? void 0 : e[0].deviceId) != null ? i : this.mediaTrack.getSettings().deviceId) != null ? n : "default" : this.mediaTrack.getSettings().deviceId;
20017
20015
  }
20018
20016
  default:
20019
20017
  return this.mediaTrack.getSettings().deviceId;
@@ -30511,7 +30509,7 @@ let ri = (Wg = class {
30511
30509
  video: true
30512
30510
  };
30513
30511
  return n.setValue("options", e), 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", (d = e.overrides) != null ? d : {}), n.setValue("env", PC({ baseURI: i.baseURI })), n.setValue("defaults", c), n.setValue("onError", e.onError || (() => {
30514
- })), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "3.1.7-staging.2"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new oO()), n;
30512
+ })), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "3.1.7-staging.4"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new oO()), n;
30515
30513
  }
30516
30514
  join() {
30517
30515
  return u(this, null, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/realtimekit-react",
3
- "version": "1.1.7-staging.2",
3
+ "version": "1.1.7-staging.4",
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": "1.1.7-staging.2"
20
+ "@cloudflare/realtimekit": "1.1.7-staging.4"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=16.8.6"