@vindral/web-sdk 4.1.7-6-gf78b6ae3 → 4.1.7-8-g1b79f70a
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/{vvM0RY_m.js → CZND1w9j.js} +1 -1
- package/{C1M9ALEu.js → Dg0GCHvV.js} +28 -63
- package/core.js +1 -1
- package/{BuWPwnB_.js → gWGugTCn.js} +3 -11
- package/{CZNJPKf5.js → h5LA1Y1W.js} +324 -310
- package/legacy.es.js +43 -76
- package/legacy.umd.js +4 -4
- package/package.json +1 -1
- package/player.d.ts +6 -0
- package/player.js +8 -18
|
@@ -27,7 +27,7 @@ var X = (B, g, A) => new Promise((J, k) => {
|
|
|
27
27
|
}, o = (h) => h.done ? J(h.value) : Promise.resolve(h.value).then(y, a);
|
|
28
28
|
o((A = A.apply(B, g)).next());
|
|
29
29
|
});
|
|
30
|
-
import { F as RA, d as JA, n as kA } from "./
|
|
30
|
+
import { F as RA, d as JA, n as kA } from "./Dg0GCHvV.js";
|
|
31
31
|
var hA = (function() {
|
|
32
32
|
var B = typeof document != "undefined" && document.currentScript ? document.currentScript.src : void 0;
|
|
33
33
|
return (function(g) {
|
|
@@ -2,7 +2,7 @@ var om = Object.create;
|
|
|
2
2
|
var Hc = Object.defineProperty, cm = Object.defineProperties, hm = Object.getOwnPropertyDescriptor, um = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var $a = Object.getOwnPropertySymbols;
|
|
4
4
|
var yu = Object.prototype.hasOwnProperty, Su = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var lt = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), Bt = (s) => {
|
|
5
|
+
var lt = (s, e) => (e = Symbol[s]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + s), Bt = (s) => {
|
|
6
6
|
throw TypeError(s);
|
|
7
7
|
};
|
|
8
8
|
var Ya = (s, e, t) => e in s ? Hc(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, S = (s, e) => {
|
|
@@ -211,7 +211,9 @@ class ee {
|
|
|
211
211
|
r(this, "push", (e) => {
|
|
212
212
|
this.isFull() && this.pop(), this.values.push(e);
|
|
213
213
|
});
|
|
214
|
-
r(this, "clear", () =>
|
|
214
|
+
r(this, "clear", () => {
|
|
215
|
+
this.values = [];
|
|
216
|
+
});
|
|
215
217
|
r(this, "pop", () => this.values.shift());
|
|
216
218
|
r(this, "peekFirst", () => this.values[0]);
|
|
217
219
|
r(this, "peekLast", () => this.values[this.values.length - 1]);
|
|
@@ -684,10 +686,10 @@ function Pe(s) {
|
|
|
684
686
|
};
|
|
685
687
|
}
|
|
686
688
|
function Rt() {
|
|
687
|
-
return typeof Symbol.asyncDispose != "symbol" && Object.defineProperty(Symbol, "asyncDispose", { value: Symbol.for("asyncDispose") }), Symbol.asyncDispose;
|
|
689
|
+
return typeof Symbol.asyncDispose != "symbol" && Object.defineProperty(Symbol, "asyncDispose", { value: /* @__PURE__ */ Symbol.for("asyncDispose") }), Symbol.asyncDispose;
|
|
688
690
|
}
|
|
689
691
|
function Bd() {
|
|
690
|
-
return typeof Symbol.dispose != "symbol" && Object.defineProperty(Symbol, "dispose", { value: Symbol.for("dispose") }), Symbol.dispose;
|
|
692
|
+
return typeof Symbol.dispose != "symbol" && Object.defineProperty(Symbol, "dispose", { value: /* @__PURE__ */ Symbol.for("dispose") }), Symbol.dispose;
|
|
691
693
|
}
|
|
692
694
|
var Fr, hh;
|
|
693
695
|
class xm {
|
|
@@ -2065,11 +2067,7 @@ const Ir = class Ir {
|
|
|
2065
2067
|
let c;
|
|
2066
2068
|
for (; e.remaining() > 0; ) {
|
|
2067
2069
|
const h = ht(e);
|
|
2068
|
-
|
|
2069
|
-
case "avcC":
|
|
2070
|
-
c = h;
|
|
2071
|
-
break;
|
|
2072
|
-
}
|
|
2070
|
+
h.type === "avcC" && (c = h);
|
|
2073
2071
|
}
|
|
2074
2072
|
if (!c)
|
|
2075
2073
|
throw new Error("no avcC");
|
|
@@ -3216,7 +3214,9 @@ class Ah extends Ei {
|
|
|
3216
3214
|
});
|
|
3217
3215
|
r(this, "getPlaybackRate", () => this.element.playbackRate);
|
|
3218
3216
|
r(this, "getPlaybackState", () => this.element.readyState >= this.element.HAVE_FUTURE_DATA ? "playing" : "buffering");
|
|
3219
|
-
r(this, "setPlaybackRate", (t) =>
|
|
3217
|
+
r(this, "setPlaybackRate", (t) => {
|
|
3218
|
+
this.element.playbackRate = t;
|
|
3219
|
+
});
|
|
3220
3220
|
r(this, "getBuffer", () => {
|
|
3221
3221
|
const t = [], i = this.element.buffered;
|
|
3222
3222
|
if (!i)
|
|
@@ -4327,12 +4327,7 @@ const Gg = {
|
|
|
4327
4327
|
function gl(s) {
|
|
4328
4328
|
return f(this, null, function* () {
|
|
4329
4329
|
const e = yield s.readVarInt();
|
|
4330
|
-
|
|
4331
|
-
case pl.Draft07:
|
|
4332
|
-
return { type: "known", value: e };
|
|
4333
|
-
default:
|
|
4334
|
-
return { type: "unknown", value: e };
|
|
4335
|
-
}
|
|
4330
|
+
return e === pl.Draft07 ? { type: "known", value: e } : { type: "unknown", value: e };
|
|
4336
4331
|
});
|
|
4337
4332
|
}
|
|
4338
4333
|
function jg(s, e) {
|
|
@@ -5398,10 +5393,7 @@ class ou {
|
|
|
5398
5393
|
Ms = Ci(null), nt = new WeakMap(), ga = new WeakMap(), is = new WeakMap(), En = new WeakMap(), kn = new WeakMap(), ue = new WeakSet(), Ml = function(e) {
|
|
5399
5394
|
return f(this, null, function* () {
|
|
5400
5395
|
var t, i;
|
|
5401
|
-
|
|
5402
|
-
case C.Goaway:
|
|
5403
|
-
break;
|
|
5404
|
-
}
|
|
5396
|
+
a(this, En).debug("received message", e), yield (t = this.subscriber) == null ? void 0 : t.onMessage(e), yield (i = this.publisher) == null ? void 0 : i.onMessage(e), e.type, C.Goaway;
|
|
5405
5397
|
});
|
|
5406
5398
|
}, xl = function() {
|
|
5407
5399
|
return f(this, null, function* () {
|
|
@@ -7099,15 +7091,7 @@ const wu = class wu {
|
|
|
7099
7091
|
])
|
|
7100
7092
|
), h = yield n.onConnectInfo(n.connectInfo), u = n.options.get("authenticationToken");
|
|
7101
7093
|
let l, p;
|
|
7102
|
-
|
|
7103
|
-
case "string": {
|
|
7104
|
-
l = ih(n.edgeUrl, h, u);
|
|
7105
|
-
break;
|
|
7106
|
-
}
|
|
7107
|
-
default:
|
|
7108
|
-
l = ih(n.edgeUrl.moqUrl || n.edgeUrl.moqWsUrl, h, u), p = ih(n.edgeUrl.moqWsUrl, h, u);
|
|
7109
|
-
break;
|
|
7110
|
-
}
|
|
7094
|
+
typeof n.edgeUrl === "string" ? l = ih(n.edgeUrl, h, u) : (l = ih(n.edgeUrl.moqUrl || n.edgeUrl.moqWsUrl, h, u), p = ih(n.edgeUrl.moqWsUrl, h, u));
|
|
7111
7095
|
const g = (E = n.connectInfo.channels.find((Q) => Q.channelId === h.channelId)) == null ? void 0 : E.catalog;
|
|
7112
7096
|
t.debug("Resolved edge url", { edgeUrl: l, edgeWsUrl: p }), qe(g, "no catalog found");
|
|
7113
7097
|
const w = (U = c.get(Bi(g.namespace))) == null ? void 0 : U.getVideoTrack(h.video), b = (B = c.get(Bi(g.namespace))) == null ? void 0 : B.getAudioTrack(h.audio), v = yield lA({
|
|
@@ -7389,12 +7373,8 @@ class MA extends Ei {
|
|
|
7389
7373
|
return WebSocket.CLOSED;
|
|
7390
7374
|
const t = this.websockets.map((i) => i.readyState);
|
|
7391
7375
|
for (const i of t)
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
continue;
|
|
7395
|
-
default:
|
|
7396
|
-
return i;
|
|
7397
|
-
}
|
|
7376
|
+
if (i !== WebSocket.OPEN)
|
|
7377
|
+
return i;
|
|
7398
7378
|
return WebSocket.OPEN;
|
|
7399
7379
|
});
|
|
7400
7380
|
r(this, "url", () => {
|
|
@@ -7635,17 +7615,9 @@ const xA = 65536 * 8, LA = 0.9, DA = 40, OA = (s) => {
|
|
|
7635
7615
|
});
|
|
7636
7616
|
r(this, "onTransportChange", () => {
|
|
7637
7617
|
var e;
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
this.transport.connectTime / mt.TLS_ROUNDTRIPS / (this.transport.connectionCount || 1)
|
|
7642
|
-
), this.emitter.emit("rtt", ct(this.rtts.items()))), this.connectCount++, this.resetPingState();
|
|
7643
|
-
break;
|
|
7644
|
-
default:
|
|
7645
|
-
this.contextSwitchesCompleted.clear(), this.contextSwitchesInProgress.clear(), this.buffer = [], this.resetPingState(), this.disconnected.resolve();
|
|
7646
|
-
break;
|
|
7647
|
-
}
|
|
7648
|
-
this.emitter.emit("connection state", this.getState());
|
|
7618
|
+
this.getState() === "connected" ? ((e = this.transport) != null && e.connectTime && (this.rtts.push(
|
|
7619
|
+
this.transport.connectTime / mt.TLS_ROUNDTRIPS / (this.transport.connectionCount || 1)
|
|
7620
|
+
), this.emitter.emit("rtt", ct(this.rtts.items()))), this.connectCount++, this.resetPingState()) : (this.contextSwitchesCompleted.clear(), this.contextSwitchesInProgress.clear(), this.buffer = [], this.resetPingState(), this.disconnected.resolve()), this.emitter.emit("connection state", this.getState());
|
|
7649
7621
|
});
|
|
7650
7622
|
r(this, "reconnect", (e) => {
|
|
7651
7623
|
if (this.transport.isConnectInProgress) {
|
|
@@ -8092,7 +8064,7 @@ class hu {
|
|
|
8092
8064
|
for (const h of i)
|
|
8093
8065
|
switch (h.type) {
|
|
8094
8066
|
case "audio": {
|
|
8095
|
-
const { OpusDecoderContext: u } = yield import("./
|
|
8067
|
+
const { OpusDecoderContext: u } = yield import("./CZND1w9j.js");
|
|
8096
8068
|
c.set(h.type, {
|
|
8097
8069
|
buffer: [],
|
|
8098
8070
|
decoderContext: yield u.create(48e3, 2),
|
|
@@ -8103,7 +8075,7 @@ class hu {
|
|
|
8103
8075
|
break;
|
|
8104
8076
|
}
|
|
8105
8077
|
case "video": {
|
|
8106
|
-
const { H264DecoderWorkerContext: u } = yield import("./
|
|
8078
|
+
const { H264DecoderWorkerContext: u } = yield import("./gWGugTCn.js");
|
|
8107
8079
|
c.set(h.type, {
|
|
8108
8080
|
buffer: [],
|
|
8109
8081
|
decoderContext: yield u.create(o),
|
|
@@ -10813,19 +10785,10 @@ const rw = {
|
|
|
10813
10785
|
try {
|
|
10814
10786
|
const t = this.unsentLines.items().map((i) => JSON.stringify(i)).reverse().join(`
|
|
10815
10787
|
`);
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
case "fetch":
|
|
10821
|
-
default:
|
|
10822
|
-
this.parentContext.connectionState === "connected" ? this.emitter.emit("send signal", {
|
|
10823
|
-
type: "telemetry",
|
|
10824
|
-
body: t
|
|
10825
|
-
}) : yield vd(new URL(this.options.url), { body: t, headers: { "Content-Type": "text/plain" } });
|
|
10826
|
-
break;
|
|
10827
|
-
}
|
|
10828
|
-
this.retries = 0, this.unsentLines.clear();
|
|
10788
|
+
e === "beacon" ? navigator.sendBeacon(this.options.url, t) : this.parentContext.connectionState === "connected" ? this.emitter.emit("send signal", {
|
|
10789
|
+
type: "telemetry",
|
|
10790
|
+
body: t
|
|
10791
|
+
}) : yield vd(new URL(this.options.url), { body: t, headers: { "Content-Type": "text/plain" } }), this.retries = 0, this.unsentLines.clear();
|
|
10829
10792
|
} catch (t) {
|
|
10830
10793
|
this.retries++;
|
|
10831
10794
|
}
|
|
@@ -11415,7 +11378,7 @@ const Pt = class Pt extends Ei {
|
|
|
11415
11378
|
const t = this.modules.canvasModule ? this.options.get("iosMediaElementEnabled") : void 0;
|
|
11416
11379
|
return S({
|
|
11417
11380
|
uptime: Date.now() - this.createdAt,
|
|
11418
|
-
version: "4.1.7-
|
|
11381
|
+
version: "4.1.7-8-g1b79f70a",
|
|
11419
11382
|
clientId: this.clientId,
|
|
11420
11383
|
sessionId: this.sessionId,
|
|
11421
11384
|
channelId: this.channelId,
|
|
@@ -11542,7 +11505,9 @@ const Pt = class Pt extends Ei {
|
|
|
11542
11505
|
isSupported: () => c.isPictureInPictureSupported()
|
|
11543
11506
|
}, this.emitter.on("error", (y) => {
|
|
11544
11507
|
if (y.type() === "external" && this.emit("error", y), y.isFatal())
|
|
11545
|
-
return () =>
|
|
11508
|
+
return () => {
|
|
11509
|
+
this.unload();
|
|
11510
|
+
};
|
|
11546
11511
|
});
|
|
11547
11512
|
const U = this.browser.platform.isWebKit, B = iu.create(
|
|
11548
11513
|
this.emitter,
|
package/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as C, e as I, f as _, a as O, C as D, D as T, I as a, N as A, V as s, g as r } from "./
|
|
1
|
+
import { c as C, e as I, f as _, a as O, C as D, D as T, I as a, N as A, V as s, g as r } from "./Dg0GCHvV.js";
|
|
2
2
|
export {
|
|
3
3
|
C as AUTHENTICATION_EXPIRED_CODE,
|
|
4
4
|
I as AUTHENTICATION_FAILED_CODE,
|