@vindral/web-sdk 4.2.0-23-g69dee092 → 4.2.0-24-g5a70e2f5
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/{C2OnjCzi.js → BYPrwk75.js} +172 -172
- package/{wVqDCoXH.js → CpxUFfbm.js} +1 -1
- package/{6UU006kt.js → D3Z2pdQb.js} +64 -62
- package/{DAUPyLMi.js → DDyRtLW6.js} +1 -1
- package/api-client.d.ts +2 -2
- package/cast-sender.d.ts +6 -6
- package/core.d.ts +23 -23
- package/core.js +1 -1
- package/legacy.d.ts +32 -32
- package/legacy.es.js +67 -65
- package/legacy.umd.js +66 -66
- package/package.json +1 -1
- package/player.d.ts +38 -38
- package/player.js +3 -3
- package/react.d.ts +39 -39
- package/vindral-player-component.js +2 -2
- package/zW8mAbQp.js +166 -0
- package/D8EqUvsN.js +0 -166
|
@@ -212,7 +212,7 @@ var je = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), Ne =
|
|
|
212
212
|
}
|
|
213
213
|
readUtf8String() {
|
|
214
214
|
let e = [], t;
|
|
215
|
-
for (; (t = this.readUint8()) !== 0 && (e.push(t), this.remaining()
|
|
215
|
+
for (; (t = this.readUint8()) !== 0 && (e.push(t), this.remaining() !== 0););
|
|
216
216
|
return new TextDecoder().decode(new Uint8Array(e));
|
|
217
217
|
}
|
|
218
218
|
}, ze = class {
|
|
@@ -317,13 +317,13 @@ var He = /(android|bbd+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|e
|
|
|
317
317
|
function et() {
|
|
318
318
|
if (/(iPhone|iPod|iPad)/i.test(D)) {
|
|
319
319
|
var e;
|
|
320
|
-
return D == null || (e = D.match(/OS [\d_]+/i)) == null || (e = e[0]) == null ? void 0 : e.substring(3).split("_").map((e) => parseInt(e))[0];
|
|
320
|
+
return D == null || (e = D.match(/OS [\d_]+/i)) == null || (e = e[0]) == null ? void 0 : e.substring(3).split("_").map((e) => parseInt(e, 10))[0];
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
function tt() {
|
|
324
324
|
if (/^((?!chrome|android).)*safari/i.test(D)) {
|
|
325
325
|
var e;
|
|
326
|
-
return (e = D.match(/version\/([\d.]+)/)) == null || (e = e[1]) == null ? void 0 : e.split(".").map((e) => parseInt(e))[0];
|
|
326
|
+
return (e = D.match(/version\/([\d.]+)/)) == null || (e = e[1]) == null ? void 0 : e.split(".").map((e) => parseInt(e, 10))[0];
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
var nt = () => typeof HTMLCanvasElement < "u" && typeof HTMLCanvasElement.prototype.captureStream == "function", rt = () => {
|
|
@@ -445,7 +445,7 @@ var nt = () => typeof HTMLCanvasElement < "u" && typeof HTMLCanvasElement.protot
|
|
|
445
445
|
let n = 0, r = 0;
|
|
446
446
|
for (let t in e) n += 1;
|
|
447
447
|
for (let n in t) if (r += 1, !(n in e) || !Nt(e[n], t[n])) return !1;
|
|
448
|
-
return n
|
|
448
|
+
return n === r;
|
|
449
449
|
}, Pt = [
|
|
450
450
|
"off",
|
|
451
451
|
"error",
|
|
@@ -742,7 +742,7 @@ var dn = class {
|
|
|
742
742
|
}
|
|
743
743
|
getUserAgentInformation() {
|
|
744
744
|
var e;
|
|
745
|
-
let t = window.location.origin, n = !t || t
|
|
745
|
+
let t = window.location.origin, n = !t || t === "null" ? "" : `${window.location.pathname}${window.location.search}`.substring(0, 1e3), r = {
|
|
746
746
|
locationOrigin: window.location.origin,
|
|
747
747
|
locationPath: n,
|
|
748
748
|
ancestorOrigins: ((e = window.location.ancestorOrigins) == null ? void 0 : e.length) > 0 ? Array.from(window.location.ancestorOrigins) : void 0,
|
|
@@ -899,7 +899,7 @@ function jn(e, t) {
|
|
|
899
899
|
y(Dn, this, An).call(this);
|
|
900
900
|
let e = 0;
|
|
901
901
|
for (; b(M, this).measureText(i + (i.length > 0 ? " " : "") + r[0]).width + this.config.textPadding * 2 <= t && r.length > 0;) e++, i += (i.length > 0 ? " " : "") + r.shift();
|
|
902
|
-
if (e
|
|
902
|
+
if (e === 0) {
|
|
903
903
|
n.push(r.shift() || ""), i = "";
|
|
904
904
|
continue;
|
|
905
905
|
}
|
|
@@ -1259,7 +1259,7 @@ var ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), or =
|
|
|
1259
1259
|
//#region ../../libs/eme/src/emeUtils.ts
|
|
1260
1260
|
function sr(e) {
|
|
1261
1261
|
let t = window.atob(e.replace(/-/g, "+").replace(/_/g, "/")), n = "";
|
|
1262
|
-
for (let e = 0; e < t.length; e++) n +=
|
|
1262
|
+
for (let e = 0; e < t.length; e++) n += `0${t.charCodeAt(e).toString(16)}`.substr(-2);
|
|
1263
1263
|
return n;
|
|
1264
1264
|
}
|
|
1265
1265
|
function cr(e) {
|
|
@@ -1403,7 +1403,7 @@ var ur = /* @__PURE__ */ new WeakMap(), dr = class extends or {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
}
|
|
1405
1405
|
let c = r.getElementsByTagName("Challenge")[0], l;
|
|
1406
|
-
if (c
|
|
1406
|
+
if (!(c == null || (t = c.childNodes[0]) == null) && t.nodeValue) {
|
|
1407
1407
|
var u;
|
|
1408
1408
|
l = window.atob((u = c.childNodes[0]) == null ? void 0 : u.nodeValue);
|
|
1409
1409
|
}
|
|
@@ -1694,9 +1694,9 @@ var qr = 7, Jr = 8, Yr = (e) => {
|
|
|
1694
1694
|
case 138:
|
|
1695
1695
|
case 144:
|
|
1696
1696
|
if (o = a.readUnsignedExpGolomb(), o === 3 && a.readBits(1), a.readUnsignedExpGolomb() + 8, a.readUnsignedExpGolomb() + 8, a.readBit(), a.readBit()) {
|
|
1697
|
-
for (let e = 0; e < (o
|
|
1697
|
+
for (let e = 0; e < (o === 3 ? 12 : 8); e++) if (a.readBit()) {
|
|
1698
1698
|
let t = e < 6 ? 16 : 64, n = 0, r = 8, i = 8;
|
|
1699
|
-
for (let e = 0; e < t; e++) i
|
|
1699
|
+
for (let e = 0; e < t; e++) i !== 0 && (n = a.readSignedExpGolomb(), i = (r + n + 256) % 256), r = i === 0 ? r : i;
|
|
1700
1700
|
}
|
|
1701
1701
|
}
|
|
1702
1702
|
break;
|
|
@@ -1704,14 +1704,14 @@ var qr = 7, Jr = 8, Yr = (e) => {
|
|
|
1704
1704
|
}
|
|
1705
1705
|
a.readUnsignedExpGolomb();
|
|
1706
1706
|
let s = a.readUnsignedExpGolomb();
|
|
1707
|
-
if (s
|
|
1708
|
-
else if (s
|
|
1707
|
+
if (s === 0) a.readUnsignedExpGolomb();
|
|
1708
|
+
else if (s === 1) throw Error("Unhandled case");
|
|
1709
1709
|
a.readUnsignedExpGolomb(), a.readBit();
|
|
1710
1710
|
let c = a.readUnsignedExpGolomb(), l = a.readUnsignedExpGolomb(), u = a.readBit();
|
|
1711
1711
|
u === 0 && a.readBit(), a.readBit();
|
|
1712
1712
|
let d = c + 1, f = l + 1;
|
|
1713
1713
|
if (f *= 2 - u, f *= 16, d *= 16, a.readBit()) {
|
|
1714
|
-
let e = o
|
|
1714
|
+
let e = o === 1 ? 1 : 0, t = 1 << (o === 1 || o === 2 ? 1 : 0), n = 2 - u << e, r = a.readUnsignedExpGolomb() * t, i = a.readUnsignedExpGolomb() * t, s = a.readUnsignedExpGolomb() * n, c = a.readUnsignedExpGolomb() * n;
|
|
1715
1715
|
d -= r + i, f -= s + c;
|
|
1716
1716
|
}
|
|
1717
1717
|
let p = {
|
|
@@ -2751,7 +2751,7 @@ var R = {
|
|
|
2751
2751
|
0,
|
|
2752
2752
|
0
|
|
2753
2753
|
])), e.writer.writeUint32(2);
|
|
2754
|
-
}, ya = (e) => "sequenceParameterSets" in e, ba = (e) => "sequenceHeader" in e, xa = (e) => e.type
|
|
2754
|
+
}, ya = (e) => "sequenceParameterSets" in e, ba = (e) => "sequenceHeader" in e, xa = (e) => e.type === "video", Sa = (e) => e.type === "audio", Ca = (e, t, n) => {
|
|
2755
2755
|
let r = e.writer.position();
|
|
2756
2756
|
V(e, R.tkhd, 0, 0, 3), e.writer.writeUint32(0), e.writer.writeUint32(0), e.writer.writeUint32(t.trackId), e.writer.writeUint32(0), e.writer.writeUint32(t.duration * n / t.timescale), e.writer.writeUint32(0), e.writer.writeUint32(0), e.writer.writeUint16(0), e.writer.writeUint16(Sa(t) ? 1 : 0), e.writer.writeUint16(Sa(t) ? 256 : 0), e.writer.writeUint16(0), e.writer.writeBytes(new Uint8Array([
|
|
2757
2757
|
0,
|
|
@@ -3024,7 +3024,7 @@ var lo = (e) => {
|
|
|
3024
3024
|
let t = e.remainingBits() / 8, n = e.readBits(8);
|
|
3025
3025
|
if (n >> 7 & 1) return;
|
|
3026
3026
|
let r = n >> 3 & 15, i = n >> 2 & 1, a = n >> 1 & 1;
|
|
3027
|
-
i
|
|
3027
|
+
i === 1 && e.readBits(8);
|
|
3028
3028
|
let [o, s] = a ? uo(e) : [0, t];
|
|
3029
3029
|
return {
|
|
3030
3030
|
headerLength: 1 + i + o,
|
|
@@ -3119,7 +3119,7 @@ var lo = (e) => {
|
|
|
3119
3119
|
subsamplingX: d,
|
|
3120
3120
|
subsamplingY: f,
|
|
3121
3121
|
transferCharacteristics: c
|
|
3122
|
-
}) : s === _o && c
|
|
3122
|
+
}) : s === _o && c === bo && l === xo ? (u = !0, d = 0, f = 0, {
|
|
3123
3123
|
highBitDepth: n,
|
|
3124
3124
|
bitDepth: r,
|
|
3125
3125
|
monoChrome: i,
|
|
@@ -3332,7 +3332,7 @@ function Qo(e) {
|
|
|
3332
3332
|
}
|
|
3333
3333
|
function $o(e) {
|
|
3334
3334
|
let t = e.split(":");
|
|
3335
|
-
if (t.length
|
|
3335
|
+
if (t.length === 2) {
|
|
3336
3336
|
let [e = 0, n = 0] = t.map((e) => parseFloat(e));
|
|
3337
3337
|
return e * 60 + n;
|
|
3338
3338
|
}
|
|
@@ -3349,7 +3349,7 @@ var es = (e) => {
|
|
|
3349
3349
|
var l;
|
|
3350
3350
|
super(), l = this, e(this, "element", void 0), e(this, "logger", void 0), e(this, "seekTimes", new _(10)), e(this, "seekStartTime", void 0), e(this, "_totalSeekTime", 0), e(this, "_userProvidedMuted", void 0), e(this, "timers", new j()), e(this, "_userHasProvidedInput", !1), e(this, "_isPaused", !0), e(this, "isActivated", !1), e(this, "dummy", void 0), e(this, "_iosHackEnterPiPMode", () => {
|
|
3351
3351
|
let e = this.element.parentElement, t = this.element.clientWidth / this.element.clientHeight;
|
|
3352
|
-
this.element.style.position = "fixed", this.element.style.opacity = "0", this.element.style.pointerEvents = "none", e && (this.dummy = document.createElement("video"), this.dummy.style.paddingBottom =
|
|
3352
|
+
this.element.style.position = "fixed", this.element.style.opacity = "0", this.element.style.pointerEvents = "none", e && (this.dummy = document.createElement("video"), this.dummy.style.paddingBottom = `calc(100% / ${t})`, this.dummy.style.width = "100%", this.dummy.style.height = "0px", e.appendChild(this.dummy));
|
|
3353
3353
|
}), e(this, "_iosHackExitPiPMode", () => {
|
|
3354
3354
|
this.element.style.position = "relative", this.element.style.opacity = "1", this.element.style.pointerEvents = "auto", this.dummy && (this.dummy.remove(), this.dummy = void 0);
|
|
3355
3355
|
}), e(this, "attach", (e) => {
|
|
@@ -3440,7 +3440,7 @@ var es = (e) => {
|
|
|
3440
3440
|
return this.element.seeking;
|
|
3441
3441
|
}
|
|
3442
3442
|
get currentTime() {
|
|
3443
|
-
return isNaN(this.element.currentTime) ? 0 : this.element.currentTime * 1e3;
|
|
3443
|
+
return Number.isNaN(this.element.currentTime) ? 0 : this.element.currentTime * 1e3;
|
|
3444
3444
|
}
|
|
3445
3445
|
set currentTime(e) {
|
|
3446
3446
|
Number.isFinite(e) && (this.element.currentTime = e / 1e3);
|
|
@@ -3628,7 +3628,7 @@ function Es(e) {
|
|
|
3628
3628
|
case H.EndOfGroup:
|
|
3629
3629
|
case H.EndOfTrackAndGroup: return;
|
|
3630
3630
|
}
|
|
3631
|
-
throw Error(
|
|
3631
|
+
throw Error(`Unknown object status ${e}`);
|
|
3632
3632
|
}
|
|
3633
3633
|
var Ds = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakMap(), ks = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap(), Ms = /* @__PURE__ */ new WeakMap(), Ns = /* @__PURE__ */ new WeakMap(), Ps = /* @__PURE__ */ new WeakMap();
|
|
3634
3634
|
_s = Symbol.asyncIterator, vs = Vt(), ys = Symbol.asyncDispose;
|
|
@@ -3821,7 +3821,7 @@ function ac() {
|
|
|
3821
3821
|
switch (n) {
|
|
3822
3822
|
case gs.StreamHeaderGroup: return new tc(e, yield e.readBigVarInt(), yield e.readBigVarInt(), yield e.readBigVarInt(), yield e.readBigVarInt(), yield e.readUnsigned8(), t);
|
|
3823
3823
|
case gs.StreamHeaderTrack: return new Hs(e, yield e.readBigVarInt(), yield e.readBigVarInt(), yield e.readUnsigned8(), t);
|
|
3824
|
-
default: throw Error(
|
|
3824
|
+
default: throw Error(`Unexpected message type ${n}`);
|
|
3825
3825
|
}
|
|
3826
3826
|
}), ac.apply(this, arguments);
|
|
3827
3827
|
}
|
|
@@ -3878,7 +3878,7 @@ var sc = /* @__PURE__ */ new WeakMap(), cc = /* @__PURE__ */ new WeakMap(), lc =
|
|
|
3878
3878
|
b(sc, this).addEventListener("message", (t) => {
|
|
3879
3879
|
if (typeof t.data == "object" && t.data instanceof ArrayBuffer) {
|
|
3880
3880
|
let n = new Uint8Array(t.data);
|
|
3881
|
-
n[0]
|
|
3881
|
+
n[0] === b(cc, this) && e.enqueue(n.subarray(1));
|
|
3882
3882
|
}
|
|
3883
3883
|
}), b(sc, this).addEventListener("error", () => e.error(/* @__PURE__ */ Error("WebSocket error"))), b(sc, this).addEventListener("close", () => un(() => e.close()));
|
|
3884
3884
|
}
|
|
@@ -3988,7 +3988,7 @@ var W = /* @__PURE__ */ new WeakMap(), _c = /* @__PURE__ */ new WeakMap(), vc =
|
|
|
3988
3988
|
isDone() {
|
|
3989
3989
|
var e = this;
|
|
3990
3990
|
return t(function* () {
|
|
3991
|
-
return y(K, e, xc).call(e) > 0 ? !1 : (yield y(K, e, Sc).call(e))
|
|
3991
|
+
return y(K, e, xc).call(e) > 0 ? !1 : (yield y(K, e, Sc).call(e)) === 0;
|
|
3992
3992
|
})();
|
|
3993
3993
|
}
|
|
3994
3994
|
closed() {
|
|
@@ -4383,7 +4383,7 @@ function Ol(e) {
|
|
|
4383
4383
|
}
|
|
4384
4384
|
function kl() {
|
|
4385
4385
|
return kl = t(function* (e) {
|
|
4386
|
-
let t = yield e.readBigVarInt(), n = yield e.readVarInt(), r = yield e.readString(), i = (yield e.readUnsigned8())
|
|
4386
|
+
let t = yield e.readBigVarInt(), n = yield e.readVarInt(), r = yield e.readString(), i = (yield e.readUnsigned8()) === 1, a;
|
|
4387
4387
|
return i && (a = {
|
|
4388
4388
|
group: yield e.readBigVarInt(),
|
|
4389
4389
|
object: yield e.readBigVarInt()
|
|
@@ -4435,8 +4435,8 @@ function Il(e) {
|
|
|
4435
4435
|
}
|
|
4436
4436
|
function Ll() {
|
|
4437
4437
|
return Ll = t(function* (e) {
|
|
4438
|
-
let t = yield e.readBigVarInt(), n = yield e.readBigVarInt(), r = yield yl(e), i = (yield e.readUnsigned8())
|
|
4439
|
-
if (r
|
|
4438
|
+
let t = yield e.readBigVarInt(), n = yield e.readBigVarInt(), r = yield yl(e), i = (yield e.readUnsigned8()) === 1, a;
|
|
4439
|
+
if (r === "inherit-publisher") throw Error("SubscribeOk cannot have inherit publisher group order");
|
|
4440
4440
|
i && (a = {
|
|
4441
4441
|
group: yield e.readBigVarInt(),
|
|
4442
4442
|
object: yield e.readBigVarInt()
|
|
@@ -6617,7 +6617,7 @@ function Om(e) {
|
|
|
6617
6617
|
var t, n;
|
|
6618
6618
|
for (e.push(...r), e.sort((e, t) => e.wallclock - t.wallclock); e[0] && ((t = (n = e[e.length - 1]) == null ? void 0 : n.wallclock) == null ? 0 : t) - e[0].wallclock > ym;) e.shift();
|
|
6619
6619
|
return e;
|
|
6620
|
-
}), t === b(Sm, n).resolved && e.groupId > T(0) && e.objectId
|
|
6620
|
+
}), t === b(Sm, n).resolved && e.groupId > T(0) && e.objectId === T(0) && y(Em, n, km).call(n, e.groupId).catch((e) => {
|
|
6621
6621
|
b(bm, n).warn("backfill failed", e);
|
|
6622
6622
|
});
|
|
6623
6623
|
}
|
|
@@ -6663,10 +6663,10 @@ function Am(e) {
|
|
|
6663
6663
|
let [t, n, r, i, a] = e.split(",");
|
|
6664
6664
|
if (!t || !i) throw Error(`invalid timeline row: ${e}`);
|
|
6665
6665
|
return {
|
|
6666
|
-
mediaPts: parseInt(t),
|
|
6667
|
-
groupId: n ? parseInt(n) : void 0,
|
|
6668
|
-
objectId: r ? parseInt(r) : void 0,
|
|
6669
|
-
wallclock: parseInt(i),
|
|
6666
|
+
mediaPts: parseInt(t, 10),
|
|
6667
|
+
groupId: n ? parseInt(n, 10) : void 0,
|
|
6668
|
+
objectId: r ? parseInt(r, 10) : void 0,
|
|
6669
|
+
wallclock: parseInt(i, 10),
|
|
6670
6670
|
metadata: a
|
|
6671
6671
|
};
|
|
6672
6672
|
});
|
|
@@ -7562,8 +7562,9 @@ function fg() {
|
|
|
7562
7562
|
//#endregion
|
|
7563
7563
|
//#region ../../libs/web-sdk/src/resolveEdgeUrl.ts
|
|
7564
7564
|
var pg = (e, t) => {
|
|
7565
|
-
|
|
7566
|
-
|
|
7565
|
+
var n, r;
|
|
7566
|
+
let i = new URL("/subscribe", e);
|
|
7567
|
+
return i.searchParams.append("channelId", t.channelId), i.searchParams.append("sessionId", t.sessionId), i.searchParams.append("clientId", t.clientId), (n = t.audio) != null && n.codec && (i.searchParams.append("audio.bitRate", Math.round(t.audio.bitRate).toString()), i.searchParams.append("audio.codec", t.audio.codec), t.audio.language && i.searchParams.append("audio.language", t.audio.language)), (r = t.video) != null && r.codec && (i.searchParams.append("video.width", t.video.width.toString()), i.searchParams.append("video.height", t.video.height.toString()), i.searchParams.append("video.bitRate", Math.round(t.video.bitRate).toString()), i.searchParams.append("video.codec", t.video.codec)), t.expectAdditionalConnection && i.searchParams.append("expectAdditionalConnection", t.expectAdditionalConnection.toString()), t.burstMs && i.searchParams.append("burstMs", t.burstMs.toString()), t.channelGroupId && i.searchParams.append("channelGroupId", t.channelGroupId), t.authToken && (i.searchParams.append("auth.token", t.authToken), i.searchParams.append("auth.type", "jwt")), i.toString();
|
|
7567
7568
|
}, mg = /* @__PURE__ */ function(e) {
|
|
7568
7569
|
return e[e.AuthenticationFailed = 4e3] = "AuthenticationFailed", e[e.AuthenticationRefreshFailed = 4001] = "AuthenticationRefreshFailed", e[e.AuthenticationExpired = 4002] = "AuthenticationExpired", e[e.ChannelNotFound = 4003] = "ChannelNotFound", e[e.Inactivity = 4010] = "Inactivity", e;
|
|
7569
7570
|
}({}), hg = class extends _e {
|
|
@@ -8014,7 +8015,7 @@ var Bg, Vg = () => ({
|
|
|
8014
8015
|
let o = this.renditionLevelSource.getRenditionLevels().find((e) => {
|
|
8015
8016
|
if (e.video) return e.video.width / e.video.height > i.video.width / i.video.height ? e.video.width > i.video.width : e.video.height > i.video.height;
|
|
8016
8017
|
});
|
|
8017
|
-
o && o.video && (i.video.width = o.video.width, i.video.height = o.video.height);
|
|
8018
|
+
o != null && o.video && (i.video.width = o.video.width, i.video.height = o.video.height);
|
|
8018
8019
|
let s = (e = this.userSpecifiedCap) == null ? void 0 : e.video, c = (t = this.userSpecifiedCap) == null ? void 0 : t.audio;
|
|
8019
8020
|
s && (i.video.width > s.width && (i.video.width = s.width), i.video.height > s.height && (i.video.height = s.height)), i.video.bitRate = (n = s == null ? void 0 : s.bitRate) == null ? i.video.bitRate : n, i.audio.bitRate = (r = c == null ? void 0 : c.bitRate) == null ? i.audio.bitRate : r, Nt(i, this.currentCap) ? this.currentCap = C({}, i) : (this.currentCap = C({}, i), this.emitter.emit("constraint cap changed", i));
|
|
8020
8021
|
}), e(this, "enterPictureInPicture", (e) => {
|
|
@@ -8200,7 +8201,7 @@ var Wg = 5, Gg = 100, Kg = 1e3, qg = class r {
|
|
|
8200
8201
|
break;
|
|
8201
8202
|
}
|
|
8202
8203
|
case "video": {
|
|
8203
|
-
let { VideoDecoderWorkerContext: n } = yield import("./
|
|
8204
|
+
let { VideoDecoderWorkerContext: n } = yield import("./zW8mAbQp.js"), r = yield n.create(i.createContext("VideoDecoderWorker"), a, c, l, u, d, () => s.currentTime);
|
|
8204
8205
|
p = r.isWebCodecs, h = r.usingOffscreenCanvas, t.set(e.type, {
|
|
8205
8206
|
buffer: [],
|
|
8206
8207
|
decoderContext: r,
|
|
@@ -8506,7 +8507,8 @@ var o_, s_ = 400, c_ = class extends _e {
|
|
|
8506
8507
|
let i = Math.max(this.startTime, 0);
|
|
8507
8508
|
n.buffer = r, n.connect(this.gainNode), this.splitter && n.connect(this.splitter), n.start(i), this.unplayedBufferSources.push([i, n]), this.startTime += r.duration;
|
|
8508
8509
|
}), e(this, "onDecodedFrame", (e) => {
|
|
8509
|
-
|
|
8510
|
+
var t;
|
|
8511
|
+
if (!(this.gainNode && (t = this.audio) != null && t.isRunning)) {
|
|
8510
8512
|
if (e.type === "audio") {
|
|
8511
8513
|
this.preInitSampleQueue.push(C(C({}, e), {}, { data: e.data.slice(0, e.data.length) }));
|
|
8512
8514
|
let t = this.clockSource.currentTime;
|
|
@@ -10175,24 +10177,7 @@ var uv = class {
|
|
|
10175
10177
|
var n;
|
|
10176
10178
|
return (n = this.overrides.get(t)) == null ? void 0 : n[e];
|
|
10177
10179
|
}
|
|
10178
|
-
}, dv =
|
|
10179
|
-
if (!e) return !1;
|
|
10180
|
-
let t = e.headers && Object.keys(e.headers).length > 0, n = e.queryParams && Object.keys(e.queryParams).length > 0;
|
|
10181
|
-
return !!(t || n);
|
|
10182
|
-
}, mv = (e, t, n) => {
|
|
10183
|
-
if (pv(n)) return "mse";
|
|
10184
|
-
let r = fv(e);
|
|
10185
|
-
for (let e of r) switch (e) {
|
|
10186
|
-
case "mse":
|
|
10187
|
-
if (t) return "mse";
|
|
10188
|
-
break;
|
|
10189
|
-
case "webcodecs":
|
|
10190
|
-
if (typeof VideoDecoder < "u") return "webcodecs";
|
|
10191
|
-
break;
|
|
10192
|
-
case "wasm": return "wasm";
|
|
10193
|
-
}
|
|
10194
|
-
return "wasm";
|
|
10195
|
-
}, hv = 6, gv = (e) => {
|
|
10180
|
+
}, dv = 6, fv = (e) => {
|
|
10196
10181
|
let t = [e], n = 0, r = 0, i = !1, a = (e, t) => {
|
|
10197
10182
|
var i, a;
|
|
10198
10183
|
if (e.flags && Lo(e.flags)) {
|
|
@@ -10204,7 +10189,7 @@ var uv = class {
|
|
|
10204
10189
|
return u > 0 && (r = u), C(C({}, e), {}, { duration: u > 0 ? u : r });
|
|
10205
10190
|
};
|
|
10206
10191
|
return (e, n = !1) => {
|
|
10207
|
-
if (e.flags && Lo(e.flags) && n && (i = !i), !(n && t.length <
|
|
10192
|
+
if (e.flags && Lo(e.flags) && n && (i = !i), !(n && t.length < dv && i) && t.length > 0) {
|
|
10208
10193
|
i = !1;
|
|
10209
10194
|
let n = e;
|
|
10210
10195
|
for (let e = t.length - 1; e > 0; e--) {
|
|
@@ -10217,6 +10202,23 @@ var uv = class {
|
|
|
10217
10202
|
}
|
|
10218
10203
|
return t.push(e), [];
|
|
10219
10204
|
};
|
|
10205
|
+
}, pv = ["mse", "wasm"], mv = (e) => e == null ? pv : e, hv = (e) => {
|
|
10206
|
+
if (!e) return !1;
|
|
10207
|
+
let t = e.headers && Object.keys(e.headers).length > 0, n = e.queryParams && Object.keys(e.queryParams).length > 0;
|
|
10208
|
+
return !!(t || n);
|
|
10209
|
+
}, gv = (e, t, n) => {
|
|
10210
|
+
if (hv(n)) return "mse";
|
|
10211
|
+
let r = mv(e);
|
|
10212
|
+
for (let e of r) switch (e) {
|
|
10213
|
+
case "mse":
|
|
10214
|
+
if (t) return "mse";
|
|
10215
|
+
break;
|
|
10216
|
+
case "webcodecs":
|
|
10217
|
+
if (typeof VideoDecoder < "u") return "webcodecs";
|
|
10218
|
+
break;
|
|
10219
|
+
case "wasm": return "wasm";
|
|
10220
|
+
}
|
|
10221
|
+
return "wasm";
|
|
10220
10222
|
}, _v = (e, t, n) => {
|
|
10221
10223
|
if (hn(t)) return C(C({}, e), {}, {
|
|
10222
10224
|
type: "video",
|
|
@@ -10396,7 +10398,7 @@ var uv = class {
|
|
|
10396
10398
|
};
|
|
10397
10399
|
}()), e(this, "emitLanguagesIfChanged", () => {
|
|
10398
10400
|
let e = this.modules.renditions.getLanguages(), t = this.latestEmittedLanguages;
|
|
10399
|
-
e.length
|
|
10401
|
+
e.length === t.length && e.every((e) => t.includes(e)) || (this.logger.debug("Emitting new languages", { currentLanguages: e }), this.latestEmittedLanguages = e, this.emit("languages", this.latestEmittedLanguages));
|
|
10400
10402
|
}), e(this, "updateTextTracks", (e) => {
|
|
10401
10403
|
let t = e.filter((e) => e.codec === "webvtt");
|
|
10402
10404
|
t.forEach((e) => {
|
|
@@ -10427,7 +10429,7 @@ var uv = class {
|
|
|
10427
10429
|
if (!hn(e) || !i.isSupportedVideoCodecProfile(e.codec, e.codecString)) return !1;
|
|
10428
10430
|
if (!i.willUseMediaSource()) return i.isWebCodecsVideoAvailable(i.channelId) ? i.webCodecsRenditionSupport.checkVideoSupport(e) : !0;
|
|
10429
10431
|
let n = yield ns(e);
|
|
10430
|
-
if (!n.supported || e.codec
|
|
10432
|
+
if (!n.supported || e.codec === "av1" && !n.smooth && !n.powerEfficient) return !1;
|
|
10431
10433
|
let r = i.options.getOverride("maxVideoBitRate", i.channelId);
|
|
10432
10434
|
return r ? r >= e.bitRate : !0;
|
|
10433
10435
|
});
|
|
@@ -10571,7 +10573,7 @@ var uv = class {
|
|
|
10571
10573
|
let e = this.modules.canvasModule instanceof v_ ? !0 : void 0;
|
|
10572
10574
|
return C({
|
|
10573
10575
|
uptime: Date.now() - this.createdAt,
|
|
10574
|
-
version: "4.2.0-
|
|
10576
|
+
version: "4.2.0-24-g5a70e2f5",
|
|
10575
10577
|
clientId: this.clientId,
|
|
10576
10578
|
sessionId: this.sessionId,
|
|
10577
10579
|
channelId: this.channelId,
|
|
@@ -10629,7 +10631,7 @@ var uv = class {
|
|
|
10629
10631
|
let ae = Yg.create(this.emitter), oe = this.options.get("poster"), se = oe === !0 ? this.getThumbnailUrl() : oe || void 0, _, y, S;
|
|
10630
10632
|
if (this.willUseMediaSource()) {
|
|
10631
10633
|
let e = new ts({
|
|
10632
|
-
type: this.options.get("media")
|
|
10634
|
+
type: this.options.get("media") === "audio" ? "audio" : "video",
|
|
10633
10635
|
autoplay: !1,
|
|
10634
10636
|
muted: this.options.get("muted") || this.options.get("media") === "video",
|
|
10635
10637
|
volume: this.options.get("volume"),
|
|
@@ -10639,7 +10641,7 @@ var uv = class {
|
|
|
10639
10641
|
e.on("buffer state", (e) => this.emitter.emit("buffer state", e)), e.on("needs user input", (e) => this.emitter.emit("needs user input", e)), e.on("volume state", (e) => this.emit("volume state", e)), e.on("media element state", (e) => this.onMediaElementState(e)), this.element = e.element, this.playbackSource = e, Rr.isSupported() && this.encryptedMediaExtensions.attach(e.element), _ = A_.create(this.logger.createContext("MseModule"), this.emitter, this.element), this.options.get("pauseSupportEnabled") || (y = sv.create(this.logger.createContext("UnpauseModule"), e, ae)), this.options.get("pictureInPictureEnabled") && this.emitter.emit("add picture in picture listener", { element: e.element });
|
|
10640
10642
|
} else if (this.options.get("streamToMediaElementEnabled") && Et(this.browser)) {
|
|
10641
10643
|
let e = v_.create(this.emitter, this.logger.createContext("ModernCanvasModule"), this.pool, this, {
|
|
10642
|
-
type: this.options.get("media")
|
|
10644
|
+
type: this.options.get("media") === "audio" ? "audio" : "video",
|
|
10643
10645
|
muted: this.options.get("muted") || this.options.get("media") === "video",
|
|
10644
10646
|
volume: this.options.get("volume"),
|
|
10645
10647
|
poster: se,
|
|
@@ -10946,7 +10948,7 @@ var uv = class {
|
|
|
10946
10948
|
let t = _v(e, n, i.sizes.get(e.renditionId));
|
|
10947
10949
|
i.modules.jitter.recordSample(t);
|
|
10948
10950
|
let a = i.sampleProcessingSesssions.get(r);
|
|
10949
|
-
if (!a) a =
|
|
10951
|
+
if (!a) a = fv(i.modules.sync.processSample(t)), i.sampleProcessingSesssions.set(r, a);
|
|
10950
10952
|
else {
|
|
10951
10953
|
let e = i.willUseMediaSource() && i.isSwitchingRenditionLevel && t.type === "video", n = a(i.modules.sync.processSample(t), e), r = t;
|
|
10952
10954
|
n.forEach((e) => {
|
|
@@ -11201,7 +11203,7 @@ var uv = class {
|
|
|
11201
11203
|
return this.modules.subscription.getTargetSubscription();
|
|
11202
11204
|
}
|
|
11203
11205
|
resolvedDecoder(e) {
|
|
11204
|
-
return
|
|
11206
|
+
return gv(this.options.get("decoders", e), this.browser.supportsMediaSource, this.options.get("drm"));
|
|
11205
11207
|
}
|
|
11206
11208
|
willUseMediaSource() {
|
|
11207
11209
|
return this.resolvedDecoder() === "mse";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
2
|
import { a as n, i as r, n as i, r as a, t as o } from "./B7hT-BKr.js";
|
|
3
|
-
import { g as s, h as c, n as l, r as ee, t as u, v as te, y as ne } from "./
|
|
3
|
+
import { g as s, h as c, n as l, r as ee, t as u, v as te, y as ne } from "./CpxUFfbm.js";
|
|
4
4
|
import { t as d } from "./RxoWWyzp.js";
|
|
5
5
|
//#region \0rolldown/runtime.js
|
|
6
6
|
var f = Object.defineProperty, p = (e, t) => {
|
package/api-client.d.ts
CHANGED
|
@@ -70,8 +70,8 @@ interface TrackObject {
|
|
|
70
70
|
displayWidth?: number;
|
|
71
71
|
displayHeight?: number;
|
|
72
72
|
language?: string;
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
"com.vindral.variant_uid"?: string;
|
|
74
|
+
"com.vindral.drm"?: string;
|
|
75
75
|
}
|
|
76
76
|
interface CatalogRoot {
|
|
77
77
|
version: number;
|
package/cast-sender.d.ts
CHANGED
|
@@ -365,27 +365,27 @@ export interface CastSenderEvents {
|
|
|
365
365
|
/**
|
|
366
366
|
* When a connection has been established with a CastReceiver
|
|
367
367
|
*/
|
|
368
|
-
|
|
368
|
+
connected: void;
|
|
369
369
|
/**
|
|
370
370
|
* When a previous session has been resumed
|
|
371
371
|
*/
|
|
372
|
-
|
|
372
|
+
resumed: void;
|
|
373
373
|
/**
|
|
374
374
|
* When a CastReceiver has lost or stopped a connection
|
|
375
375
|
*/
|
|
376
|
-
|
|
376
|
+
disconnected: void;
|
|
377
377
|
/**
|
|
378
378
|
* When a connection attempt was initiated unsuccessfully
|
|
379
379
|
*/
|
|
380
|
-
|
|
380
|
+
failed: void;
|
|
381
381
|
/**
|
|
382
382
|
* When the remote connection emits a metadata event
|
|
383
383
|
*/
|
|
384
|
-
|
|
384
|
+
metadata: Metadata;
|
|
385
385
|
/**
|
|
386
386
|
* When the remote connection receives a server wallclock time event
|
|
387
387
|
*/
|
|
388
|
-
|
|
388
|
+
"server wallclock time": number;
|
|
389
389
|
}
|
|
390
390
|
/**
|
|
391
391
|
* Used for initializing the CastSender
|
package/core.d.ts
CHANGED
|
@@ -481,8 +481,8 @@ interface TrackObject {
|
|
|
481
481
|
displayWidth?: number;
|
|
482
482
|
displayHeight?: number;
|
|
483
483
|
language?: string;
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
"com.vindral.variant_uid"?: string;
|
|
485
|
+
"com.vindral.drm"?: string;
|
|
486
486
|
}
|
|
487
487
|
interface CatalogRoot {
|
|
488
488
|
version: number;
|
|
@@ -1643,7 +1643,7 @@ export interface PublicVindralEvents {
|
|
|
1643
1643
|
* In case of a fatal error it is appropriate to indicate what the error was to the user, either by displaying the error.message or
|
|
1644
1644
|
* by using the error.code() as a key to look up a localization string. To resume streaming it is required to create a new Vindral instance.
|
|
1645
1645
|
*/
|
|
1646
|
-
|
|
1646
|
+
error: Readonly<VindralError>;
|
|
1647
1647
|
/**
|
|
1648
1648
|
* When the instance needs user input to activate audio or sometimes video playback.
|
|
1649
1649
|
* Is called with an object
|
|
@@ -1654,51 +1654,51 @@ export interface PublicVindralEvents {
|
|
|
1654
1654
|
* }
|
|
1655
1655
|
* ```
|
|
1656
1656
|
*/
|
|
1657
|
-
|
|
1657
|
+
"needs user input": NeedsUserInputContext;
|
|
1658
1658
|
/**
|
|
1659
1659
|
* When a timed metadata event has been triggered
|
|
1660
1660
|
*/
|
|
1661
|
-
|
|
1661
|
+
metadata: Readonly<Metadata>;
|
|
1662
1662
|
/**
|
|
1663
1663
|
* When the playback state changes
|
|
1664
1664
|
*/
|
|
1665
|
-
|
|
1665
|
+
"playback state": Readonly<PlaybackState>;
|
|
1666
1666
|
/**
|
|
1667
1667
|
* When the connection state changes
|
|
1668
1668
|
*/
|
|
1669
|
-
|
|
1669
|
+
"connection state": Readonly<ConnectionState>;
|
|
1670
1670
|
/**
|
|
1671
1671
|
* When the available rendition levels is changed
|
|
1672
1672
|
*/
|
|
1673
|
-
|
|
1673
|
+
"rendition levels": ReadonlyArray<RenditionLevel>;
|
|
1674
1674
|
/**
|
|
1675
1675
|
* When the rendition level is changed
|
|
1676
1676
|
*/
|
|
1677
|
-
|
|
1677
|
+
"rendition level": Readonly<RenditionLevel>;
|
|
1678
1678
|
/**
|
|
1679
1679
|
* When the available languages is changed
|
|
1680
1680
|
*/
|
|
1681
|
-
|
|
1681
|
+
languages: ReadonlyArray<string>;
|
|
1682
1682
|
/**
|
|
1683
1683
|
* When the available text tracks are changed
|
|
1684
1684
|
*/
|
|
1685
|
-
|
|
1685
|
+
"text tracks": ReadonlyArray<string>;
|
|
1686
1686
|
/**
|
|
1687
1687
|
* When the available channels is changed
|
|
1688
1688
|
*/
|
|
1689
|
-
|
|
1689
|
+
channels: ReadonlyArray<Channel>;
|
|
1690
1690
|
/**
|
|
1691
1691
|
* When a context switch state change has occured.
|
|
1692
1692
|
* E.g. when a channel change has been requested, or quality is changed.
|
|
1693
1693
|
*/
|
|
1694
|
-
|
|
1694
|
+
"context switch": Readonly<ContextSwitchState>;
|
|
1695
1695
|
/**
|
|
1696
1696
|
* Emitted when a wallclock time message has been received from the server.
|
|
1697
1697
|
*
|
|
1698
1698
|
* Note: This is the edge server wallclock time and thus may differ slightly
|
|
1699
1699
|
* between two viewers if they are connected to different edge servers.
|
|
1700
1700
|
*/
|
|
1701
|
-
|
|
1701
|
+
"server wallclock time": Readonly<number>;
|
|
1702
1702
|
/**
|
|
1703
1703
|
* Is emitted during connection whether the channel is live or not.
|
|
1704
1704
|
*
|
|
@@ -1708,41 +1708,41 @@ export interface PublicVindralEvents {
|
|
|
1708
1708
|
* Note: If the web-sdk is instantiated at the same time as you are starting the stream it is possible
|
|
1709
1709
|
* that this emits false until the started state has propagated through the system.
|
|
1710
1710
|
*/
|
|
1711
|
-
|
|
1711
|
+
"is live": boolean;
|
|
1712
1712
|
/**
|
|
1713
1713
|
* Emitted when a channel switch has been completed and the first frame of the new channel is rendered.
|
|
1714
1714
|
* A string containing the channel id of the new channel is provided as an argument.
|
|
1715
1715
|
*/
|
|
1716
|
-
|
|
1716
|
+
"channel switch": Readonly<ChannelSwitchContext>;
|
|
1717
1717
|
/**
|
|
1718
1718
|
* Emmitted when a channel switch fails.
|
|
1719
1719
|
* A string containing the channel id of the current channel is provided as an argument.
|
|
1720
1720
|
*/
|
|
1721
|
-
|
|
1721
|
+
"channel switch failed": Readonly<ChannelSwitchContext>;
|
|
1722
1722
|
/**
|
|
1723
1723
|
* Emitted when a language switch has been completed and the new language starts playing.
|
|
1724
1724
|
*/
|
|
1725
|
-
|
|
1725
|
+
"language switch": Readonly<LanguageSwitchContext>;
|
|
1726
1726
|
/**
|
|
1727
1727
|
* Emitted when the volume state changes.
|
|
1728
1728
|
*
|
|
1729
1729
|
* This is triggered triggered both when the user changes the volume through the Vindral instance, but also
|
|
1730
1730
|
* from external sources such as OS media shortcuts or other native UI outside of the browser.
|
|
1731
1731
|
*/
|
|
1732
|
-
|
|
1732
|
+
"volume state": Readonly<VolumeState>;
|
|
1733
1733
|
/**
|
|
1734
1734
|
* Emitted when the timeshift URLs are updated.
|
|
1735
1735
|
*/
|
|
1736
|
-
|
|
1736
|
+
"timeshift info": Readonly<TimeShiftInfo>;
|
|
1737
1737
|
/**
|
|
1738
1738
|
* Emitted for each CMAF fragment received via the MoQ/VoQ path.
|
|
1739
1739
|
* Contains raw fMP4 bytes suitable for recording.
|
|
1740
1740
|
*
|
|
1741
1741
|
* @internal Not part of the public API — may change without notice.
|
|
1742
1742
|
*/
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1743
|
+
"cmaf fragment": Readonly<CmafFragmentEvent>;
|
|
1744
|
+
"buffer state event": Readonly<BufferStateEvent>;
|
|
1745
|
+
"initialized media": void;
|
|
1746
1746
|
}
|
|
1747
1747
|
|
|
1748
1748
|
export {};
|
package/core.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
1
|
+
import { t as e } from "./D3Z2pdQb.js";
|
|
2
2
|
import { a as t, c as n, i as r, l as i, n as a, o, r as s, s as c, u as l } from "./C01DcfYu.js";
|
|
3
3
|
export { a as AUTHENTICATION_EXPIRED_CODE, s as AUTHENTICATION_FAILED_CODE, r as CHANNEL_NOT_FOUND_CODE, t as CONNECTION_FAILED_AFTER_RETRIES_CODE, o as CONNECTION_FAILED_CODE, c as DISCONNECTED_BY_EDGE, n as INACTIVITY_CODE, i as NO_INCOMING_DATA, e as Vindral, l as VindralError };
|