@cloudflare/realtimekit 1.1.7-staging.1 → 1.1.7-staging.3

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
@@ -5892,6 +5892,7 @@ declare global {
5892
5892
  RNLocalMediaHandlerImpl?: any;
5893
5893
  RNAudioSampleHandlerImpl?: any;
5894
5894
  RNBackgroundTimerImpl?: any;
5895
+ RNDeviceInfoImpl?: any;
5895
5896
  isReactNative?: boolean;
5896
5897
  }
5897
5898
  interface Window {
package/dist/index.es.js CHANGED
@@ -9704,7 +9704,9 @@ const CC = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d=
9704
9704
  init(t, e, r) {
9705
9705
  this.tracingEnabled = true, this.initialized = false, this.logsCache = [];
9706
9706
  const i = t.getValue("peerId");
9707
- this.meetingMetadata = e, this.tracingEnabled = r, this.meetingMetadata.peerId = i, this.meetingMetadata.sdkVersion = t.getValue("sdkVersion"), this.meetingMetadata.deviceInfo = Te.getDeviceInfo(), this.meetingMetadata.visitedUrl = !navigator.isReactNative && typeof window != "undefined" && window.location.href, this.logsProcessorTimer = setInterval(
9707
+ this.meetingMetadata = e, this.tracingEnabled = r, this.meetingMetadata.peerId = i, this.meetingMetadata.sdkVersion = t.getValue("sdkVersion");
9708
+ const { RNDeviceInfoImpl: n } = navigator;
9709
+ this.meetingMetadata.deviceInfo = navigator.isReactNative ? n == null ? void 0 : n.getDeviceInfo() : Te.getDeviceInfo(), this.meetingMetadata.visitedUrl = !navigator.isReactNative && typeof window != "undefined" && window.location.href, this.logsProcessorTimer = setInterval(
9708
9710
  this.processCachedLogs.bind(this),
9709
9711
  this.logsProcessingInterval
9710
9712
  ), r && (this.initialized = true);
@@ -19394,7 +19396,7 @@ class n0 {
19394
19396
  };
19395
19397
  });
19396
19398
  h(this, "getAudioConstraints", (t2) => {
19397
- var n, o, c, d, l, p, f, S;
19399
+ var n, o, c, d, l, p, f;
19398
19400
  const e2 = {}, r = (n = a(this, ki)) == null ? void 0 : n.audio, i = r != null && r.enableStereo ? 2 : 1;
19399
19401
  return Te.isFirefox() || Te.isWebKitBased() ? (e2.audio = {
19400
19402
  deviceId: t2,
@@ -19402,15 +19404,12 @@ class n0 {
19402
19404
  echoCancellation: (c = r == null ? void 0 : r.echoCancellation) != null ? c : true,
19403
19405
  noiseSuppression: (d = r == null ? void 0 : r.noiseSupression) != null ? d : true,
19404
19406
  channelCount: i
19405
- }, e2) : (e2.audio = {}, e2.audio.optional = [
19406
- t2 ? { sourceId: t2 } : { sourceId: "default" },
19407
- { channelCount: i },
19408
- { echoCancellation: (l = r == null ? void 0 : r.echoCancellation) != null ? l : true },
19409
- { googEchoCancellation: (p = r == null ? void 0 : r.echoCancellation) != null ? p : true },
19410
- { googAutoGainControl: (f = r == null ? void 0 : r.autoGainControl) != null ? f : true },
19411
- { googNoiseSuppression: (S = r == null ? void 0 : r.noiseSupression) != null ? S : true },
19412
- { googHighpassFilter: true }
19413
- ], e2);
19407
+ }, e2) : (e2.audio = {
19408
+ autoGainControl: (l = r == null ? void 0 : r.autoGainControl) != null ? l : true,
19409
+ echoCancellation: (p = r == null ? void 0 : r.echoCancellation) != null ? p : true,
19410
+ noiseSuppression: (f = r == null ? void 0 : r.noiseSupression) != null ? f : true,
19411
+ channelCount: i
19412
+ }, t2 && t2 !== "default" && (e2.audio.deviceId = { exact: t2 }), e2);
19414
19413
  });
19415
19414
  h(this, "getVideoConstraints", (t2) => {
19416
19415
  var n, o, c, d;
@@ -19999,12 +19998,12 @@ let Ld = class extends Jn {
19999
19998
  });
20000
19999
  }
20001
20000
  getCurrentDeviceId() {
20002
- var e, r;
20001
+ var e, r, i, n;
20003
20002
  const { kind: t } = this.mediaTrack;
20004
20003
  switch (t) {
20005
20004
  case "audio": {
20006
- const i = this.mediaTrack.getConstraints();
20007
- 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;
20005
+ const o = this.mediaTrack.getConstraints();
20006
+ 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;
20008
20007
  }
20009
20008
  default:
20010
20009
  return this.mediaTrack.getSettings().deviceId;
@@ -30502,7 +30501,7 @@ let ri = (Wg = class {
30502
30501
  video: true
30503
30502
  };
30504
30503
  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 || (() => {
30505
- })), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "3.1.7-staging.1"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new oO()), n;
30504
+ })), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "3.1.7-staging.3"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new oO()), n;
30506
30505
  }
30507
30506
  join() {
30508
30507
  return u(this, null, function* () {