@webitel/ui-sdk 25.10.50 → 25.10.52
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/errors-DCJKAXTz.js +70 -0
- package/dist/img/sprite/index.js +4 -0
- package/dist/img/sprite/player-enter-fullscreen.svg +3 -0
- package/dist/img/sprite/player-exit-fullscreen.svg +4 -0
- package/dist/install-hlMLq0U3.js +111257 -0
- package/dist/prod-DTLJXtPo.js +994 -0
- package/dist/srt-parser-CWqahKwO.js +27 -0
- package/dist/ssa-parser-BqjjKy4M.js +209 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +2 -100294
- package/dist/ui-sdk.umd.cjs +1633 -1605
- package/dist/vidstack-54Jpr2Lq-B-3uagaf.js +142 -0
- package/dist/vidstack-BP-l85ST-cd089zs4.js +21 -0
- package/dist/vidstack-BTBUzdbF-BuhaE3ef.js +29 -0
- package/dist/vidstack-Ccp8mxka-Cyoe3N05.js +20 -0
- package/dist/vidstack-Dgd3Tj9x-D_ifpfX9.js +397 -0
- package/dist/vidstack-DscYSLiW-Dk1undJ-.js +33 -0
- package/dist/vidstack-HTyVv8Yq-DRdwbVZd.js +52 -0
- package/dist/vidstack-audio-CFFRqrJ3.js +26 -0
- package/dist/vidstack-dash-BDtu3f4j.js +405 -0
- package/dist/vidstack-google-cast-hKSzmdiF.js +405 -0
- package/dist/vidstack-hls-BLyFYePL.js +328 -0
- package/dist/vidstack-video-BlmYiw-x.js +149 -0
- package/dist/vidstack-vimeo-DhWdWK51.js +434 -0
- package/dist/vidstack-youtube-l9Si5Vl-.js +204 -0
- package/package.json +2 -1
- package/src/assets/icons/sprite/index.js +4 -0
- package/src/assets/icons/sprite/player-enter-fullscreen.svg +3 -0
- package/src/assets/icons/sprite/player-exit-fullscreen.svg +4 -0
- package/src/components/index.js +3 -0
- package/src/components/wt-dual-panel/wt-dual-panel.vue +2 -2
- package/src/components/wt-loader/wt-loader.vue +1 -0
- package/src/components/wt-popup/_mixins.scss +31 -0
- package/src/components/wt-popup/wt-popup.vue +7 -21
- package/src/components/wt-table/wt-table.vue +5 -0
- package/src/components/wt-vidstack-player/components/layouts/video-layout.vue +112 -0
- package/src/components/wt-vidstack-player/components/panels/media-control-panel/components/buttons/fullscreen-button.vue +37 -0
- package/src/components/wt-vidstack-player/components/panels/media-control-panel/components/buttons/play-button.vue +21 -0
- package/src/components/wt-vidstack-player/components/panels/media-control-panel/components/sliders/time-slider.vue +31 -0
- package/src/components/wt-vidstack-player/components/panels/media-control-panel/components/time-group.vue +19 -0
- package/src/components/wt-vidstack-player/components/panels/media-control-panel/media-control-panel.vue +34 -0
- package/src/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue +95 -0
- package/src/components/wt-vidstack-player/components/toggle-button.vue +54 -0
- package/src/components/wt-vidstack-player/wt-vidstack-player.vue +156 -0
- package/src/install.ts +1 -0
- package/src/store/new/modules/tableStoreModule/tableStoreModule.js +1 -1
- package/types/components/index.d.ts +3 -1
- package/types/components/wt-table/wt-table.vue.d.ts +1 -1
- package/types/components/wt-vidstack-player/components/layouts/video-layout.vue.d.ts +11 -0
- package/types/components/wt-vidstack-player/components/panels/media-control-panel/components/buttons/fullscreen-button.vue.d.ts +6 -0
- package/types/components/wt-vidstack-player/components/panels/media-control-panel/components/buttons/play-button.vue.d.ts +2 -0
- package/types/components/wt-vidstack-player/components/panels/media-control-panel/components/sliders/time-slider.vue.d.ts +2 -0
- package/types/components/wt-vidstack-player/components/panels/media-control-panel/components/time-group.vue.d.ts +2 -0
- package/types/components/wt-vidstack-player/components/panels/media-control-panel/media-control-panel.vue.d.ts +2 -0
- package/types/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue.d.ts +11 -0
- package/types/components/wt-vidstack-player/components/toggle-button.vue.d.ts +12 -0
- package/types/components/wt-vidstack-player/wt-vidstack-player.vue.d.ts +25 -0
- package/types/install.d.ts +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { s } from "./install-hlMLq0U3.js";
|
|
2
|
+
import { H as i, a as r } from "./vidstack-Dgd3Tj9x-D_ifpfX9.js";
|
|
3
|
+
class d extends i {
|
|
4
|
+
constructor(t, e) {
|
|
5
|
+
super(t, e), this.$$PROVIDER_TYPE = "AUDIO", s(() => {
|
|
6
|
+
this.airPlay = new r(this.media, e);
|
|
7
|
+
}, this.scope);
|
|
8
|
+
}
|
|
9
|
+
get type() {
|
|
10
|
+
return "audio";
|
|
11
|
+
}
|
|
12
|
+
setup() {
|
|
13
|
+
super.setup(), this.type === "audio" && this.b.delegate.c("provider-setup", this);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The native HTML `<audio>` element.
|
|
17
|
+
*
|
|
18
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement}
|
|
19
|
+
*/
|
|
20
|
+
get audio() {
|
|
21
|
+
return this.a;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
d as AudioProvider
|
|
26
|
+
};
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import { i as N, b as m, p as _, d as R, Q as L, l as E, e as x, D as g, f as $, T as y, g as C, L as l, h as F, j, k as I, I as K, m as A, n as P, o as O, q as Q } from "./install-hlMLq0U3.js";
|
|
2
|
+
import { VideoProvider as H } from "./vidstack-video-BlmYiw-x.js";
|
|
3
|
+
import { R as G } from "./vidstack-Ccp8mxka-Cyoe3N05.js";
|
|
4
|
+
function S(n) {
|
|
5
|
+
try {
|
|
6
|
+
return new Intl.DisplayNames(navigator.languages, { type: "language" }).of(n) ?? null;
|
|
7
|
+
} catch {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const V = (n) => `dash-${$(n)}`;
|
|
12
|
+
class z {
|
|
13
|
+
constructor(t, i) {
|
|
14
|
+
this.m = t, this.b = i, this.d = null, this.qb = null, this.rb = {}, this.sb = /* @__PURE__ */ new Set(), this.Kb = null, this.oe = {}, this.na = -1;
|
|
15
|
+
}
|
|
16
|
+
get instance() {
|
|
17
|
+
return this.d;
|
|
18
|
+
}
|
|
19
|
+
setup(t) {
|
|
20
|
+
this.d = t().create();
|
|
21
|
+
const i = this.Ii.bind(this);
|
|
22
|
+
for (const e of Object.values(t.events))
|
|
23
|
+
this.d.on(e, i);
|
|
24
|
+
this.d.on(t.events.ERROR, this.Q.bind(this));
|
|
25
|
+
for (const e of this.sb)
|
|
26
|
+
e(this.d);
|
|
27
|
+
this.b.player.dispatch("dash-instance", {
|
|
28
|
+
detail: this.d
|
|
29
|
+
}), this.d.initialize(this.m, void 0, !1), this.d.updateSettings({
|
|
30
|
+
streaming: {
|
|
31
|
+
text: {
|
|
32
|
+
// Disabling text rendering by dash.
|
|
33
|
+
defaultEnabled: !1,
|
|
34
|
+
dispatchForManualRendering: !0
|
|
35
|
+
},
|
|
36
|
+
buffer: {
|
|
37
|
+
/// Enables buffer replacement when switching bitrates for faster switching.
|
|
38
|
+
fastSwitchEnabled: !0
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
...this.rb
|
|
42
|
+
}), this.d.on(t.events.FRAGMENT_LOADING_STARTED, this.Ji.bind(this)), this.d.on(
|
|
43
|
+
t.events.FRAGMENT_LOADING_COMPLETED,
|
|
44
|
+
this.Ki.bind(this)
|
|
45
|
+
), this.d.on(t.events.MANIFEST_LOADED, this.Li.bind(this)), this.d.on(t.events.QUALITY_CHANGE_RENDERED, this.Za.bind(this)), this.d.on(t.events.TEXT_TRACKS_ADDED, this.Mi.bind(this)), this.d.on(t.events.TRACK_CHANGE_RENDERED, this.pc.bind(this)), this.b.qualities[L.Ia] = this.je.bind(this), E(this.b.qualities, "change", this.ke.bind(this)), E(this.b.audioTracks, "change", this.le.bind(this)), this.qb = x(this.me.bind(this));
|
|
46
|
+
}
|
|
47
|
+
aa(t) {
|
|
48
|
+
return new g(V(t.type), { detail: t });
|
|
49
|
+
}
|
|
50
|
+
me() {
|
|
51
|
+
if (!this.b.$state.live())
|
|
52
|
+
return;
|
|
53
|
+
const t = new G(this.ne.bind(this));
|
|
54
|
+
return t.Xa(), t.$.bind(t);
|
|
55
|
+
}
|
|
56
|
+
ne() {
|
|
57
|
+
if (!this.d)
|
|
58
|
+
return;
|
|
59
|
+
const t = this.d.duration() - this.d.time();
|
|
60
|
+
this.b.$state.liveSyncPosition.set(isNaN(t) ? 1 / 0 : t);
|
|
61
|
+
}
|
|
62
|
+
Ii(t) {
|
|
63
|
+
var i;
|
|
64
|
+
(i = this.b.player) == null || i.dispatch(this.aa(t));
|
|
65
|
+
}
|
|
66
|
+
Ni(t) {
|
|
67
|
+
var a;
|
|
68
|
+
const i = (a = this.Kb) == null ? void 0 : a[y._], e = (i == null ? void 0 : i.track).cues;
|
|
69
|
+
if (!i || !e)
|
|
70
|
+
return;
|
|
71
|
+
const d = this.Kb.id, o = this.oe[d] ?? 0, h = this.aa(t);
|
|
72
|
+
for (let u = o; u < e.length; u++) {
|
|
73
|
+
const r = e[u];
|
|
74
|
+
r.positionAlign || (r.positionAlign = "auto"), this.Kb.addCue(r, h);
|
|
75
|
+
}
|
|
76
|
+
this.oe[d] = e.length;
|
|
77
|
+
}
|
|
78
|
+
Mi(t) {
|
|
79
|
+
var o;
|
|
80
|
+
if (!this.d)
|
|
81
|
+
return;
|
|
82
|
+
const i = t.tracks, e = [...this.m.textTracks].filter((h) => "manualMode" in h), d = this.aa(t);
|
|
83
|
+
for (let h = 0; h < e.length; h++) {
|
|
84
|
+
const a = i[h], u = e[h], r = `dash-${a.kind}-${h}`, p = new C({
|
|
85
|
+
id: r,
|
|
86
|
+
label: (a == null ? void 0 : a.label) ?? ((o = a.labels.find((s) => s.text)) == null ? void 0 : o.text) ?? ((a == null ? void 0 : a.lang) && S(a.lang)) ?? (a == null ? void 0 : a.lang) ?? void 0,
|
|
87
|
+
language: a.lang ?? void 0,
|
|
88
|
+
kind: a.kind,
|
|
89
|
+
default: a.defaultTrack
|
|
90
|
+
});
|
|
91
|
+
p[y._] = {
|
|
92
|
+
managed: !0,
|
|
93
|
+
track: u
|
|
94
|
+
}, p[y.ma] = 2, p[y.hb] = () => {
|
|
95
|
+
this.d && (p.mode === "showing" ? (this.d.setTextTrack(h), this.Kb = p) : (this.d.setTextTrack(-1), this.Kb = null));
|
|
96
|
+
}, this.b.textTracks.add(p, d);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
pc(t) {
|
|
100
|
+
const { mediaType: i, newMediaInfo: e } = t;
|
|
101
|
+
if (i === "audio") {
|
|
102
|
+
const d = this.b.audioTracks.getById(`dash-audio-${e.index}`);
|
|
103
|
+
if (d) {
|
|
104
|
+
const o = this.aa(t);
|
|
105
|
+
this.b.audioTracks[l.ea](d, !0, o);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
Za(t) {
|
|
110
|
+
if (t.mediaType !== "video")
|
|
111
|
+
return;
|
|
112
|
+
const i = this.b.qualities[t.newQuality];
|
|
113
|
+
if (i) {
|
|
114
|
+
const e = this.aa(t);
|
|
115
|
+
this.b.qualities[l.ea](i, !0, e);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
Li(t) {
|
|
119
|
+
if (this.b.$state.canPlay() || !this.d)
|
|
120
|
+
return;
|
|
121
|
+
const { type: i, mediaPresentationDuration: e } = t.data, d = this.aa(t);
|
|
122
|
+
this.b.delegate.c(
|
|
123
|
+
"stream-type-change",
|
|
124
|
+
i !== "static" ? "live" : "on-demand",
|
|
125
|
+
d
|
|
126
|
+
), this.b.delegate.c("duration-change", e, d), this.b.qualities[L.Wa](!0, d);
|
|
127
|
+
const o = this.d.getVideoElement(), h = this.d.getTracksForTypeFromManifest(
|
|
128
|
+
"video",
|
|
129
|
+
t.data
|
|
130
|
+
), a = [...new Set(h.map((s) => s.mimeType))].find(
|
|
131
|
+
(s) => s && F(o, s)
|
|
132
|
+
), u = h.filter(
|
|
133
|
+
(s) => a === s.mimeType
|
|
134
|
+
)[0];
|
|
135
|
+
let r = this.d.getTracksForTypeFromManifest(
|
|
136
|
+
"audio",
|
|
137
|
+
t.data
|
|
138
|
+
);
|
|
139
|
+
const p = [...new Set(r.map((s) => s.mimeType))].find(
|
|
140
|
+
(s) => s && j(o, s)
|
|
141
|
+
);
|
|
142
|
+
if (r = r.filter((s) => p === s.mimeType), u.bitrateList.forEach((s, f) => {
|
|
143
|
+
var c;
|
|
144
|
+
const T = {
|
|
145
|
+
id: ((c = s.id) == null ? void 0 : c.toString()) ?? `dash-bitrate-${f}`,
|
|
146
|
+
width: s.width ?? 0,
|
|
147
|
+
height: s.height ?? 0,
|
|
148
|
+
bitrate: s.bandwidth ?? 0,
|
|
149
|
+
codec: u.codec,
|
|
150
|
+
index: f
|
|
151
|
+
};
|
|
152
|
+
this.b.qualities[l.da](T, d);
|
|
153
|
+
}), I(u.index)) {
|
|
154
|
+
const s = this.b.qualities[u.index];
|
|
155
|
+
s && this.b.qualities[l.ea](s, !0, d);
|
|
156
|
+
}
|
|
157
|
+
r.forEach((s, f) => {
|
|
158
|
+
const c = s.labels.find((w) => navigator.languages.some((q) => w.lang && q.toLowerCase().startsWith(w.lang.toLowerCase()))) || s.labels[0], M = {
|
|
159
|
+
id: `dash-audio-${s == null ? void 0 : s.index}`,
|
|
160
|
+
label: (c == null ? void 0 : c.text) ?? (s.lang && S(s.lang)) ?? s.lang ?? "",
|
|
161
|
+
language: s.lang ?? "",
|
|
162
|
+
kind: "main",
|
|
163
|
+
mimeType: s.mimeType,
|
|
164
|
+
codec: s.codec,
|
|
165
|
+
index: f
|
|
166
|
+
};
|
|
167
|
+
this.b.audioTracks[l.da](M, d);
|
|
168
|
+
}), o.dispatchEvent(new g("canplay", { trigger: d }));
|
|
169
|
+
}
|
|
170
|
+
Q(t) {
|
|
171
|
+
const { type: i, error: e } = t;
|
|
172
|
+
switch (e.code) {
|
|
173
|
+
case 27:
|
|
174
|
+
this.pe(e);
|
|
175
|
+
break;
|
|
176
|
+
default:
|
|
177
|
+
this.qc(e);
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
Ji() {
|
|
182
|
+
this.na >= 0 && this._a();
|
|
183
|
+
}
|
|
184
|
+
Ki(t) {
|
|
185
|
+
t.mediaType === "text" && requestAnimationFrame(this.Ni.bind(this, t));
|
|
186
|
+
}
|
|
187
|
+
pe(t) {
|
|
188
|
+
var i;
|
|
189
|
+
this._a(), (i = this.d) == null || i.play(), this.na = window.setTimeout(() => {
|
|
190
|
+
this.na = -1, this.qc(t);
|
|
191
|
+
}, 5e3);
|
|
192
|
+
}
|
|
193
|
+
_a() {
|
|
194
|
+
clearTimeout(this.na), this.na = -1;
|
|
195
|
+
}
|
|
196
|
+
qc(t) {
|
|
197
|
+
this.b.delegate.c("error", {
|
|
198
|
+
message: t.message ?? "",
|
|
199
|
+
code: 1,
|
|
200
|
+
error: t
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
je() {
|
|
204
|
+
var i;
|
|
205
|
+
this.lg("video", !0);
|
|
206
|
+
const { qualities: t } = this.b;
|
|
207
|
+
(i = this.d) == null || i.setQualityFor("video", t.selectedIndex, !0);
|
|
208
|
+
}
|
|
209
|
+
lg(t, i) {
|
|
210
|
+
var e;
|
|
211
|
+
(e = this.d) == null || e.updateSettings({
|
|
212
|
+
streaming: { abr: { autoSwitchBitrate: { [t]: i } } }
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
ke() {
|
|
216
|
+
const { qualities: t } = this.b;
|
|
217
|
+
!this.d || t.auto || !t.selected || (this.lg("video", !1), this.d.setQualityFor("video", t.selectedIndex, t.switch === "current"), K && (this.m.currentTime = this.m.currentTime));
|
|
218
|
+
}
|
|
219
|
+
le() {
|
|
220
|
+
if (!this.d)
|
|
221
|
+
return;
|
|
222
|
+
const { audioTracks: t } = this.b, i = this.d.getTracksFor("audio").find(
|
|
223
|
+
(e) => t.selected && t.selected.id === `dash-audio-${e.index}`
|
|
224
|
+
);
|
|
225
|
+
i && this.d.setCurrentTrack(i);
|
|
226
|
+
}
|
|
227
|
+
z() {
|
|
228
|
+
this._a(), this.Kb = null, this.oe = {};
|
|
229
|
+
}
|
|
230
|
+
loadSource(t) {
|
|
231
|
+
var i;
|
|
232
|
+
this.z(), m(t.src) && ((i = this.d) == null || i.attachSource(t.src));
|
|
233
|
+
}
|
|
234
|
+
destroy() {
|
|
235
|
+
var t, i;
|
|
236
|
+
this.z(), (t = this.d) == null || t.destroy(), this.d = null, (i = this.qb) == null || i.call(this), this.qb = null;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
class J {
|
|
240
|
+
constructor(t, i, e) {
|
|
241
|
+
this.L = t, this.b = i, this.La = e, this.qe();
|
|
242
|
+
}
|
|
243
|
+
async qe() {
|
|
244
|
+
const t = {
|
|
245
|
+
onLoadStart: this.Ma.bind(this),
|
|
246
|
+
onLoaded: this.tb.bind(this),
|
|
247
|
+
onLoadError: this.re.bind(this)
|
|
248
|
+
};
|
|
249
|
+
let i = await U(this.L, t);
|
|
250
|
+
if (A(i) && !m(this.L) && (i = await B(this.L, t)), !i)
|
|
251
|
+
return null;
|
|
252
|
+
if (!window.dashjs.supportsMediaSource()) {
|
|
253
|
+
const e = "[vidstack] `dash.js` is not supported in this environment";
|
|
254
|
+
return this.b.player.dispatch(new g("dash-unsupported")), this.b.delegate.c("error", { message: e, code: 4 }), null;
|
|
255
|
+
}
|
|
256
|
+
return i;
|
|
257
|
+
}
|
|
258
|
+
Ma() {
|
|
259
|
+
this.b.player.dispatch(new g("dash-lib-load-start"));
|
|
260
|
+
}
|
|
261
|
+
tb(t) {
|
|
262
|
+
this.b.player.dispatch(
|
|
263
|
+
new g("dash-lib-loaded", {
|
|
264
|
+
detail: t
|
|
265
|
+
})
|
|
266
|
+
), this.La(t);
|
|
267
|
+
}
|
|
268
|
+
re(t) {
|
|
269
|
+
const i = P(t);
|
|
270
|
+
this.b.player.dispatch(
|
|
271
|
+
new g("dash-lib-load-error", {
|
|
272
|
+
detail: i
|
|
273
|
+
})
|
|
274
|
+
), this.b.delegate.c("error", {
|
|
275
|
+
message: i.message,
|
|
276
|
+
code: 4,
|
|
277
|
+
error: i
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
async function B(n, t = {}) {
|
|
282
|
+
var i, e, d, o, h, a, u;
|
|
283
|
+
if (!A(n)) {
|
|
284
|
+
if ((i = t.onLoadStart) == null || i.call(t), W(n))
|
|
285
|
+
return (e = t.onLoaded) == null || e.call(t, n), n;
|
|
286
|
+
if (v(n)) {
|
|
287
|
+
const r = n.MediaPlayer;
|
|
288
|
+
return (d = t.onLoaded) == null || d.call(t, r), r;
|
|
289
|
+
}
|
|
290
|
+
try {
|
|
291
|
+
const r = (o = await n()) == null ? void 0 : o.default;
|
|
292
|
+
if (v(r))
|
|
293
|
+
return (h = t.onLoaded) == null || h.call(t, r.MediaPlayer), r.MediaPlayer;
|
|
294
|
+
if (r)
|
|
295
|
+
(a = t.onLoaded) == null || a.call(t, r);
|
|
296
|
+
else
|
|
297
|
+
throw Error(
|
|
298
|
+
""
|
|
299
|
+
);
|
|
300
|
+
return r;
|
|
301
|
+
} catch (r) {
|
|
302
|
+
(u = t.onLoadError) == null || u.call(t, r);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
async function U(n, t = {}) {
|
|
307
|
+
var i, e, d;
|
|
308
|
+
if (m(n)) {
|
|
309
|
+
(i = t.onLoadStart) == null || i.call(t);
|
|
310
|
+
try {
|
|
311
|
+
if (await O(n), !Q(window.dashjs.MediaPlayer))
|
|
312
|
+
throw Error(
|
|
313
|
+
""
|
|
314
|
+
);
|
|
315
|
+
const o = window.dashjs.MediaPlayer;
|
|
316
|
+
return (e = t.onLoaded) == null || e.call(t, o), o;
|
|
317
|
+
} catch (o) {
|
|
318
|
+
(d = t.onLoadError) == null || d.call(t, o);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function W(n) {
|
|
323
|
+
return n && n.prototype && n.prototype !== Function;
|
|
324
|
+
}
|
|
325
|
+
function v(n) {
|
|
326
|
+
return n && "MediaPlayer" in n;
|
|
327
|
+
}
|
|
328
|
+
const X = "https://cdn.jsdelivr.net", b = class b extends H {
|
|
329
|
+
constructor() {
|
|
330
|
+
super(...arguments), this.$$PROVIDER_TYPE = "DASH", this.rc = null, this.e = new z(this.video, this.b), this.oa = `${X}/npm/dashjs@4.7.4/dist/dash.all.min.js`;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* The `dash.js` constructor.
|
|
334
|
+
*/
|
|
335
|
+
get ctor() {
|
|
336
|
+
return this.rc;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* The current `dash.js` instance.
|
|
340
|
+
*/
|
|
341
|
+
get instance() {
|
|
342
|
+
return this.e.instance;
|
|
343
|
+
}
|
|
344
|
+
get type() {
|
|
345
|
+
return "dash";
|
|
346
|
+
}
|
|
347
|
+
get canLiveSync() {
|
|
348
|
+
return !0;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* The `dash.js` configuration object.
|
|
352
|
+
*
|
|
353
|
+
* @see {@link https://cdn.dashjs.org/latest/jsdoc/module-Settings.html}
|
|
354
|
+
*/
|
|
355
|
+
get config() {
|
|
356
|
+
return this.e.rb;
|
|
357
|
+
}
|
|
358
|
+
set config(t) {
|
|
359
|
+
this.e.rb = t;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* The `dash.js` constructor (supports dynamic imports) or a URL of where it can be found.
|
|
363
|
+
*
|
|
364
|
+
* @defaultValue `https://cdn.jsdelivr.net/npm/dashjs@4.7.4/dist/dash.all.min.js`
|
|
365
|
+
*/
|
|
366
|
+
get library() {
|
|
367
|
+
return this.oa;
|
|
368
|
+
}
|
|
369
|
+
set library(t) {
|
|
370
|
+
this.oa = t;
|
|
371
|
+
}
|
|
372
|
+
preconnect() {
|
|
373
|
+
m(this.oa) && _(this.oa);
|
|
374
|
+
}
|
|
375
|
+
setup() {
|
|
376
|
+
super.setup(), new J(this.oa, this.b, (t) => {
|
|
377
|
+
this.rc = t, this.e.setup(t), this.b.delegate.c("provider-setup", this);
|
|
378
|
+
const i = R(this.b.$state.source);
|
|
379
|
+
i && this.loadSource(i);
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
async loadSource(t, i) {
|
|
383
|
+
if (!m(t.src)) {
|
|
384
|
+
this.oc();
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
this.a.preload = i || "", this.ge(t, "application/x-mpegurl"), this.e.loadSource(t), this.K = t;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* The given callback is invoked when a new `dash.js` instance is created and right before it's
|
|
391
|
+
* attached to media.
|
|
392
|
+
*/
|
|
393
|
+
onInstance(t) {
|
|
394
|
+
const i = this.e.instance;
|
|
395
|
+
return i && t(i), this.e.sb.add(t), () => this.e.sb.delete(t);
|
|
396
|
+
}
|
|
397
|
+
destroy() {
|
|
398
|
+
this.e.destroy();
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
b.supported = N();
|
|
402
|
+
let D = b;
|
|
403
|
+
export {
|
|
404
|
+
D as DASHProvider
|
|
405
|
+
};
|