@cloudflare/realtimekit 1.4.0-staging.5 → 1.4.0
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 +2 -2
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +21 -20
- package/dist/index.es5.js +658 -653
- package/dist/index.rn.js +10 -10
- package/package.json +3 -2
package/dist/index.es.js
CHANGED
|
@@ -25122,7 +25122,9 @@ Sc = new WeakMap(), vc = new WeakMap(), at = new WeakMap(), W = new WeakMap(), R
|
|
|
25122
25122
|
return u(this, null, function* () {
|
|
25123
25123
|
S(this, vc, t);
|
|
25124
25124
|
try {
|
|
25125
|
-
|
|
25125
|
+
a(this, es) ? yield a(this, es) : yield x(this, yc, Ju).call(this, t, e, r, i), x(this, pl, dS).call(this, e);
|
|
25126
|
+
const { joined: n, error: o } = yield x(this, hl, cS).call(this);
|
|
25127
|
+
return { roomJoined: n, error: o };
|
|
25126
25128
|
} catch (n) {
|
|
25127
25129
|
return this.logger.error("Failed to complete room join", { error: n }), { roomJoined: !1, error: n };
|
|
25128
25130
|
} finally {
|
|
@@ -25134,9 +25136,9 @@ Sc = new WeakMap(), vc = new WeakMap(), at = new WeakMap(), W = new WeakMap(), R
|
|
|
25134
25136
|
try {
|
|
25135
25137
|
this.mediaJoined = !0;
|
|
25136
25138
|
const { roomState: t } = yield a(this, W).socketHandler.notifySelfJoinComplete();
|
|
25137
|
-
return S(this, Sc, t.roomUuid), S(this, Hi, !0), S(this, Bi, !1), !0;
|
|
25139
|
+
return S(this, Sc, t.roomUuid), S(this, Hi, !0), S(this, Bi, !1), { joined: !0 };
|
|
25138
25140
|
} catch (t) {
|
|
25139
|
-
return this.logger.error("Error completing room join", { error: t }), this.mediaJoined = !1, !1;
|
|
25141
|
+
return this.logger.error("Error completing room join", { error: t }), this.mediaJoined = !1, { joined: !1, error: t };
|
|
25140
25142
|
}
|
|
25141
25143
|
});
|
|
25142
25144
|
}, pl = new WeakSet(), dS = function(t) {
|
|
@@ -25582,9 +25584,13 @@ const vS = (Ag = class {
|
|
|
25582
25584
|
this.waitlistedHandler();
|
|
25583
25585
|
return;
|
|
25584
25586
|
}
|
|
25587
|
+
} catch (t) {
|
|
25588
|
+
throw this.logger.error("SelfController.joinRoom: socket join failed", { error: t }), new k("Could not connect to the room.", "0002");
|
|
25589
|
+
}
|
|
25590
|
+
try {
|
|
25585
25591
|
yield this.joinMediaRoom(s), a(this, Z).notify("stageStatus");
|
|
25586
25592
|
} catch (t) {
|
|
25587
|
-
throw this.logger.error("
|
|
25593
|
+
throw this.logger.error("SelfController.joinRoom: media room join failed", { error: t }), new k("Could not establish media connection.", "0002");
|
|
25588
25594
|
}
|
|
25589
25595
|
});
|
|
25590
25596
|
}
|
|
@@ -25606,7 +25612,7 @@ const vS = (Ag = class {
|
|
|
25606
25612
|
}
|
|
25607
25613
|
joinMediaRoom(s = !1) {
|
|
25608
25614
|
return u(this, null, function* () {
|
|
25609
|
-
var n, o
|
|
25615
|
+
var n, o;
|
|
25610
25616
|
const {
|
|
25611
25617
|
peerId: t,
|
|
25612
25618
|
viewType: e,
|
|
@@ -25624,22 +25630,22 @@ const vS = (Ag = class {
|
|
|
25624
25630
|
peerId: t
|
|
25625
25631
|
});
|
|
25626
25632
|
}
|
|
25627
|
-
const { canProduceAudio:
|
|
25633
|
+
const { canProduceAudio: c, canProduceVideo: d, canProduceScreenshare: l } = this.self.permissions, { roomJoined: h, error: g } = (o = yield (n = a(this, St, At)) == null ? void 0 : n.joinRoom(
|
|
25628
25634
|
this.self.name,
|
|
25629
25635
|
r,
|
|
25630
25636
|
s,
|
|
25631
25637
|
s,
|
|
25632
25638
|
{
|
|
25633
|
-
canProduceAudio:
|
|
25634
|
-
canProduceVideo:
|
|
25635
|
-
canProduceScreenshare:
|
|
25639
|
+
canProduceAudio: c,
|
|
25640
|
+
canProduceVideo: d,
|
|
25641
|
+
canProduceScreenshare: l
|
|
25636
25642
|
}
|
|
25637
25643
|
)) != null ? o : {};
|
|
25638
|
-
if (!
|
|
25639
|
-
throw
|
|
25644
|
+
if (!h)
|
|
25645
|
+
throw g != null ? g : new Error("Could not connect to media server");
|
|
25640
25646
|
i === "ON_STAGE" && (yield this.shareMediaTracks()), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: s });
|
|
25641
|
-
} catch (
|
|
25642
|
-
throw this.logger.error("
|
|
25647
|
+
} catch (c) {
|
|
25648
|
+
throw this.logger.error("SelfController.mediaRoomJoin", { error: c }), c;
|
|
25643
25649
|
}
|
|
25644
25650
|
});
|
|
25645
25651
|
}
|
|
@@ -25884,12 +25890,7 @@ class TS {
|
|
|
25884
25890
|
} catch (n) {
|
|
25885
25891
|
throw this.logger.error("RoomSocketHandler.joinRoom.failed", {
|
|
25886
25892
|
error: n
|
|
25887
|
-
}),
|
|
25888
|
-
"Error: RoomSocketHandler.joinRoom failed.",
|
|
25889
|
-
"0002",
|
|
25890
|
-
this.logger,
|
|
25891
|
-
n
|
|
25892
|
-
);
|
|
25893
|
+
}), n;
|
|
25893
25894
|
}
|
|
25894
25895
|
});
|
|
25895
25896
|
}
|
|
@@ -28292,7 +28293,7 @@ let Qr = (Og = class {
|
|
|
28292
28293
|
video: !0
|
|
28293
28294
|
};
|
|
28294
28295
|
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 || (() => {
|
|
28295
|
-
})), n.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), n.setValue("sdkVersion", "1.4.0
|
|
28296
|
+
})), n.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), n.setValue("sdkVersion", "1.4.0"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new PO()), n;
|
|
28296
28297
|
}
|
|
28297
28298
|
join() {
|
|
28298
28299
|
return u(this, null, function* () {
|