@vindral/web-sdk 4.5.1-2-g3ec7166b1 → 4.5.1-21-g6ea9dc89e
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/94-sTJd8.js +7 -0
- package/B1PhBNUa.js +101 -0
- package/{DeYmk5AL.js → BOdyvABa.js} +1 -1
- package/{Cug44nXk.js → CN4egPyY.js} +2 -2
- package/CiWlpwR0.js +123 -0
- package/{DjJEPz9H.js → CpHwnDBU.js} +1429 -1416
- package/{BRKrFfT9.js → D3-6T1ji.js} +45 -22
- package/{BsJtUY1Z.js → DRMUL9n5.js} +2 -2
- package/{B7hT-BKr.js → DSw1XhvD.js} +1 -6
- package/{C4DIyUFR.js → DTs-C-0Z.js} +10 -10
- package/{rVXtcXLn.js → DbdwBdhd.js} +306 -305
- package/api-client.js +1 -1
- package/cast-sender.d.ts +22 -3
- package/cast-sender.js +1 -1
- package/core.d.ts +65 -6
- package/core.js +3 -3
- package/legacy.d.ts +75 -6
- package/legacy.es.js +2815 -2557
- package/legacy.umd.js +172 -77
- package/package.json +1 -1
- package/player.d.ts +30 -7
- package/player.js +3 -3
- package/react.d.ts +30 -7
- package/{CTg1R6Ec.js → v9wYC9jr.js} +2935 -2759
- package/vindral-player-component.js +2 -2
- package/{BdFcdkj1.js → xYchr7Lz.js} +26 -22
- package/C01DcfYu.js +0 -118
- package/FYiEDBC4.js +0 -50
- /package/{RxoWWyzp.js → BKeRxR4O.js} +0 -0
- /package/{Bt-ONXfO.js → CbyVl6wP.js} +0 -0
- /package/{Ddby8xU_.js → Ct8GqCxq.js} +0 -0
package/94-sTJd8.js
ADDED
package/B1PhBNUa.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
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/Emitter.ts
|
|
4
|
+
var i = class {
|
|
5
|
+
constructor() {
|
|
6
|
+
e(this, "listeners", {});
|
|
7
|
+
}
|
|
8
|
+
emit(e, t) {
|
|
9
|
+
let n = this.listeners[e];
|
|
10
|
+
if (n) {
|
|
11
|
+
let r = !1;
|
|
12
|
+
for (let e = 0; e < n.length; e++) if (n[e].once) {
|
|
13
|
+
r = !0;
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
r && (this.listeners[e] = n.filter((e) => !e.once));
|
|
17
|
+
let i, a = n.length;
|
|
18
|
+
for (let e = 0; e < a; e++) {
|
|
19
|
+
let r = n[e].fn(t);
|
|
20
|
+
typeof r == "function" && (i || (i = []), i.push(r));
|
|
21
|
+
}
|
|
22
|
+
if (i) for (let e = 0; e < i.length; e++) i[e]();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
off(e, t) {
|
|
26
|
+
let n = this.listeners[e];
|
|
27
|
+
n && (this.listeners[e] = n.filter((e) => e.fn !== t));
|
|
28
|
+
}
|
|
29
|
+
on(e, t) {
|
|
30
|
+
this.add(e, t, !1);
|
|
31
|
+
}
|
|
32
|
+
once(e, t) {
|
|
33
|
+
this.add(e, t, !0);
|
|
34
|
+
}
|
|
35
|
+
hasListeners(e) {
|
|
36
|
+
let t = this.listeners[e];
|
|
37
|
+
return t !== void 0 && t.length > 0;
|
|
38
|
+
}
|
|
39
|
+
reset() {
|
|
40
|
+
this.listeners = {};
|
|
41
|
+
}
|
|
42
|
+
add(e, t, n) {
|
|
43
|
+
let r = this.listeners[e], i = {
|
|
44
|
+
fn: t,
|
|
45
|
+
once: n
|
|
46
|
+
};
|
|
47
|
+
r ? r.push(i) : this.listeners[e] = [i];
|
|
48
|
+
}
|
|
49
|
+
}, a = [
|
|
50
|
+
"off",
|
|
51
|
+
"error",
|
|
52
|
+
"warn",
|
|
53
|
+
"info",
|
|
54
|
+
"debug",
|
|
55
|
+
"trace"
|
|
56
|
+
], o = {
|
|
57
|
+
ERROR: "error",
|
|
58
|
+
WARN: "warn",
|
|
59
|
+
INFO: "info",
|
|
60
|
+
DEBUG: "debug",
|
|
61
|
+
TRACE: "trace",
|
|
62
|
+
OFF: "off"
|
|
63
|
+
}, s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = class i {
|
|
64
|
+
constructor({ context: i, logLevel: a, debug: o }) {
|
|
65
|
+
t(this, s, /* @__PURE__ */ new Map()), t(this, c, ""), t(this, l, !1), t(this, u, "off"), e(this, "trace", (...e) => {}), e(this, "debug", (...e) => {}), e(this, "info", (...e) => {}), e(this, "warn", (...e) => {}), e(this, "error", (...e) => {}), e(this, "table", (...e) => {}), e(this, "count", (...e) => {}), n(c, this, i), n(u, this, a), n(l, this, o || !1), this.setLevel(a), this.setDebug(r(l, this));
|
|
66
|
+
}
|
|
67
|
+
setDebug(e) {
|
|
68
|
+
n(l, this, e);
|
|
69
|
+
for (let [t, n] of r(s, this)) n.setDebug(e);
|
|
70
|
+
e ? (this.table = console.table.bind(console), this.count = console.count.bind(console)) : (this.table = () => {}, this.count = () => {});
|
|
71
|
+
}
|
|
72
|
+
getLevel() {
|
|
73
|
+
return r(u, this);
|
|
74
|
+
}
|
|
75
|
+
setLevel(e) {
|
|
76
|
+
n(u, this, e);
|
|
77
|
+
for (let [t, n] of r(s, this)) n.setLevel(e);
|
|
78
|
+
let t = a.indexOf(e);
|
|
79
|
+
for (let [e, n] of a.entries()) n !== "off" && (e <= t ? this[n] = console[n].bind(console, "%c%s %c%s", "font-weight:bold;", n.toUpperCase(), "font-weight:normal;", r(c, this)) : this[n] = () => {});
|
|
80
|
+
}
|
|
81
|
+
createContext(e) {
|
|
82
|
+
let t = r(s, this).get(e);
|
|
83
|
+
if (!t) {
|
|
84
|
+
let t = new i({
|
|
85
|
+
context: `${e}`,
|
|
86
|
+
logLevel: r(u, this),
|
|
87
|
+
debug: r(l, this)
|
|
88
|
+
});
|
|
89
|
+
return r(s, this).set(e, t), t;
|
|
90
|
+
}
|
|
91
|
+
return t;
|
|
92
|
+
}
|
|
93
|
+
static get() {
|
|
94
|
+
return f._ || (f._ = new i({
|
|
95
|
+
context: "Vindral",
|
|
96
|
+
logLevel: "off"
|
|
97
|
+
})), f._;
|
|
98
|
+
}
|
|
99
|
+
}, f = { _: void 0 };
|
|
100
|
+
//#endregion
|
|
101
|
+
export { d as n, i as r, o as t };
|
|
@@ -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 { t as r } from "./
|
|
4
|
-
import { i, n as a, t as o } from "./
|
|
3
|
+
import { t as r } from "./BKeRxR4O.js";
|
|
4
|
+
import { i, n as a, t as o } from "./CbyVl6wP.js";
|
|
5
5
|
//#region ../../libs/web-sdk/src/decoders/PendingSampleMap.ts
|
|
6
6
|
var s = class {
|
|
7
7
|
constructor() {
|
package/CiWlpwR0.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { n as e } from "./BsfwXDui.js";
|
|
2
|
+
import { t } from "./BKeRxR4O.js";
|
|
3
|
+
//#region ../../libs/utils/src/noop.ts
|
|
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
|
+
constructor(n, r, i = {}) {
|
|
6
|
+
super(n), e(this, "props", void 0), e(this, "extra", {}), e(this, "code", () => this.props.code), e(this, "isFatal", () => this.props.isFatal), e(this, "source", () => this.props.source), e(this, "type", () => {
|
|
7
|
+
var e;
|
|
8
|
+
return (e = this.props.type) == null ? "external" : e;
|
|
9
|
+
}), e(this, "toStringifiable", () => {
|
|
10
|
+
var e;
|
|
11
|
+
let n = this.source(), r = n instanceof Error ? n.stack : this.stack;
|
|
12
|
+
return t(t({}, this.extra), {}, {
|
|
13
|
+
code: this.props.code,
|
|
14
|
+
isFatal: this.props.isFatal,
|
|
15
|
+
type: this.props.type,
|
|
16
|
+
message: this.message,
|
|
17
|
+
sourceMessage: (e = this.source()) == null ? void 0 : e.message,
|
|
18
|
+
stack: r
|
|
19
|
+
});
|
|
20
|
+
}), this.props = r, this.extra = i, Object.setPrototypeOf(this, new.target.prototype);
|
|
21
|
+
}
|
|
22
|
+
}, w = (e, t) => new C("MediaElement Error", {
|
|
23
|
+
isFatal: e,
|
|
24
|
+
code: "media_element_error",
|
|
25
|
+
source: t
|
|
26
|
+
}, { mediaErrorCode: t.code }), T = (e, t) => new C("Decoder Error", {
|
|
27
|
+
isFatal: e,
|
|
28
|
+
code: h,
|
|
29
|
+
source: t,
|
|
30
|
+
type: "internal"
|
|
31
|
+
}), E = (e, t, n) => new C(`No decoder available for audio codec "${e}" in non-MSE playback. ${t}`, {
|
|
32
|
+
isFatal: !0,
|
|
33
|
+
code: _,
|
|
34
|
+
source: n,
|
|
35
|
+
type: "external"
|
|
36
|
+
}, {
|
|
37
|
+
codec: e,
|
|
38
|
+
reason: t
|
|
39
|
+
}), D = (e, t) => new C("Audio Player Error", {
|
|
40
|
+
isFatal: e,
|
|
41
|
+
code: g,
|
|
42
|
+
source: t,
|
|
43
|
+
type: "internal"
|
|
44
|
+
}), O = (e, t) => new C(`No init segment for rendition id ${e} for channel ${t}`, {
|
|
45
|
+
isFatal: !1,
|
|
46
|
+
code: d,
|
|
47
|
+
type: "internal"
|
|
48
|
+
}), k = (e, t, n, r) => new C("MediaSource Error", {
|
|
49
|
+
isFatal: e,
|
|
50
|
+
code: v,
|
|
51
|
+
source: t,
|
|
52
|
+
type: "internal"
|
|
53
|
+
}, {
|
|
54
|
+
type: r,
|
|
55
|
+
consecutiveErrorsCount: n
|
|
56
|
+
}), A = (e, t) => new C(`No track context for ${e}${t ? `, rendition id ${t}` : ""}`, {
|
|
57
|
+
isFatal: !1,
|
|
58
|
+
code: f,
|
|
59
|
+
type: "internal"
|
|
60
|
+
}), j = (e, t) => new C(`Track context is in an invalid state for ${e}${t ? `, rendition id ${t}` : ""}`, {
|
|
61
|
+
isFatal: !1,
|
|
62
|
+
code: p,
|
|
63
|
+
type: "internal"
|
|
64
|
+
}), M = () => new C("Web Audio Context resume timeout", {
|
|
65
|
+
isFatal: !1,
|
|
66
|
+
code: "web_audio_context_resume_timeout"
|
|
67
|
+
}), N = (e) => new C("Disconnected From Edge Server", {
|
|
68
|
+
type: "external",
|
|
69
|
+
source: e,
|
|
70
|
+
isFatal: !1,
|
|
71
|
+
code: m
|
|
72
|
+
}), P = (e) => new C("Authentication Failed", {
|
|
73
|
+
isFatal: !0,
|
|
74
|
+
code: a,
|
|
75
|
+
source: e
|
|
76
|
+
}), F = (e) => new C("Authentication Expired", {
|
|
77
|
+
isFatal: !0,
|
|
78
|
+
code: o,
|
|
79
|
+
source: e
|
|
80
|
+
}), I = (e, t) => new C("Connection closed due to inactivity", {
|
|
81
|
+
isFatal: !1,
|
|
82
|
+
code: u,
|
|
83
|
+
source: t,
|
|
84
|
+
type: e
|
|
85
|
+
}), L = (e, t) => new C("Channel not found", {
|
|
86
|
+
isFatal: !1,
|
|
87
|
+
code: s,
|
|
88
|
+
source: t,
|
|
89
|
+
type: e
|
|
90
|
+
}), R = (e) => new C("Waiting for channel to go live", {
|
|
91
|
+
isFatal: !1,
|
|
92
|
+
code: c,
|
|
93
|
+
source: e,
|
|
94
|
+
type: "external"
|
|
95
|
+
}), z = (e) => new C("No Incoming Data", {
|
|
96
|
+
isFatal: !1,
|
|
97
|
+
code: l,
|
|
98
|
+
source: e
|
|
99
|
+
}), B = (e) => new C("Connection attempt failed", {
|
|
100
|
+
isFatal: !1,
|
|
101
|
+
code: r,
|
|
102
|
+
source: e
|
|
103
|
+
}), V = () => new C("Connection failed - no more reconnect attempts", {
|
|
104
|
+
isFatal: !0,
|
|
105
|
+
code: i
|
|
106
|
+
}), H = (e) => new C("WebGL Context Lost", {
|
|
107
|
+
isFatal: !1,
|
|
108
|
+
code: y,
|
|
109
|
+
source: e,
|
|
110
|
+
type: "internal"
|
|
111
|
+
}), U = (e) => new C(e, {
|
|
112
|
+
isFatal: !0,
|
|
113
|
+
code: b
|
|
114
|
+
}), W = (e) => new C(`Channel switch to '${e}' failed`, {
|
|
115
|
+
isFatal: !1,
|
|
116
|
+
code: x
|
|
117
|
+
}), G = (e, t = !1, n) => new C(e, {
|
|
118
|
+
isFatal: t,
|
|
119
|
+
code: S,
|
|
120
|
+
source: n
|
|
121
|
+
});
|
|
122
|
+
//#endregion
|
|
123
|
+
export { V as A, I as C, O as D, k as E, E as M, H as N, z as O, n as P, G as S, w as T, L as _, c as a, T as b, m as c, C as d, U as f, F as g, P as h, s as i, B as j, A as k, u as l, D as m, o as n, i as o, M as p, a as r, r as s, b as t, l as u, R as v, j as w, N as x, W as y };
|