@cloudflare/realtimekit-react 0.5.0-staging.96 → 0.5.0-staging.98

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
@@ -24892,7 +24892,7 @@ function OO(s) {
24892
24892
  function qc(s) {
24893
24893
  return {
24894
24894
  codecs: DO(s.codecs),
24895
- headerExtensions: OO(s.headerExtensions)
24895
+ headerExtensions: OO(s.headerExtensions ? s.headerExtensions : [])
24896
24896
  };
24897
24897
  }
24898
24898
  function NO(s) {
@@ -27537,21 +27537,25 @@ tr = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), ms = /*
27537
27537
  const e = Math.log10(t);
27538
27538
  return Math.round(e);
27539
27539
  }, g(fo, lc), g(fo, ml);
27540
- const YO = () => {
27541
- const s = new window.AudioContext(), t = s.createOscillator();
27542
- t.type = "triangle", t.frequency.setValueAtTime(20, s.currentTime);
27543
- const e = s.createGain();
27544
- e.gain.setValueAtTime(0, s.currentTime), t.connect(e);
27545
- const r = s.createMediaStreamDestination();
27546
- return e.connect(r), t.start(), r.stream.getAudioTracks()[0];
27547
- }, QO = () => {
27548
- var r, i;
27549
- const s = new MediaStream().getVideoTracks()[0], t = document.createElement("canvas");
27550
- t.height = (r = s == null ? void 0 : s.getSettings().height) != null ? r : 720, t.width = (i = s == null ? void 0 : s.getSettings().width) != null ? i : 1280;
27551
- const e = t.getContext("2d");
27552
- return e.fillStyle = "black", e.fillRect(0, 0, t.width, t.height), setInterval(() => {
27553
- e.fillStyle = "black", e.fillRect(0, 0, t.width, t.height);
27554
- }, 1e3), t.captureStream().getVideoTracks()[0];
27540
+ const YO = (s = false) => {
27541
+ const t = new window.AudioContext(), e = t.createOscillator();
27542
+ e.type = "triangle", e.frequency.setValueAtTime(20, t.currentTime);
27543
+ const r = t.createGain();
27544
+ r.gain.setValueAtTime(0, t.currentTime), e.connect(r);
27545
+ const i = t.createMediaStreamDestination();
27546
+ r.connect(i), e.start();
27547
+ const n = i.stream.getAudioTracks()[0];
27548
+ return n.enabled = s, n;
27549
+ }, QO = (s = false) => {
27550
+ var n, a;
27551
+ const t = new MediaStream().getVideoTracks()[0], e = document.createElement("canvas");
27552
+ e.height = (n = t == null ? void 0 : t.getSettings().height) != null ? n : 720, e.width = (a = t == null ? void 0 : t.getSettings().width) != null ? a : 1280;
27553
+ const r = e.getContext("2d");
27554
+ r.fillStyle = "black", r.fillRect(0, 0, e.width, e.height), setInterval(() => {
27555
+ r.fillStyle = "black", r.fillRect(0, 0, e.width, e.height);
27556
+ }, 1e3);
27557
+ const i = e.captureStream().getVideoTracks()[0];
27558
+ return i.enabled = s, i;
27555
27559
  };
27556
27560
  var XO = Object.defineProperty, ZO = Object.getOwnPropertyDescriptor, le = (s, t, e, r) => {
27557
27561
  for (var i = r > 1 ? void 0 : r ? ZO(t, e) : t, n = s.length - 1, a; n >= 0; n--)
@@ -27600,7 +27604,7 @@ class oe {
27600
27604
  ])), v(this, Gi, /* @__PURE__ */ new Map([
27601
27605
  ["video/VP9", /* @__PURE__ */ new Set()],
27602
27606
  ["video/VP8", /* @__PURE__ */ new Set()]
27603
- ])), v(this, jr, e), v(this, lt, i), v(this, Hi, false), v(this, W, new JO(t, i, e)), v(this, St, o(this, W).events), v(this, ir, /* @__PURE__ */ new Set()), v(this, Et, /* @__PURE__ */ new Map()), v(this, qi, false), v(this, Gr, new Pd()), e === Ye.CF && v(this, It, new fo(
27607
+ ])), v(this, jr, e), v(this, lt, i), v(this, Hi, false), v(this, W, new JO(t, i, e)), v(this, St, o(this, W).events), v(this, ir, /* @__PURE__ */ new Set()), v(this, Et, /* @__PURE__ */ new Map()), v(this, qi, false), v(this, Gr, new Pd()), e === Ye.CF && !navigator.isReactNative && v(this, It, new fo(
27604
27608
  o(this, W).socketHandler.audioActivity.bind(o(this, W).socketHandler)
27605
27609
  )), this.e2ee = (a = (n = t.getValue("modules").e2ee) == null ? void 0 : n.enabled) != null ? a : false, this.handleSocketEvents(), this.handleCallstatsEvents(), v(this, pc, gd(
27606
27610
  () => u(this, null, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/realtimekit-react",
3
- "version": "0.5.0-staging.96",
3
+ "version": "0.5.0-staging.98",
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": "0.5.0-staging.96"
20
+ "@cloudflare/realtimekit": "0.5.0-staging.98"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=16.8.6"