@cloudflare/realtimekit 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/browser.js +3 -3
- package/dist/index.cjs.js +3 -3
- package/dist/index.es.js +22 -18
- package/dist/index.rn.js +24 -0
- package/package.json +2 -1
package/dist/index.es.js
CHANGED
|
@@ -24885,7 +24885,7 @@ function OO(s) {
|
|
|
24885
24885
|
function qc(s) {
|
|
24886
24886
|
return {
|
|
24887
24887
|
codecs: DO(s.codecs),
|
|
24888
|
-
headerExtensions: OO(s.headerExtensions)
|
|
24888
|
+
headerExtensions: OO(s.headerExtensions ? s.headerExtensions : [])
|
|
24889
24889
|
};
|
|
24890
24890
|
}
|
|
24891
24891
|
function NO(s) {
|
|
@@ -27530,21 +27530,25 @@ tr = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), ms = /*
|
|
|
27530
27530
|
const e = Math.log10(t);
|
|
27531
27531
|
return Math.round(e);
|
|
27532
27532
|
}, g(fo, lc), g(fo, ml);
|
|
27533
|
-
const YO = () => {
|
|
27534
|
-
const
|
|
27535
|
-
|
|
27536
|
-
const
|
|
27537
|
-
|
|
27538
|
-
const
|
|
27539
|
-
|
|
27540
|
-
|
|
27541
|
-
|
|
27542
|
-
|
|
27543
|
-
|
|
27544
|
-
const e =
|
|
27545
|
-
|
|
27546
|
-
|
|
27547
|
-
|
|
27533
|
+
const YO = (s = false) => {
|
|
27534
|
+
const t = new window.AudioContext(), e = t.createOscillator();
|
|
27535
|
+
e.type = "triangle", e.frequency.setValueAtTime(20, t.currentTime);
|
|
27536
|
+
const r = t.createGain();
|
|
27537
|
+
r.gain.setValueAtTime(0, t.currentTime), e.connect(r);
|
|
27538
|
+
const i = t.createMediaStreamDestination();
|
|
27539
|
+
r.connect(i), e.start();
|
|
27540
|
+
const n = i.stream.getAudioTracks()[0];
|
|
27541
|
+
return n.enabled = s, n;
|
|
27542
|
+
}, QO = (s = false) => {
|
|
27543
|
+
var n, a;
|
|
27544
|
+
const t = new MediaStream().getVideoTracks()[0], e = document.createElement("canvas");
|
|
27545
|
+
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;
|
|
27546
|
+
const r = e.getContext("2d");
|
|
27547
|
+
r.fillStyle = "black", r.fillRect(0, 0, e.width, e.height), setInterval(() => {
|
|
27548
|
+
r.fillStyle = "black", r.fillRect(0, 0, e.width, e.height);
|
|
27549
|
+
}, 1e3);
|
|
27550
|
+
const i = e.captureStream().getVideoTracks()[0];
|
|
27551
|
+
return i.enabled = s, i;
|
|
27548
27552
|
};
|
|
27549
27553
|
var XO = Object.defineProperty, ZO = Object.getOwnPropertyDescriptor, le = (s, t, e, r) => {
|
|
27550
27554
|
for (var i = r > 1 ? void 0 : r ? ZO(t, e) : t, n = s.length - 1, a; n >= 0; n--)
|
|
@@ -27593,7 +27597,7 @@ class oe {
|
|
|
27593
27597
|
])), v(this, Gi, /* @__PURE__ */ new Map([
|
|
27594
27598
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
27595
27599
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
27596
|
-
])), 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(
|
|
27600
|
+
])), 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(
|
|
27597
27601
|
o(this, W).socketHandler.audioActivity.bind(o(this, W).socketHandler)
|
|
27598
27602
|
)), this.e2ee = (a = (n = t.getValue("modules").e2ee) == null ? void 0 : n.enabled) != null ? a : false, this.handleSocketEvents(), this.handleCallstatsEvents(), v(this, pc, gd(
|
|
27599
27603
|
() => u(this, null, function* () {
|
|
@@ -30705,7 +30709,7 @@ let si = (Pf = class {
|
|
|
30705
30709
|
var c;
|
|
30706
30710
|
const n = Ji.createContext(t, e), a = N(N({}, YR), e == null ? void 0 : e.modules);
|
|
30707
30711
|
return n.setValue("peerId", t), n.setValue("modules", a), 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", (c = e.overrides) != null ? c : {}), n.setValue("env", QR({ baseURI: i.baseURI })), n.setValue("defaults", e.defaults || { audio: true, video: true }), n.setValue("onError", e.onError || (() => {
|
|
30708
|
-
})), n.setValue("cachedUserDetails", ys(e.cachedUserDetails)), n.setValue("sdkVersion", "2.5.0-staging.
|
|
30712
|
+
})), n.setValue("cachedUserDetails", ys(e.cachedUserDetails)), n.setValue("sdkVersion", "2.5.0-staging.98"), n;
|
|
30709
30713
|
}
|
|
30710
30714
|
join() {
|
|
30711
30715
|
return u(this, null, function* () {
|