@cloudflare/realtimekit 2.0.4-staging.1 → 2.0.4-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/browser.js +2 -2
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.es.js +16 -14
- package/dist/index.es5.js +17 -15
- package/dist/index.rn.js +6 -6
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -15911,7 +15911,7 @@ let Ht = (Tm = class extends pD {
|
|
|
15911
15911
|
const t = yield navigator.mediaDevices.enumerateDevices(), e = (i) => {
|
|
15912
15912
|
var o;
|
|
15913
15913
|
const a = ((o = i.label) == null ? void 0 : o.toLowerCase()) || "";
|
|
15914
|
-
return Fd(i) ? 4 : a.includes("airpods") || a.includes("airdopes") || a.includes("bluetooth") || a.includes("wireless") || a.includes("headphones") || a.includes("headset") || a.includes("earbuds") || a.includes("usb") || a.includes("external") ? 0 : i.deviceId === "default" || a.includes("default") ? 1 : a.includes("built-in") || a.includes("internal") ? 2 : 3;
|
|
15914
|
+
return Fd(i) ? 4 : a.includes("airpods") || a.includes("airdopes") || a.includes("bluetooth") || a.includes("wireless") || a.includes("headphones") || a.includes("headset") && !a.includes("earpiece") || a.includes("earbuds") || a.includes("usb") || a.includes("external") ? 0 : i.deviceId === "default" || a.includes("default") ? 1 : a.includes("built-in") || a.includes("internal") ? 2 : 3;
|
|
15915
15915
|
}, r = (i) => {
|
|
15916
15916
|
var o;
|
|
15917
15917
|
if (i.kind !== "videoinput")
|
|
@@ -18544,7 +18544,7 @@ const co = (Pm = class {
|
|
|
18544
18544
|
this.logger.debug(`Processing socket join for ${this.self.id === h.id ? "local peer" : "remote peer"} ${h.id} listed in socket peers.`), this.onParticipantSocketJoined(h), this.logger.debug(`Processed socket join for ${this.self.id === h.id ? "local peer" : "remote peer"} ${h.id} listed in socket peers.`);
|
|
18545
18545
|
});
|
|
18546
18546
|
}
|
|
18547
|
-
|
|
18547
|
+
handlePeerMediaJoinedBroadcast({
|
|
18548
18548
|
participant: s,
|
|
18549
18549
|
producerHandoverFromPeerId: t
|
|
18550
18550
|
}) {
|
|
@@ -18573,7 +18573,7 @@ const co = (Pm = class {
|
|
|
18573
18573
|
this.handleSocketPeers.bind(this)
|
|
18574
18574
|
), this.roomSocketHandler.on(
|
|
18575
18575
|
this.events.peerJoinedBroadcast,
|
|
18576
|
-
this.
|
|
18576
|
+
this.handlePeerMediaJoinedBroadcast.bind(this)
|
|
18577
18577
|
), this.roomSocketHandler.on(
|
|
18578
18578
|
this.events.selfJoinComplete,
|
|
18579
18579
|
(r) => u(this, [r], function* ({
|
|
@@ -18705,35 +18705,37 @@ const co = (Pm = class {
|
|
|
18705
18705
|
* Socket Service only
|
|
18706
18706
|
*/
|
|
18707
18707
|
waitingRoomRequestHandler(s) {
|
|
18708
|
+
var r, i;
|
|
18709
|
+
this.logger.info(`Received waitlisted peers: ${((i = (r = s == null ? void 0 : s.requests) == null ? void 0 : r.map((a) => a.peerId)) == null ? void 0 : i.join(", ")) || "none"}`);
|
|
18708
18710
|
const t = s.requests.filter(
|
|
18709
|
-
(
|
|
18711
|
+
(a) => !this.participants.waitlisted.get(a.peerId)
|
|
18710
18712
|
), e = this.participants.waitlisted.toArray().filter(
|
|
18711
|
-
(
|
|
18713
|
+
(a) => !s.requests.find((o) => o.peerId === a.id)
|
|
18712
18714
|
);
|
|
18713
|
-
t.forEach((
|
|
18715
|
+
t.forEach((a) => this.participants.waitlisted.add(
|
|
18714
18716
|
new Sr(
|
|
18715
18717
|
this.context,
|
|
18716
18718
|
{
|
|
18717
|
-
id:
|
|
18718
|
-
displayName:
|
|
18719
|
+
id: a.peerId,
|
|
18720
|
+
displayName: a.displayName,
|
|
18719
18721
|
audioMuted: !0,
|
|
18720
18722
|
videoEnabled: !1,
|
|
18721
18723
|
audioTrack: void 0,
|
|
18722
18724
|
videoTrack: void 0,
|
|
18723
18725
|
stageStatus: "OFF_STAGE",
|
|
18724
|
-
userId:
|
|
18726
|
+
userId: a.userId,
|
|
18725
18727
|
flags: {},
|
|
18726
18728
|
isHost: !1,
|
|
18727
|
-
customParticipantId:
|
|
18728
|
-
picture:
|
|
18729
|
+
customParticipantId: a.customParticipantId,
|
|
18730
|
+
picture: a.picture,
|
|
18729
18731
|
metadata: {
|
|
18730
|
-
preset_name:
|
|
18732
|
+
preset_name: a.presetName
|
|
18731
18733
|
}
|
|
18732
18734
|
},
|
|
18733
18735
|
this.self,
|
|
18734
18736
|
this.roomSocketHandler
|
|
18735
18737
|
)
|
|
18736
|
-
)), e.forEach((
|
|
18738
|
+
)), e.forEach((a) => this.participants.waitlisted.delete(a.id));
|
|
18737
18739
|
}
|
|
18738
18740
|
get maxPreferredStreams() {
|
|
18739
18741
|
return this.participants.maxActiveParticipantsCount;
|
|
@@ -27569,7 +27571,7 @@ let oi = (Rm = class {
|
|
|
27569
27571
|
video: !0
|
|
27570
27572
|
};
|
|
27571
27573
|
return a.setValue("options", e), a.setValue("peerId", t), a.setValue("modules", o), a.setValue("sdkName", "web-core"), a.setValue("meetingId", r), a.setValue("apiBase", i.apiBase), a.setValue("baseURI", i.baseURI), a.setValue("userId", i.participantId), a.setValue("organizationId", i.orgId), a.setValue("authToken", e.authToken), a.setValue("overrides", (d = e.overrides) != null ? d : {}), a.setValue("env", AC({ baseURI: i.baseURI })), a.setValue("defaults", c), a.setValue("onError", e.onError || (() => {
|
|
27572
|
-
})), a.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), a.setValue("sdkVersion", "2.0.4-staging.
|
|
27574
|
+
})), a.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), a.setValue("sdkVersion", "2.0.4-staging.3"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new m1()), a;
|
|
27573
27575
|
}
|
|
27574
27576
|
join() {
|
|
27575
27577
|
return u(this, null, function* () {
|
package/dist/index.es5.js
CHANGED
|
@@ -15259,7 +15259,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
|
|
|
15259
15259
|
case 1:
|
|
15260
15260
|
return i = c.v, a = function(d) {
|
|
15261
15261
|
var p, v = ((p = d.label) === null || p === void 0 ? void 0 : p.toLowerCase()) || "";
|
|
15262
|
-
return kl(d) ? 4 : v.includes("airpods") || v.includes("airdopes") || v.includes("bluetooth") || v.includes("wireless") || v.includes("headphones") || v.includes("headset") || v.includes("earbuds") || v.includes("usb") || v.includes("external") ? 0 : d.deviceId === "default" || v.includes("default") ? 1 : v.includes("built-in") || v.includes("internal") ? 2 : 3;
|
|
15262
|
+
return kl(d) ? 4 : v.includes("airpods") || v.includes("airdopes") || v.includes("bluetooth") || v.includes("wireless") || v.includes("headphones") || v.includes("headset") && !v.includes("earpiece") || v.includes("earbuds") || v.includes("usb") || v.includes("external") ? 0 : d.deviceId === "default" || v.includes("default") ? 1 : v.includes("built-in") || v.includes("internal") ? 2 : 3;
|
|
15263
15263
|
}, o = function(d) {
|
|
15264
15264
|
var p;
|
|
15265
15265
|
if (d.kind !== "videoinput")
|
|
@@ -18294,7 +18294,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
|
|
|
18294
18294
|
}
|
|
18295
18295
|
n.logger.debug("Processing socket join for ".concat(n.self.id === f.id ? "local peer" : "remote peer", " ").concat(f.id, " listed in socket peers.")), n.onParticipantSocketJoined(f), n.logger.debug("Processed socket join for ".concat(n.self.id === f.id ? "local peer" : "remote peer", " ").concat(f.id, " listed in socket peers."));
|
|
18296
18296
|
});
|
|
18297
|
-
} }, { key: "
|
|
18297
|
+
} }, { key: "handlePeerMediaJoinedBroadcast", value: function(e) {
|
|
18298
18298
|
var t, n = e.participant, i = e.producerHandoverFromPeerId;
|
|
18299
18299
|
if (n) {
|
|
18300
18300
|
var a = n.peerId === this.self.id, o = (t = n.producerStates) !== null && t !== void 0 ? t : [];
|
|
@@ -18313,7 +18313,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
|
|
|
18313
18313
|
key: "setupEvents",
|
|
18314
18314
|
value: function() {
|
|
18315
18315
|
var e = this;
|
|
18316
|
-
this.roomSocketHandler.on(z.getWaitingRoomRequests, this.waitingRoomRequestHandler.bind(this)), this.context.getValue("peerSessionStore").on($.SOCKET_PEERS, this.handleSocketPeers.bind(this)), this.roomSocketHandler.on(this.events.peerJoinedBroadcast, this.
|
|
18316
|
+
this.roomSocketHandler.on(z.getWaitingRoomRequests, this.waitingRoomRequestHandler.bind(this)), this.context.getValue("peerSessionStore").on($.SOCKET_PEERS, this.handleSocketPeers.bind(this)), this.roomSocketHandler.on(this.events.peerJoinedBroadcast, this.handlePeerMediaJoinedBroadcast.bind(this)), this.roomSocketHandler.on(this.events.selfJoinComplete, /* @__PURE__ */ function() {
|
|
18317
18317
|
var t = m(/* @__PURE__ */ h().m(function n(i) {
|
|
18318
18318
|
var a, o, c, l, d, p;
|
|
18319
18319
|
return h().w(function(v) {
|
|
@@ -18414,19 +18414,21 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
|
|
|
18414
18414
|
* Socket Service only
|
|
18415
18415
|
*/
|
|
18416
18416
|
}, { key: "waitingRoomRequestHandler", value: function(e) {
|
|
18417
|
-
var t
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
return !
|
|
18423
|
-
|
|
18417
|
+
var t, n = this;
|
|
18418
|
+
this.logger.info("Received waitlisted peers: ".concat((e == null || (t = e.requests) === null || t === void 0 || (t = t.map(function(o) {
|
|
18419
|
+
return o.peerId;
|
|
18420
|
+
})) === null || t === void 0 ? void 0 : t.join(", ")) || "none"));
|
|
18421
|
+
var i = e.requests.filter(function(o) {
|
|
18422
|
+
return !n.participants.waitlisted.get(o.peerId);
|
|
18423
|
+
}), a = this.participants.waitlisted.toArray().filter(function(o) {
|
|
18424
|
+
return !e.requests.find(function(c) {
|
|
18425
|
+
return c.peerId === o.id;
|
|
18424
18426
|
});
|
|
18425
18427
|
});
|
|
18426
|
-
|
|
18427
|
-
return
|
|
18428
|
-
}),
|
|
18429
|
-
return
|
|
18428
|
+
i.forEach(function(o) {
|
|
18429
|
+
return n.participants.waitlisted.add(new Ji(n.context, { id: o.peerId, displayName: o.displayName, audioMuted: !0, videoEnabled: !1, audioTrack: void 0, videoTrack: void 0, stageStatus: "OFF_STAGE", userId: o.userId, flags: {}, isHost: !1, customParticipantId: o.customParticipantId, picture: o.picture, metadata: { preset_name: o.presetName } }, n.self, n.roomSocketHandler));
|
|
18430
|
+
}), a.forEach(function(o) {
|
|
18431
|
+
return n.participants.waitlisted.delete(o.id);
|
|
18430
18432
|
});
|
|
18431
18433
|
} }, { key: "maxPreferredStreams", get: function() {
|
|
18432
18434
|
return this.participants.maxActiveParticipantsCount;
|
|
@@ -28450,7 +28452,7 @@ var gr = /* @__PURE__ */ w("trackMap"), m2 = /* @__PURE__ */ function(s) {
|
|
|
28450
28452
|
}, { key: "setupContext", value: function(e, t, n, i) {
|
|
28451
28453
|
var a, o, c = Aa.createContext(e, t), l = V(V({}, RP), t == null ? void 0 : t.modules), d = t.defaults || { audio: !0, video: !0 };
|
|
28452
28454
|
return c.setValue("options", t), c.setValue("peerId", e), c.setValue("modules", l), c.setValue("sdkName", "web-core"), c.setValue("meetingId", n), c.setValue("apiBase", i.apiBase), c.setValue("baseURI", i.baseURI), c.setValue("userId", i.participantId), c.setValue("organizationId", i.orgId), c.setValue("authToken", t.authToken), c.setValue("overrides", (a = t.overrides) !== null && a !== void 0 ? a : {}), c.setValue("env", _P({ baseURI: i.baseURI })), c.setValue("defaults", d), c.setValue("onError", t.onError || function() {
|
|
28453
|
-
}), c.setValue("cachedUserDetails", di(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.4-staging.
|
|
28455
|
+
}), c.setValue("cachedUserDetails", di(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.4-staging.3"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new m2()), c;
|
|
28454
28456
|
} }]);
|
|
28455
28457
|
}());
|
|
28456
28458
|
Yl([dr("0002"), Xi.executeWithLock({ methodName: "meeting.join", lockName: "Client.join", timeout: 3e3 })], Ma.prototype, "join", 1);
|