@vindral/web-sdk 4.6.0-1-gb69b0cd0 → 4.6.0-2-g8124b200
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/{BddIq5-p.js → BZhOPJKq.js} +12 -12
- package/BdMchGeH.js +169 -0
- package/{xYchr7Lz.js → BlnnMVOY.js} +1 -1
- package/{BOdyvABa.js → Btob1dQR.js} +1 -1
- package/{BBVSf5AB.js → CEhUHEp2.js} +1 -1
- package/{CPha9Ish.js → CQewxOcB.js} +8 -8
- package/{BZPrVRbb.js → CXR7H5F_.js} +1 -1
- package/{DbdwBdhd.js → CcCOP7K4.js} +3 -3
- package/{BT3QQVZE.js → DMGwVGGt.js} +2 -2
- package/api-client.js +1 -1
- package/cast-sender.js +1 -1
- package/core.js +2 -2
- package/legacy.es.js +2199 -2117
- package/legacy.umd.js +10 -10
- package/package.json +1 -1
- package/player.js +3 -3
- package/{BeV3gRae.js → tY-Iy2bb.js} +2568 -2598
- package/vindral-player-component.js +2 -2
- package/CbyVl6wP.js +0 -59
- /package/{DTs-C-0Z.js → Bmh5ZR37.js} +0 -0
- /package/{B1PhBNUa.js → C6y28igI.js} +0 -0
- /package/{BKeRxR4O.js → DXFoVWQM.js} +0 -0
- /package/{94-sTJd8.js → DugdsSO5.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
2
|
import { t as n } from "./DrWNJwZx.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { i as r, n as i, t as a } from "./BdMchGeH.js";
|
|
4
|
+
import { t as o } from "./DXFoVWQM.js";
|
|
5
5
|
//#region ../../libs/web-sdk/src/decoders/WebCodecsAudioDecoderContext.ts
|
|
6
6
|
var s, c = globalThis, l = (e) => {
|
|
7
7
|
var t, n;
|
|
@@ -34,26 +34,26 @@ var s, c = globalThis, l = (e) => {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
this.doneCount++;
|
|
37
|
-
let { sample: n, decodeStartTime:
|
|
37
|
+
let { sample: n, decodeStartTime: r, priming: i } = t;
|
|
38
38
|
try {
|
|
39
|
-
let t = e.numberOfFrames,
|
|
40
|
-
if (
|
|
41
|
-
let u = new Float32Array((t - l) *
|
|
39
|
+
let t = e.numberOfFrames, a = e.numberOfChannels, s = e.sampleRate, c = e.duration, l = Math.min(t, Math.round(i.remaining * s / 48e3));
|
|
40
|
+
if (i.remaining = Math.max(0, i.remaining - Math.round(l * 48e3 / s)), l === t && t > 0) return;
|
|
41
|
+
let u = new Float32Array((t - l) * a);
|
|
42
42
|
e.copyTo(u, {
|
|
43
43
|
planeIndex: 0,
|
|
44
44
|
format: "f32",
|
|
45
45
|
frameOffset: l
|
|
46
46
|
});
|
|
47
|
-
let d = l > 0 ? Math.round((t - l) * n.timescale / s) : typeof c == "number" && Number.isFinite(c) ? Math.max(0, Math.round(c * n.timescale / 1e6)) : n.duration, f =
|
|
47
|
+
let d = l > 0 ? Math.round((t - l) * n.timescale / s) : typeof c == "number" && Number.isFinite(c) ? Math.max(0, Math.round(c * n.timescale / 1e6)) : n.duration, f = o(o({}, n), {}, {
|
|
48
48
|
timestamp: n.timestamp + Math.round(l * n.timescale / s),
|
|
49
49
|
duration: d,
|
|
50
50
|
type: "audio",
|
|
51
51
|
format: "f32",
|
|
52
52
|
data: u,
|
|
53
53
|
sampleRate: s,
|
|
54
|
-
channels:
|
|
54
|
+
channels: a,
|
|
55
55
|
statistics: {
|
|
56
|
-
decodeTime: Math.max(performance.now() -
|
|
56
|
+
decodeTime: Math.max(performance.now() - r, 0),
|
|
57
57
|
transportTimeFromWorker: 0,
|
|
58
58
|
transportTimeToWorker: 0,
|
|
59
59
|
samplesInBatch: 1
|
|
@@ -67,11 +67,11 @@ var s, c = globalThis, l = (e) => {
|
|
|
67
67
|
error: (e) => {
|
|
68
68
|
this.logger.error("Decoder error:", e.name, e.message), this.resetDecoderState(), this.errors.push(e);
|
|
69
69
|
}
|
|
70
|
-
})), e(this, "buildCodecString",
|
|
70
|
+
})), e(this, "buildCodecString", a), e(this, "getDescription", (e, t) => {
|
|
71
71
|
let n = this.initSegments.get(t.renditionId);
|
|
72
72
|
if (n && n.data.byteLength > 0 && n.codec === e) return n.data;
|
|
73
|
-
if (e === "opus") return
|
|
74
|
-
if (e === "aac") return
|
|
73
|
+
if (e === "opus") return i(t.channels, t.sampleRate);
|
|
74
|
+
if (e === "aac") return r(t.channels, t.sampleRate);
|
|
75
75
|
}), e(this, "reset", () => {
|
|
76
76
|
this.decodedSamples = [], this.decoder && this.decoder.state !== "closed" && this.decoder.reset(), this.resetDecoderState();
|
|
77
77
|
}), e(this, "unload", () => {
|
package/BdMchGeH.js
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { n as e } from "./BsfwXDui.js";
|
|
2
|
+
import { i as t, n, t as r } from "./DSw1XhvD.js";
|
|
3
|
+
//#region ../../libs/utils/src/BitReader.ts
|
|
4
|
+
var i = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), s = class {
|
|
5
|
+
constructor(s, c = 0) {
|
|
6
|
+
t(this, i, void 0), t(this, a, void 0), t(this, o, void 0), e(this, "position", () => r(o, this)), e(this, "peekBit", () => this.getBit(r(a, this), r(o, this))), e(this, "readBit", () => {
|
|
7
|
+
var e;
|
|
8
|
+
let t = this.peekBit();
|
|
9
|
+
return n(o, this, (e = r(o, this), e++, e)), t;
|
|
10
|
+
}), e(this, "readBits", (e) => {
|
|
11
|
+
let t = 0;
|
|
12
|
+
for (let c = 0; c < e; c++) {
|
|
13
|
+
var i, s;
|
|
14
|
+
t = t << 1 | (this.getBit(r(a, this), (n(o, this, (i = r(o, this), s = i++, i)), s)) ? 1 : 0);
|
|
15
|
+
}
|
|
16
|
+
return t;
|
|
17
|
+
}), e(this, "remainingBits", () => r(a, this).byteLength * 8 - r(o, this)), e(this, "readSignedExpGolomb", () => {
|
|
18
|
+
let e = this.readUnsignedExpGolomb();
|
|
19
|
+
return e & 1 ? (e + 1) / 2 : -(e / 2);
|
|
20
|
+
}), e(this, "readUnsignedExpGolomb", () => {
|
|
21
|
+
var e, t;
|
|
22
|
+
let i = 0;
|
|
23
|
+
for (; this.getBit(r(a, this), (n(o, this, (e = r(o, this), t = e++, e)), t)) === 0;) i++;
|
|
24
|
+
let s = 1 << i;
|
|
25
|
+
for (let e = i - 1; e >= 0; e--) {
|
|
26
|
+
var c, l;
|
|
27
|
+
s |= this.getBit(r(a, this), (n(o, this, (c = r(o, this), l = c++, c)), l)) << e;
|
|
28
|
+
}
|
|
29
|
+
return s - 1;
|
|
30
|
+
}), e(this, "getBit", (e, t) => {
|
|
31
|
+
if (e.byteLength * 8 <= t) throw Error("BitReader: Out of bounds");
|
|
32
|
+
return e[t >> 3] >> 7 - (t & 7) & 1;
|
|
33
|
+
}), n(i, this, s), n(a, this, new Uint8Array(r(i, this))), n(o, this, c);
|
|
34
|
+
}
|
|
35
|
+
bytes() {
|
|
36
|
+
return r(a, this);
|
|
37
|
+
}
|
|
38
|
+
}, c = [
|
|
39
|
+
96e3,
|
|
40
|
+
88200,
|
|
41
|
+
64e3,
|
|
42
|
+
48e3,
|
|
43
|
+
44100,
|
|
44
|
+
32e3,
|
|
45
|
+
24e3,
|
|
46
|
+
22050,
|
|
47
|
+
16e3,
|
|
48
|
+
12e3,
|
|
49
|
+
11025,
|
|
50
|
+
8e3,
|
|
51
|
+
7350
|
|
52
|
+
], l = (e, t) => {
|
|
53
|
+
let n = c.indexOf(t);
|
|
54
|
+
if (n === -1 || e < 1 || e > 8 || e === 7) return;
|
|
55
|
+
let r = /* @__PURE__ */ new ArrayBuffer(2), i = new Uint8Array(r), a = e === 8 ? 7 : e;
|
|
56
|
+
return i[0] = 16 | n >> 1, i[1] = (n & 1) << 7 | a << 3, r;
|
|
57
|
+
}, u = [
|
|
58
|
+
void 0,
|
|
59
|
+
1,
|
|
60
|
+
2,
|
|
61
|
+
3,
|
|
62
|
+
4,
|
|
63
|
+
5,
|
|
64
|
+
6,
|
|
65
|
+
8,
|
|
66
|
+
void 0,
|
|
67
|
+
void 0,
|
|
68
|
+
void 0,
|
|
69
|
+
7,
|
|
70
|
+
8,
|
|
71
|
+
24,
|
|
72
|
+
8
|
|
73
|
+
], d = 5, f = 29, p = new Set([
|
|
74
|
+
1,
|
|
75
|
+
2,
|
|
76
|
+
3,
|
|
77
|
+
4
|
|
78
|
+
]), m = 695, h = 1352, g = (e) => {
|
|
79
|
+
let t = new s(e.slice().buffer), n = (e) => t.remainingBits() >= e, r = () => {
|
|
80
|
+
if (!n(5)) return;
|
|
81
|
+
let e = t.readBits(5);
|
|
82
|
+
return e === 31 ? n(6) ? 32 + t.readBits(6) : void 0 : e;
|
|
83
|
+
}, i = () => {
|
|
84
|
+
if (!n(4)) return;
|
|
85
|
+
let e = t.readBits(4);
|
|
86
|
+
return e === 15 ? n(24) ? t.readBits(24) : void 0 : c[e];
|
|
87
|
+
}, a = r(), o = i();
|
|
88
|
+
if (!a || !o || !n(4)) return;
|
|
89
|
+
let l = t.readBits(4), g = u[l];
|
|
90
|
+
if (a !== d && a !== f) {
|
|
91
|
+
if (!p.has(a) || l === 0 || !n(2)) return {
|
|
92
|
+
sampleRate: o,
|
|
93
|
+
channelCount: g
|
|
94
|
+
};
|
|
95
|
+
if (t.readBits(1), t.readBits(1) === 1) {
|
|
96
|
+
if (!n(14)) return {
|
|
97
|
+
sampleRate: o,
|
|
98
|
+
channelCount: g
|
|
99
|
+
};
|
|
100
|
+
t.readBits(14);
|
|
101
|
+
}
|
|
102
|
+
if (!n(1)) return {
|
|
103
|
+
sampleRate: o,
|
|
104
|
+
channelCount: g
|
|
105
|
+
};
|
|
106
|
+
if (t.readBits(1) === 1) {
|
|
107
|
+
if (!n(1)) return {
|
|
108
|
+
sampleRate: o,
|
|
109
|
+
channelCount: g
|
|
110
|
+
};
|
|
111
|
+
t.readBits(1);
|
|
112
|
+
}
|
|
113
|
+
if (!n(16) || t.readBits(11) !== m || r() !== d || !n(1) || t.readBits(1) === 0) return {
|
|
114
|
+
sampleRate: o,
|
|
115
|
+
channelCount: g
|
|
116
|
+
};
|
|
117
|
+
let e = i();
|
|
118
|
+
return e ? {
|
|
119
|
+
sampleRate: e,
|
|
120
|
+
channelCount: n(12) && t.readBits(11) === h && t.readBits(1) === 1 && g === 1 ? 2 : g
|
|
121
|
+
} : {
|
|
122
|
+
sampleRate: o,
|
|
123
|
+
channelCount: g
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
let _ = i();
|
|
127
|
+
if (!(!_ || r() === void 0)) return a === f && g === 1 && (g = 2), {
|
|
128
|
+
sampleRate: _,
|
|
129
|
+
channelCount: g
|
|
130
|
+
};
|
|
131
|
+
}, _ = (e) => {
|
|
132
|
+
if (!e) return;
|
|
133
|
+
let t = e.channelMappingTable, n = new Uint8Array(19 + t.byteLength), r = new DataView(n.buffer, n.byteOffset, n.byteLength);
|
|
134
|
+
return n.set([
|
|
135
|
+
79,
|
|
136
|
+
112,
|
|
137
|
+
117,
|
|
138
|
+
115,
|
|
139
|
+
72,
|
|
140
|
+
101,
|
|
141
|
+
97,
|
|
142
|
+
100
|
|
143
|
+
], 0), r.setUint8(8, 1), r.setUint8(9, e.channelCount), r.setUint16(10, e.preSkip, !0), r.setUint32(12, e.inputSampleRate, !0), r.setInt16(16, e.outputGain, !0), r.setUint8(18, e.channelMappingFamily), t.byteLength > 0 && n.set(t, 19), n;
|
|
144
|
+
}, v = (e, t) => {
|
|
145
|
+
if (e < 1 || e > 2) return;
|
|
146
|
+
let n = new Uint8Array(19), r = new DataView(n.buffer, n.byteOffset, n.byteLength);
|
|
147
|
+
return n.set([
|
|
148
|
+
79,
|
|
149
|
+
112,
|
|
150
|
+
117,
|
|
151
|
+
115,
|
|
152
|
+
72,
|
|
153
|
+
101,
|
|
154
|
+
97,
|
|
155
|
+
100
|
|
156
|
+
]), r.setUint8(8, 1), r.setUint8(9, e), r.setUint16(10, 3840, !0), r.setUint32(12, t, !0), r.setInt16(16, 0, !0), r.setUint8(18, 0), n;
|
|
157
|
+
}, y = (e) => {
|
|
158
|
+
switch (e) {
|
|
159
|
+
case "opus": return "opus";
|
|
160
|
+
case "aac": return "mp4a.40.2";
|
|
161
|
+
case "mp3": return "mp3";
|
|
162
|
+
default: {
|
|
163
|
+
let t = e;
|
|
164
|
+
throw Error(`Unsupported audio codec: ${t}`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
//#endregion
|
|
169
|
+
export { g as a, l as i, v as n, s as o, _ as r, y as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
|
-
import { n, r } from "./
|
|
2
|
+
import { n, r } from "./C6y28igI.js";
|
|
3
3
|
//#region ../../libs/cast-sender/src/CastSender.ts
|
|
4
4
|
var i = 1e4, a = "CastSender was unloaded before the Google Cast SDK finished initializing", o = class extends r {
|
|
5
5
|
constructor(r) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e } from "./BsfwXDui.js";
|
|
2
|
-
import { t } from "./
|
|
2
|
+
import { t } from "./DXFoVWQM.js";
|
|
3
3
|
//#region ../../libs/utils/src/noop.ts
|
|
4
4
|
var n = () => {}, r = "connection_failed", i = "connection_failed_will_not_attempt_again", a = "authentication_error", o = "authentication_expired", s = "channel_not_found", c = "channel_not_live", l = "no_incoming_data_error", u = "connection_inactivity", d = "missing_init_segment", f = "no_track_context", p = "invalid_track_context_state", m = "disconnected_by_edge", h = "decoder_error", g = "audio_player_error", _ = "unsupported_audio_codec", v = "media_source_error", y = "webgl_context_lost_error", b = "access_forbidden", x = "channel_switch_failed", S = "drm_error", C = class extends Error {
|
|
5
5
|
constructor(n, r, i = {}) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
|
-
import { _ as n, a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as ee, n as d, o as te, p as ne, r as re, s as ie, t as ae, u as oe, v as se } from "./
|
|
3
|
-
import { F as ce } from "./
|
|
2
|
+
import { _ as n, a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as ee, n as d, o as te, p as ne, r as re, s as ie, t as ae, u as oe, v as se } from "./tY-Iy2bb.js";
|
|
3
|
+
import { F as ce } from "./CEhUHEp2.js";
|
|
4
4
|
import { i as f, n as p, r as m, t as h } from "./DSw1XhvD.js";
|
|
5
|
-
import { c as le, n as ue, t as de } from "./
|
|
6
|
-
import { n as fe, r as pe } from "./
|
|
7
|
-
import { _ as g, a as _, b as me, c as he, d as ge, f as _e, g as v, h as ve, i as y, l as ye, m as be, n as xe, o as Se, p as Ce, r as b, s as x, t as we, u as Te, v as Ee, y as De } from "./
|
|
8
|
-
import { t as S } from "./
|
|
9
|
-
import { t as Oe } from "./
|
|
5
|
+
import { c as le, n as ue, t as de } from "./Btob1dQR.js";
|
|
6
|
+
import { n as fe, r as pe } from "./C6y28igI.js";
|
|
7
|
+
import { _ as g, a as _, b as me, c as he, d as ge, f as _e, g as v, h as ve, i as y, l as ye, m as be, n as xe, o as Se, p as Ce, r as b, s as x, t as we, u as Te, v as Ee, y as De } from "./Bmh5ZR37.js";
|
|
8
|
+
import { t as S } from "./DugdsSO5.js";
|
|
9
|
+
import { t as Oe } from "./BlnnMVOY.js";
|
|
10
10
|
//#region ../../libs/utils/src/mediaMetadata.ts
|
|
11
11
|
var ke = ({ title: e, subTitle: t = "Live stream", poster: n }) => {
|
|
12
12
|
if (document.title = e, "mediaSession" in navigator) try {
|
|
@@ -2667,7 +2667,7 @@ function Ba(e) {
|
|
|
2667
2667
|
}
|
|
2668
2668
|
}
|
|
2669
2669
|
function Va() {
|
|
2670
|
-
let e = () => (customElements.get("vindral-debug-panel") || import("./
|
|
2670
|
+
let e = () => (customElements.get("vindral-debug-panel") || import("./CcCOP7K4.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(g.DEBUG_PANEL_OPEN, ""), h(I, this));
|
|
2671
2671
|
window._vindralDebug = e, p(Bi, this, e);
|
|
2672
2672
|
}
|
|
2673
2673
|
function Ha() {
|