@cloudflare/realtimekit 1.4.0-staging.1 → 1.4.0-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.es.js CHANGED
@@ -5709,7 +5709,8 @@ class P {
5709
5709
  fetch(this.logsEndpoint, {
5710
5710
  method: "POST",
5711
5711
  headers: {
5712
- "Content-Type": "application/json"
5712
+ "Content-Type": "application/json",
5713
+ Authorization: `Bearer ${e.getValue("authToken")}`
5713
5714
  },
5714
5715
  body: JSON.stringify({
5715
5716
  meetingMetadata: wp(
@@ -21747,7 +21748,15 @@ class Ah extends Ul {
21747
21748
  }
21748
21749
  connect() {
21749
21750
  return u(this, null, function* () {
21750
- this.pc.addTransceiver("audio", { direction: "sendonly" }), this.pc.addTransceiver("video", { direction: "sendonly" });
21751
+ this.pc.addTransceiver("audio", { direction: "sendonly" }), this.pc.addTransceiver("video", O({
21752
+ direction: "sendonly"
21753
+ }, this._direction === "send" ? {
21754
+ sendEncodings: [
21755
+ { rid: "f", scaleResolutionDownBy: 1 },
21756
+ { rid: "h", scaleResolutionDownBy: 2 },
21757
+ { rid: "q", scaleResolutionDownBy: 4 }
21758
+ ]
21759
+ } : {}));
21751
21760
  const e = yield this.pc.createOffer();
21752
21761
  return yield this.pc.setLocalDescription(e), this.logger.info(`connect offer: ${JSON.stringify(e)}`), {
21753
21762
  offerSdp: e,
@@ -24559,7 +24568,7 @@ class ae {
24559
24568
  return this._shareWebcam(t, e);
24560
24569
  }
24561
24570
  const n = [e].concat(kt.filter((_) => _ !== e)), o = x(this, Tl, mS).call(this, t, n), c = Aa(this.context, "disableSimulcast"), d = (v = (f = this.context) == null ? void 0 : f.getValue("overrides")) == null ? void 0 : v.simulcastConfig;
24562
- c || d && d.disable || !((C = (E = this.context) == null ? void 0 : E.getValue("theme")) != null && C.isSimulcastEnabled) ? this.logger.info("Simulcast disabled for webcam producer, SFU: CF") : (this.logger.info("Simulcast enabled for SFU: CF"), o.encodings = v0(this.context, t)), this.context.getValue("flagsmith").hasFeature(te.TRACK_HINT) && (o.track.contentHint = this.context.getValue("flagsmith").getValue(
24571
+ c || d && d.disable || !((C = (E = this.context) == null ? void 0 : E.getValue("theme")) != null && C.isSimulcastEnabled) ? this.logger.info("Simulcast disabled for webcam producer, SFU: CF") : (this.logger.info("Simulcast enabled for SFU: CF"), o.encodings = v0(this.context, t), this.logger.info(`Simulcast encodings: ${JSON.stringify(o.encodings)}`)), this.context.getValue("flagsmith").hasFeature(te.TRACK_HINT) && (o.track.contentHint = this.context.getValue("flagsmith").getValue(
24563
24572
  te.TRACK_HINT
24564
24573
  ));
24565
24574
  const p = () => {
@@ -25383,7 +25392,8 @@ const vS = (Ag = class {
25383
25392
  flags: s.getValue("flagsmith").getAllFlags(),
25384
25393
  logger: l,
25385
25394
  apiHostnames: GC(s),
25386
- skipConnectivityChecks: p
25395
+ skipConnectivityChecks: p,
25396
+ authToken: s.getValue("authToken")
25387
25397
  }), l.info("Callstats:: initialized");
25388
25398
  } catch (f) {
25389
25399
  l.error("Callstats:: initialization failed", { error: f });
@@ -28243,7 +28253,7 @@ let Qr = (Og = class {
28243
28253
  video: !0
28244
28254
  };
28245
28255
  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", jC({ baseURI: i.baseURI })), n.setValue("defaults", c), n.setValue("onError", e.onError || (() => {
28246
- })), n.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), n.setValue("sdkVersion", "1.4.0-staging.1"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new PO()), n;
28256
+ })), n.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), n.setValue("sdkVersion", "1.4.0-staging.3"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new PO()), n;
28247
28257
  }
28248
28258
  join() {
28249
28259
  return u(this, null, function* () {