@webitel/ui-sdk 26.2.126 → 26.2.128
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/{index-Cz4qFQN1.js → index-CXvjDkKI.js} +1 -1
- package/dist/{index-qLMzWnx2.js → index-D_Qk79wA.js} +1 -1
- package/dist/{install-In0YqDcO.js → install-D2x01HjN.js} +36 -34
- package/dist/{isObject-DN6MD8kE.js → isObject-B_62MKM-.js} +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +227 -227
- package/dist/useVidstackSrc-kG_Nr2qn.js +1341 -0
- package/dist/{vidstack-Bq6c3Bam-CJx1I67B.js → vidstack-Bq6c3Bam-CEBxCfps.js} +21 -20
- package/dist/{vidstack-D2pY00kU-BzDVmOQf.js → vidstack-D2pY00kU-BxrPbe2u.js} +12 -11
- package/dist/{vidstack-DDXt6fpN-CccMyx3k.js → vidstack-DDXt6fpN-DzBWYiQF.js} +10 -9
- package/dist/{vidstack-D_-9AA6_-Ch_AQKf8.js → vidstack-D_-9AA6_-DLNEPUxw.js} +6 -5
- package/dist/{vidstack-DqAw8m9J-DN0Rx2Cp.js → vidstack-DqAw8m9J-B46XoRCX.js} +1 -1
- package/dist/{vidstack-audio-CyicYFtE.js → vidstack-audio-9Gl9Kz3Q.js} +2 -2
- package/dist/{vidstack-dash-BbVUAfel.js → vidstack-dash-BJcvwitX.js} +25 -24
- package/dist/{vidstack-google-cast-BxNHua_2.js → vidstack-google-cast-DbIV0bLP.js} +12 -11
- package/dist/{vidstack-hls-ok-wSuoG.js → vidstack-hls-Cp3vRKbQ.js} +24 -23
- package/dist/{vidstack-video-CaJH1npJ.js → vidstack-video-BN4jnBO5.js} +16 -15
- package/dist/{vidstack-vimeo-OTNo1lZl.js → vidstack-vimeo-GuUsRXwC.js} +37 -36
- package/dist/{vidstack-youtube-TJnLoStb.js → vidstack-youtube-1pqyuhRb.js} +15 -14
- package/dist/{wt-action-bar-DVYTKUBk.js → wt-action-bar-Bt5oEM-s.js} +1 -1
- package/dist/{wt-button-select-CDYL61lk.js → wt-button-select-DxZ-lotU.js} +1 -1
- package/dist/{wt-chat-emoji-CzXGoTsc.js → wt-chat-emoji-C4Lb8Jo6.js} +2 -2
- package/dist/{wt-confirm-dialog-Cw3PoxjN.js → wt-confirm-dialog-ConompWc.js} +1 -1
- package/dist/{wt-context-menu-DIkv1NaC.js → wt-context-menu-B9ZvW9e1.js} +1 -1
- package/dist/{wt-copy-action-C_Lp0i_H.js → wt-copy-action-0v-LftyT.js} +1 -1
- package/dist/{wt-datepicker-DnMpx5eZ.js → wt-datepicker-CeIroYrI.js} +1 -1
- package/dist/{wt-display-chip-items-ZeT2D9at.js → wt-display-chip-items-D_kg-fE8.js} +1 -1
- package/dist/{wt-dual-panel-6RTh5YbZ.js → wt-dual-panel-CtiwuDFH.js} +1 -1
- package/dist/{wt-dummy-Cj90QXzn.js → wt-dummy-WnU-zg5j.js} +1 -1
- package/dist/{wt-error-page-xX2SEe3s.js → wt-error-page-Dta61qqW.js} +1 -1
- package/dist/{wt-expansion-card-BjdYf5Dp.js → wt-expansion-card-ihwizrC2.js} +1 -1
- package/dist/{wt-expansion-panel-DK0SYvoG.js → wt-expansion-panel-FzsaK9db.js} +1 -1
- package/dist/{wt-filters-panel-wrapper-OApRf81V.js → wt-filters-panel-wrapper-C4i6yZCu.js} +1 -1
- package/dist/{wt-galleria-rRQcZ_0y.js → wt-galleria-W-Ko2W5f.js} +1 -1
- package/dist/{wt-navigation-menu-C-nB-8Le.js → wt-navigation-menu-CjdTb023.js} +1 -1
- package/dist/{wt-notifications-bar-D1i5rV8A.js → wt-notifications-bar-61cfd_4M.js} +2 -2
- package/dist/{wt-pagination-C59kdDDN.js → wt-pagination-DYCgISdf.js} +1 -1
- package/dist/wt-player-C_GxeSTp.js +128 -0
- package/dist/{wt-search-bar-C4-Vl9Pa.js → wt-search-bar-N1WKurUn.js} +1 -1
- package/dist/{wt-selection-popup-BxDERIHb.js → wt-selection-popup-DHDGq-OE.js} +1 -1
- package/dist/{wt-start-page-BPlJho8Y.js → wt-start-page-AZ2djVkC.js} +1 -1
- package/dist/{wt-status-select-CNH5kFvr.js → wt-status-select-h5BbstEb.js} +1 -1
- package/dist/{wt-stepper-1_iQtsZC.js → wt-stepper-DYiLXWjt.js} +1 -1
- package/dist/{wt-table-D76yjtwy.js → wt-table--ZazZiRW.js} +1 -1
- package/dist/{wt-table-actions-DodTkdCV.js → wt-table-actions-BC80p7rV.js} +1 -1
- package/dist/{wt-table-column-select-VKKAj8Ox.js → wt-table-column-select-BMsgv2UC.js} +2 -2
- package/dist/{wt-tabs-DyO6wmnS.js → wt-tabs-kYAi4ukZ.js} +1 -1
- package/dist/{wt-tags-input-BucUo4Ow.js → wt-tags-input-t4laYn8E.js} +2 -2
- package/dist/{wt-timepicker-t2uY6aU1.js → wt-timepicker-D5kzTYvN.js} +1 -1
- package/dist/{wt-tree-BZI_RN8N.js → wt-tree-DW-8PDtG.js} +2 -2
- package/dist/{wt-tree-table-CvtJrEN6.js → wt-tree-table-BdwRzKC4.js} +1 -1
- package/dist/{wt-type-extension-value-input-BjPJ1FmI.js → wt-type-extension-value-input-DXHHUs4o.js} +2 -2
- package/dist/{wt-vidstack-player-BB6Gwvf5.js → wt-vidstack-player-B24VLEaw.js} +2800 -4044
- package/package.json +1 -1
- package/src/components/wt-player/wt-player.vue +7 -24
- package/src/components/wt-vidstack-player/composables/useVidstackSrc.ts +111 -0
- package/src/components/wt-vidstack-player/wt-vidstack-player.vue +10 -40
- package/src/enums/FormatDateMode/FormatDateMode.ts +1 -0
- package/src/utils/formatDate.ts +1 -0
- package/types/components/wt-vidstack-player/composables/useVidstackSrc.d.ts +27 -0
- package/types/components/wt-vidstack-player/wt-vidstack-player.vue.d.ts +2 -4
- package/types/enums/FormatDateMode/FormatDateMode.d.ts +1 -0
- package/dist/time-group-CkVy2t63.js +0 -25
- package/dist/wt-player-CrLSS40S.js +0 -138
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { R as
|
|
1
|
+
import { ab as k, o as v, k as r, ak as S, d as w, n as f, m as b, al as o, U as P, G as C, x as E, am as A, l as m, D as x, v as l } from "./useVidstackSrc-kG_Nr2qn.js";
|
|
2
|
+
import { R as L } from "./vidstack-DqAw8m9J-B46XoRCX.js";
|
|
3
|
+
import { g as y, L as u } from "./wt-vidstack-player-B24VLEaw.js";
|
|
3
4
|
let h = null, d = [], c = [];
|
|
4
5
|
function p() {
|
|
5
6
|
return h ??= new AudioContext();
|
|
6
7
|
}
|
|
7
|
-
function
|
|
8
|
+
function G() {
|
|
8
9
|
const s = p(), t = s.createGain();
|
|
9
10
|
return t.connect(s.destination), d.push(t), t;
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
+
function $(s, t) {
|
|
12
13
|
const i = p(), e = i.createMediaElementSource(s);
|
|
13
14
|
return t && e.connect(t), c.push(e), e;
|
|
14
15
|
}
|
|
@@ -46,7 +47,7 @@ class R {
|
|
|
46
47
|
this.removeGain();
|
|
47
48
|
return;
|
|
48
49
|
}
|
|
49
|
-
this.#e || (this.#e =
|
|
50
|
+
this.#e || (this.#e = G(), this.#a && this.#a.connect(this.#e)), this.#a || (this.#a = $(this.#s, this.#e)), this.#e.gain.value = t, this.#t(t);
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
removeGain() {
|
|
@@ -129,7 +130,7 @@ class I {
|
|
|
129
130
|
#e = !1;
|
|
130
131
|
#a = !1;
|
|
131
132
|
#h = !1;
|
|
132
|
-
#r = new
|
|
133
|
+
#r = new L(this.#y.bind(this));
|
|
133
134
|
#o = new O();
|
|
134
135
|
#c;
|
|
135
136
|
get #i() {
|
|
@@ -156,10 +157,10 @@ class I {
|
|
|
156
157
|
this.#n("loadstart", this.#k), this.#n("abort", this.#m), this.#n("emptied", this.#S), this.#n("error", this.#j), this.#n("volumechange", this.#O);
|
|
157
158
|
}
|
|
158
159
|
#v() {
|
|
159
|
-
this.#a || (this.#n("loadeddata", this.#w), this.#n("loadedmetadata", this.#P), this.#n("canplay", this.#A), this.#n("canplaythrough", this.#
|
|
160
|
+
this.#a || (this.#n("loadeddata", this.#w), this.#n("loadedmetadata", this.#P), this.#n("canplay", this.#A), this.#n("canplaythrough", this.#x), this.#n("durationchange", this.#D), this.#n("play", this.#C), this.#n("progress", this.#U), this.#n("stalled", this.#G), this.#n("suspend", this.#F), this.#n("ratechange", this.#V), this.#a = !0);
|
|
160
161
|
}
|
|
161
162
|
#b() {
|
|
162
|
-
this.#h || (this.#n("pause", this.#E), this.#n("playing", this.#
|
|
163
|
+
this.#h || (this.#n("pause", this.#E), this.#n("playing", this.#L), this.#n("seeked", this.#I), this.#n("seeking", this.#H), this.#n("ended", this.#N), this.#n("waiting", this.#$), this.#h = !0);
|
|
163
164
|
}
|
|
164
165
|
#T = void 0;
|
|
165
166
|
#q = void 0;
|
|
@@ -208,16 +209,16 @@ class I {
|
|
|
208
209
|
#A(t) {
|
|
209
210
|
this.#t.delegate.ready(this.#f(), t);
|
|
210
211
|
}
|
|
211
|
-
#
|
|
212
|
+
#x(t) {
|
|
212
213
|
this.#t.$state.started() || this.#t.notify("can-play-through", this.#f(), t);
|
|
213
214
|
}
|
|
214
|
-
#
|
|
215
|
+
#L(t) {
|
|
215
216
|
this.#i.paused || (this.#e = !1, this.#t.notify("playing", void 0, t), this.#r.start());
|
|
216
217
|
}
|
|
217
|
-
|
|
218
|
+
#G(t) {
|
|
218
219
|
this.#t.notify("stalled", void 0, t), this.#i.readyState < 3 && (this.#e = !0, this.#t.notify("waiting", void 0, t));
|
|
219
220
|
}
|
|
220
|
-
|
|
221
|
+
#$(t) {
|
|
221
222
|
this.#i.readyState < 3 && (this.#e = !0, this.#t.notify("waiting", void 0, t));
|
|
222
223
|
}
|
|
223
224
|
#N(t) {
|
|
@@ -242,7 +243,7 @@ class I {
|
|
|
242
243
|
}
|
|
243
244
|
#I(t) {
|
|
244
245
|
this.#l = this.#i.currentTime, this.#d(this.#i.currentTime, t), this.#t.notify("seeked", this.#i.currentTime, t), Math.trunc(this.#i.currentTime) === Math.trunc(this.#i.duration) && y(this.#i.duration) > y(this.#i.currentTime) && (this.#d(this.#i.duration, t), this.#i.ended || this.#t.player.dispatch(
|
|
245
|
-
new
|
|
246
|
+
new x("media-play-request", {
|
|
246
247
|
trigger: t
|
|
247
248
|
})
|
|
248
249
|
));
|
|
@@ -250,14 +251,14 @@ class I {
|
|
|
250
251
|
#H(t) {
|
|
251
252
|
this.#t.notify("seeking", this.#i.currentTime, t);
|
|
252
253
|
}
|
|
253
|
-
#
|
|
254
|
+
#U(t) {
|
|
254
255
|
const i = {
|
|
255
256
|
buffered: this.#i.buffered,
|
|
256
257
|
seekable: this.#i.seekable
|
|
257
258
|
};
|
|
258
259
|
this.#t.notify("progress", i, t);
|
|
259
260
|
}
|
|
260
|
-
#
|
|
261
|
+
#F(t) {
|
|
261
262
|
this.#t.notify("suspend", void 0, t);
|
|
262
263
|
}
|
|
263
264
|
#V(t) {
|
|
@@ -318,7 +319,7 @@ class H {
|
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
321
|
}
|
|
321
|
-
class
|
|
322
|
+
class q {
|
|
322
323
|
constructor(t, i) {
|
|
323
324
|
this.media = t, this.ctx = i, this.audioGain = new R(t, (e) => {
|
|
324
325
|
this.ctx.notify("audio-gain-change", e);
|
|
@@ -376,7 +377,7 @@ class j {
|
|
|
376
377
|
return a > 0 && n > 0 ? `${t}#t=${a},${n}` : a > 0 ? `${t}#t=${a}` : n > 0 ? `${t}#t=0,${n}` : t;
|
|
377
378
|
}
|
|
378
379
|
}
|
|
379
|
-
class
|
|
380
|
+
class U {
|
|
380
381
|
#s;
|
|
381
382
|
#t;
|
|
382
383
|
#e;
|
|
@@ -413,13 +414,13 @@ class F {
|
|
|
413
414
|
this.#t.notify("remote-playback-change", e, t), this.#e = i;
|
|
414
415
|
}
|
|
415
416
|
}
|
|
416
|
-
class
|
|
417
|
+
class B extends U {
|
|
417
418
|
type = "airplay";
|
|
418
419
|
get canPrompt() {
|
|
419
420
|
return "WebKitPlaybackTargetAvailabilityEvent" in window;
|
|
420
421
|
}
|
|
421
422
|
}
|
|
422
423
|
export {
|
|
423
|
-
|
|
424
|
-
|
|
424
|
+
q as H,
|
|
425
|
+
B as a
|
|
425
426
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { l as d,
|
|
2
|
-
|
|
1
|
+
import { l as d, R as g, W as p, U as u, x as m } from "./useVidstackSrc-kG_Nr2qn.js";
|
|
2
|
+
import { l as C } from "./wt-vidstack-player-B24VLEaw.js";
|
|
3
|
+
function h() {
|
|
3
4
|
return "https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";
|
|
4
5
|
}
|
|
5
6
|
function f() {
|
|
@@ -20,7 +21,7 @@ function l() {
|
|
|
20
21
|
function y() {
|
|
21
22
|
return l()?.getSessionObj().media[0];
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function _(r) {
|
|
24
25
|
return y()?.media.contentId === r?.src;
|
|
25
26
|
}
|
|
26
27
|
function v() {
|
|
@@ -35,7 +36,7 @@ function v() {
|
|
|
35
36
|
function E(r) {
|
|
36
37
|
return `Google Cast Error Code: ${r}`;
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
+
function P(r, e) {
|
|
39
40
|
return d(s(), r, e);
|
|
40
41
|
}
|
|
41
42
|
class S {
|
|
@@ -59,7 +60,7 @@ class S {
|
|
|
59
60
|
try {
|
|
60
61
|
t = await this.#r(e), this.#e || (this.#e = new cast.framework.RemotePlayer(), new cast.framework.RemotePlayerController(this.#e)), a = e.player.createEvent("google-cast-prompt-open", {
|
|
61
62
|
trigger: t
|
|
62
|
-
}), e.player.dispatchEvent(a), this.#t(e, "connecting", a), await this.#o(
|
|
63
|
+
}), e.player.dispatchEvent(a), this.#t(e, "connecting", a), await this.#o(m(e.$props.googleCast)), e.$state.remotePlaybackInfo.set({
|
|
63
64
|
deviceName: l()?.getCastDevice().friendlyName
|
|
64
65
|
}), c() && this.#t(e, "connected", a);
|
|
65
66
|
} catch (n) {
|
|
@@ -85,12 +86,12 @@ class S {
|
|
|
85
86
|
async load(e) {
|
|
86
87
|
if (!this.#e)
|
|
87
88
|
throw Error("[vidstack] google cast player was not initialized");
|
|
88
|
-
return new (await import("./vidstack-google-cast-
|
|
89
|
+
return new (await import("./vidstack-google-cast-DbIV0bLP.js")).GoogleCastProvider(this.#e, e);
|
|
89
90
|
}
|
|
90
91
|
async #r(e) {
|
|
91
92
|
if (f()) return;
|
|
92
93
|
const t = e.player.createEvent("google-cast-load-start");
|
|
93
|
-
e.player.dispatch(t), await h(
|
|
94
|
+
e.player.dispatch(t), await C(h()), await customElements.whenDefined("google-cast-launcher");
|
|
94
95
|
const a = e.player.createEvent("google-cast-loaded", { trigger: t });
|
|
95
96
|
if (e.player.dispatch(a), !w())
|
|
96
97
|
throw this.#a("CAST_NOT_AVAILABLE", "Google Cast not available on this platform.");
|
|
@@ -120,7 +121,7 @@ class S {
|
|
|
120
121
|
return a.code = e, a;
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
const
|
|
124
|
+
const b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
124
125
|
__proto__: null,
|
|
125
126
|
GoogleCastLoader: S
|
|
126
127
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -129,7 +130,7 @@ export {
|
|
|
129
130
|
y as b,
|
|
130
131
|
E as c,
|
|
131
132
|
s as g,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
_ as h,
|
|
134
|
+
P as l,
|
|
135
|
+
b as v
|
|
135
136
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { v as e, l as i, m as a, x as o, d as n } from "./useVidstackSrc-kG_Nr2qn.js";
|
|
2
|
+
import { f as c } from "./wt-vidstack-player-B24VLEaw.js";
|
|
3
|
+
class g {
|
|
3
4
|
#t;
|
|
4
5
|
src = e("");
|
|
5
6
|
/**
|
|
@@ -18,7 +19,7 @@ class d {
|
|
|
18
19
|
), this.referrerPolicy !== null && t.setAttribute("referrerpolicy", this.referrerPolicy);
|
|
19
20
|
}
|
|
20
21
|
setup() {
|
|
21
|
-
|
|
22
|
+
i(window, "message", this.#r.bind(this)), i(this.#t, "load", this.onLoad.bind(this)), a(this.#s.bind(this));
|
|
22
23
|
}
|
|
23
24
|
#s() {
|
|
24
25
|
const t = this.src();
|
|
@@ -27,17 +28,17 @@ class d {
|
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
30
|
const s = o(() => this.buildParams());
|
|
30
|
-
this.#t.setAttribute("src",
|
|
31
|
+
this.#t.setAttribute("src", c(t, s));
|
|
31
32
|
}
|
|
32
33
|
postMessage(t, s) {
|
|
33
34
|
this.#t.contentWindow?.postMessage(JSON.stringify(t), s ?? "*");
|
|
34
35
|
}
|
|
35
|
-
#
|
|
36
|
+
#r(t) {
|
|
36
37
|
const s = this.getOrigin();
|
|
37
|
-
if ((t.source === null || t.source === this.#t?.contentWindow) && (!
|
|
38
|
+
if ((t.source === null || t.source === this.#t?.contentWindow) && (!n(s) || s === t.origin)) {
|
|
38
39
|
try {
|
|
39
|
-
const
|
|
40
|
-
|
|
40
|
+
const r = JSON.parse(t.data);
|
|
41
|
+
r && this.onMessage(r, t);
|
|
41
42
|
return;
|
|
42
43
|
} catch {
|
|
43
44
|
}
|
|
@@ -46,5 +47,5 @@ class d {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
g as E
|
|
50
51
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { aj as i, m } from "./useVidstackSrc-kG_Nr2qn.js";
|
|
2
|
+
import { c as d, a as l } from "./wt-vidstack-player-B24VLEaw.js";
|
|
3
|
+
const p = /* @__PURE__ */ l(
|
|
3
4
|
'<svg viewBox="0 0 32 32" fill="none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"></svg>'
|
|
4
5
|
);
|
|
5
|
-
function
|
|
6
|
+
function f(n, s) {
|
|
6
7
|
const o = d(p);
|
|
7
|
-
o.innerHTML =
|
|
8
|
+
o.innerHTML = i, n.append(o);
|
|
8
9
|
const e = document.createElement("span");
|
|
9
10
|
e.classList.add("vds-google-cast-info"), n.append(e);
|
|
10
11
|
const t = document.createElement("span");
|
|
@@ -16,5 +17,5 @@ function v(n, s) {
|
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
f as insertContent
|
|
20
21
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as t } from "./
|
|
2
|
-
import { H as r, a as s } from "./vidstack-Bq6c3Bam-
|
|
1
|
+
import { s as t } from "./useVidstackSrc-kG_Nr2qn.js";
|
|
2
|
+
import { H as r, a as s } from "./vidstack-Bq6c3Bam-CEBxCfps.js";
|
|
3
3
|
class d extends r {
|
|
4
4
|
$$PROVIDER_TYPE = "AUDIO";
|
|
5
5
|
get type() {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { p as x, Q as S, b as g, T as k, L as u, d as M, l as C } from "./wt-vidstack-player-B24VLEaw.js";
|
|
2
|
+
import { a0 as N, d as p, x as R, l as b, m as F, D as l, B as I, Z as P, $, h as _, R as q, b as E, j as H } from "./useVidstackSrc-kG_Nr2qn.js";
|
|
3
|
+
import { VideoProvider as j } from "./vidstack-video-BN4jnBO5.js";
|
|
4
|
+
import { R as O } from "./vidstack-DqAw8m9J-B46XoRCX.js";
|
|
5
|
+
function v(n) {
|
|
5
6
|
try {
|
|
6
7
|
return new Intl.DisplayNames(navigator.languages, { type: "language" }).of(n) ?? null;
|
|
7
8
|
} catch {
|
|
8
9
|
return null;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
|
-
const Q = (n) => `dash-${
|
|
12
|
+
const Q = (n) => `dash-${I(n)}`;
|
|
12
13
|
class G {
|
|
13
14
|
#e;
|
|
14
15
|
#i;
|
|
@@ -26,7 +27,7 @@ class G {
|
|
|
26
27
|
this.#t = t().create();
|
|
27
28
|
const i = this.#g.bind(this);
|
|
28
29
|
for (const s of Object.values(t.events)) this.#t.on(s, i);
|
|
29
|
-
this.#t.on(t.events.ERROR, this.#
|
|
30
|
+
this.#t.on(t.events.ERROR, this.#v.bind(this));
|
|
30
31
|
for (const s of this.#a) s(this.#t);
|
|
31
32
|
this.#i.player.dispatch("dash-instance", {
|
|
32
33
|
detail: this.#t
|
|
@@ -46,7 +47,7 @@ class G {
|
|
|
46
47
|
}), this.#t.on(t.events.FRAGMENT_LOADING_STARTED, this.#w.bind(this)), this.#t.on(
|
|
47
48
|
t.events.FRAGMENT_LOADING_COMPLETED,
|
|
48
49
|
this.#E.bind(this)
|
|
49
|
-
), this.#t.on(t.events.MANIFEST_LOADED, this.#
|
|
50
|
+
), this.#t.on(t.events.MANIFEST_LOADED, this.#b.bind(this)), this.#t.on(t.events.QUALITY_CHANGE_RENDERED, this.#S.bind(this)), this.#t.on(t.events.TEXT_TRACKS_ADDED, this.#m.bind(this)), this.#t.on(t.events.TRACK_CHANGE_RENDERED, this.#T.bind(this)), this.#i.qualities[S.enableAuto] = this.#A.bind(this), b(this.#i.qualities, "change", this.#D.bind(this)), b(this.#i.audioTracks, "change", this.#x.bind(this)), this.#r = F(this.#d.bind(this));
|
|
50
51
|
}
|
|
51
52
|
#s(t) {
|
|
52
53
|
return new l(Q(t.type), { detail: t });
|
|
@@ -80,9 +81,9 @@ class G {
|
|
|
80
81
|
if (!this.#t) return;
|
|
81
82
|
const i = t.tracks, s = [...this.#e.textTracks].filter((a) => "manualMode" in a), r = this.#s(t);
|
|
82
83
|
for (let a = 0; a < s.length; a++) {
|
|
83
|
-
const o = i[a], c = s[a], h = `dash-${o.kind}-${a}`, d = new
|
|
84
|
+
const o = i[a], c = s[a], h = `dash-${o.kind}-${a}`, d = new k({
|
|
84
85
|
id: h,
|
|
85
|
-
label: o?.label ?? o.labels.find((y) => y.text)?.text ?? (o?.lang &&
|
|
86
|
+
label: o?.label ?? o.labels.find((y) => y.text)?.text ?? (o?.lang && v(o.lang)) ?? o?.lang ?? void 0,
|
|
86
87
|
language: o.lang ?? void 0,
|
|
87
88
|
kind: o.kind,
|
|
88
89
|
default: o.defaultTrack
|
|
@@ -113,7 +114,7 @@ class G {
|
|
|
113
114
|
this.#i.qualities[u.select](i, !0, s);
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
|
-
#
|
|
117
|
+
#b(t) {
|
|
117
118
|
if (this.#i.$state.canPlay() || !this.#t) return;
|
|
118
119
|
const { type: i, mediaPresentationDuration: s } = t.data, r = this.#s(t);
|
|
119
120
|
this.#i.notify("stream-type-change", i !== "static" ? "live" : "on-demand", r), this.#i.notify("duration-change", s, r), this.#i.qualities[S.setAuto](!0, r);
|
|
@@ -121,7 +122,7 @@ class G {
|
|
|
121
122
|
"video",
|
|
122
123
|
t.data
|
|
123
124
|
), c = [...new Set(o.map((e) => e.mimeType))].find(
|
|
124
|
-
(e) => e &&
|
|
125
|
+
(e) => e && P(a, e)
|
|
125
126
|
), h = o.filter(
|
|
126
127
|
(e) => c === e.mimeType
|
|
127
128
|
)[0];
|
|
@@ -130,7 +131,7 @@ class G {
|
|
|
130
131
|
t.data
|
|
131
132
|
);
|
|
132
133
|
const y = [...new Set(d.map((e) => e.mimeType))].find(
|
|
133
|
-
(e) => e &&
|
|
134
|
+
(e) => e && $(a, e)
|
|
134
135
|
);
|
|
135
136
|
if (d = d.filter((e) => y === e.mimeType), h.bitrateList.forEach((e, f) => {
|
|
136
137
|
const m = {
|
|
@@ -142,14 +143,14 @@ class G {
|
|
|
142
143
|
index: f
|
|
143
144
|
};
|
|
144
145
|
this.#i.qualities[u.add](m, r);
|
|
145
|
-
}),
|
|
146
|
+
}), _(h.index)) {
|
|
146
147
|
const e = this.#i.qualities[h.index];
|
|
147
148
|
e && this.#i.qualities[u.select](e, !0, r);
|
|
148
149
|
}
|
|
149
150
|
d.forEach((e, f) => {
|
|
150
151
|
const L = e.labels.find((T) => navigator.languages.some((D) => T.lang && D.toLowerCase().startsWith(T.lang.toLowerCase()))) || e.labels[0], A = {
|
|
151
152
|
id: `dash-audio-${e?.index}`,
|
|
152
|
-
label: L?.text ?? (e.lang &&
|
|
153
|
+
label: L?.text ?? (e.lang && v(e.lang)) ?? e.lang ?? "",
|
|
153
154
|
language: e.lang ?? "",
|
|
154
155
|
kind: "main",
|
|
155
156
|
mimeType: e.mimeType,
|
|
@@ -159,7 +160,7 @@ class G {
|
|
|
159
160
|
this.#i.audioTracks[u.add](A, r);
|
|
160
161
|
}), a.dispatchEvent(new l("canplay", { trigger: r }));
|
|
161
162
|
}
|
|
162
|
-
#
|
|
163
|
+
#v(t) {
|
|
163
164
|
const { type: i, error: s } = t;
|
|
164
165
|
s.code === 27 ? this.#L(s) : this.#l(s);
|
|
165
166
|
}
|
|
@@ -251,7 +252,7 @@ class V {
|
|
|
251
252
|
), this.#t(t);
|
|
252
253
|
}
|
|
253
254
|
#d(t) {
|
|
254
|
-
const i =
|
|
255
|
+
const i = M(t);
|
|
255
256
|
this.#i.player.dispatch(
|
|
256
257
|
new l("dash-lib-load-error", {
|
|
257
258
|
detail: i
|
|
@@ -291,7 +292,7 @@ async function U(n, t = {}) {
|
|
|
291
292
|
if (p(n)) {
|
|
292
293
|
t.onLoadStart?.();
|
|
293
294
|
try {
|
|
294
|
-
if (await
|
|
295
|
+
if (await C(n), !H(window.dashjs.MediaPlayer))
|
|
295
296
|
throw Error(
|
|
296
297
|
""
|
|
297
298
|
);
|
|
@@ -308,8 +309,8 @@ function K(n) {
|
|
|
308
309
|
function w(n) {
|
|
309
310
|
return n && "MediaPlayer" in n;
|
|
310
311
|
}
|
|
311
|
-
const
|
|
312
|
-
class
|
|
312
|
+
const Y = "https://cdn.jsdelivr.net";
|
|
313
|
+
class Z extends j {
|
|
313
314
|
$$PROVIDER_TYPE = "DASH";
|
|
314
315
|
#e = null;
|
|
315
316
|
#i = new G(this.video, this.ctx);
|
|
@@ -328,14 +329,14 @@ class X extends j {
|
|
|
328
329
|
/**
|
|
329
330
|
* Whether `dash.js` is supported in this environment.
|
|
330
331
|
*/
|
|
331
|
-
static supported =
|
|
332
|
+
static supported = N();
|
|
332
333
|
get type() {
|
|
333
334
|
return "dash";
|
|
334
335
|
}
|
|
335
336
|
get canLiveSync() {
|
|
336
337
|
return !0;
|
|
337
338
|
}
|
|
338
|
-
#t = `${
|
|
339
|
+
#t = `${Y}/npm/dashjs@4.7.4/dist/dash.all.min.js`;
|
|
339
340
|
/**
|
|
340
341
|
* The `dash.js` configuration object.
|
|
341
342
|
*
|
|
@@ -359,12 +360,12 @@ class X extends j {
|
|
|
359
360
|
this.#t = t;
|
|
360
361
|
}
|
|
361
362
|
preconnect() {
|
|
362
|
-
p(this.#t) &&
|
|
363
|
+
p(this.#t) && x(this.#t);
|
|
363
364
|
}
|
|
364
365
|
setup() {
|
|
365
366
|
super.setup(), new V(this.#t, this.ctx, (t) => {
|
|
366
367
|
this.#e = t, this.#i.setup(t), this.ctx.notify("provider-setup", this);
|
|
367
|
-
const i =
|
|
368
|
+
const i = R(this.ctx.$state.source);
|
|
368
369
|
i && this.loadSource(i);
|
|
369
370
|
});
|
|
370
371
|
}
|
|
@@ -388,5 +389,5 @@ class X extends j {
|
|
|
388
389
|
}
|
|
389
390
|
}
|
|
390
391
|
export {
|
|
391
|
-
|
|
392
|
+
Z as DASHProvider
|
|
392
393
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ab as g, aq as l, o as k, D as u, x as h, l as m, m as y, O as p } from "./useVidstackSrc-kG_Nr2qn.js";
|
|
2
|
+
import { e as n, L as C } from "./wt-vidstack-player-B24VLEaw.js";
|
|
3
|
+
import { R as E } from "./vidstack-DqAw8m9J-B46XoRCX.js";
|
|
4
|
+
import { g as v, a as L, b as f, h as T, l as S, c as A } from "./vidstack-D2pY00kU-BxrPbe2u.js";
|
|
4
5
|
class I {
|
|
5
6
|
#t;
|
|
6
7
|
constructor(t) {
|
|
@@ -118,7 +119,7 @@ class b {
|
|
|
118
119
|
return e.name === t.label && e.language === t.language && e.subtype.toLowerCase() === t.kind.toLowerCase();
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
|
-
class
|
|
122
|
+
class N {
|
|
122
123
|
$$PROVIDER_TYPE = "GOOGLE_CAST";
|
|
123
124
|
scope = g();
|
|
124
125
|
#t;
|
|
@@ -194,7 +195,7 @@ class D {
|
|
|
194
195
|
[t.VOLUME_LEVEL_CHANGED]: this.#p,
|
|
195
196
|
[t.IS_PAUSED_CHANGED]: this.#N,
|
|
196
197
|
[t.LIVE_SEEKABLE_RANGE_CHANGED]: this.#C,
|
|
197
|
-
[t.PLAYER_STATE_CHANGED]: this.#
|
|
198
|
+
[t.PLAYER_STATE_CHANGED]: this.#x
|
|
198
199
|
};
|
|
199
200
|
this.#d = e;
|
|
200
201
|
const s = this.#R.bind(this);
|
|
@@ -237,7 +238,7 @@ class D {
|
|
|
237
238
|
return;
|
|
238
239
|
}
|
|
239
240
|
this.#e.notify("load-start");
|
|
240
|
-
const e = this.#
|
|
241
|
+
const e = this.#_(t), s = await this.session.loadMedia(e);
|
|
241
242
|
if (s) {
|
|
242
243
|
this.#a = null, this.#e.notify("error", Error(A(s)));
|
|
243
244
|
return;
|
|
@@ -338,7 +339,7 @@ class D {
|
|
|
338
339
|
}, s = t ? this.#n(t) : void 0;
|
|
339
340
|
this.#e.notify("progress", e, s);
|
|
340
341
|
}
|
|
341
|
-
#
|
|
342
|
+
#x(t) {
|
|
342
343
|
const e = this.#t.playerState, s = chrome.cast.media.PlayerState;
|
|
343
344
|
if (this.#u = e === s.IDLE, e === s.PAUSED) return;
|
|
344
345
|
const i = this.#n(t);
|
|
@@ -360,12 +361,12 @@ class D {
|
|
|
360
361
|
#n(t) {
|
|
361
362
|
return t instanceof Event ? t : new u(t.type, { detail: t });
|
|
362
363
|
}
|
|
363
|
-
#
|
|
364
|
+
#P(t) {
|
|
364
365
|
const { streamType: e, title: s, poster: i } = this.#e.$state;
|
|
365
366
|
return new I(t).setMetadata(s(), i()).setStreamType(e()).setTracks(this.#i.getLocalTextTracks()).build();
|
|
366
367
|
}
|
|
367
|
-
#
|
|
368
|
-
const e = this.#
|
|
368
|
+
#_(t) {
|
|
369
|
+
const e = this.#P(t), s = new chrome.cast.media.LoadRequest(e), i = this.#e.$state.savedState();
|
|
369
370
|
return s.autoplay = (this.#s?.paused ?? i?.paused) === !1, s.currentTime = this.#s?.time ?? i?.currentTime ?? 0, s;
|
|
370
371
|
}
|
|
371
372
|
async #v(t, e) {
|
|
@@ -378,5 +379,5 @@ class D {
|
|
|
378
379
|
}
|
|
379
380
|
}
|
|
380
381
|
export {
|
|
381
|
-
|
|
382
|
+
N as GoogleCastProvider
|
|
382
383
|
};
|