@webitel/ui-sdk 25.10.53 → 25.10.54
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/img/sprite/index.js +14 -1
- package/dist/img/sprite/record-start.svg +7 -0
- package/dist/img/sprite/record-stop.svg +7 -0
- package/dist/img/sprite/screenshot-done.svg +7 -0
- package/dist/img/sprite/screenshot-false.svg +7 -0
- package/dist/img/sprite/screenshot.svg +8 -0
- package/dist/img/sprite/sharing-end.svg +5 -0
- package/dist/{install-By5bv5Ga.js → install-Cvn-xDmg.js} +30433 -31074
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +1001 -989
- package/dist/vidstack-Bq6c3Bam-S5OrhBq2.js +413 -0
- package/dist/vidstack-D2pY00kU-HK4wj-R2.js +138 -0
- package/dist/vidstack-DDXt6fpN-D1Nzo26r.js +60 -0
- package/dist/vidstack-D_-9AA6_-DBOQembh.js +20 -0
- package/dist/vidstack-Dm1xEU9Q-qSXq3AI-.js +31 -0
- package/dist/vidstack-DqAw8m9J-k1JRevJl.js +29 -0
- package/dist/vidstack-audio-B1snbo-4.js +32 -0
- package/dist/vidstack-dash-BeCOt7Pp.js +403 -0
- package/dist/vidstack-google-cast-iUp-BySZ.js +377 -0
- package/dist/vidstack-hls-DVZy4g9e.js +324 -0
- package/dist/vidstack-krOAtKMi-B4IZWKdc.js +29 -0
- package/dist/vidstack-video-ykJKnrB2.js +181 -0
- package/dist/vidstack-vimeo-Bk8cduzE.js +437 -0
- package/dist/vidstack-youtube-FNzWU8v0.js +236 -0
- package/package.json +3 -3
- package/src/assets/icons/sprite/index.js +14 -1
- package/src/assets/icons/sprite/record-start.svg +7 -0
- package/src/assets/icons/sprite/record-stop.svg +7 -0
- package/src/assets/icons/sprite/screenshot-done.svg +7 -0
- package/src/assets/icons/sprite/screenshot-false.svg +7 -0
- package/src/assets/icons/sprite/screenshot.svg +8 -0
- package/src/assets/icons/sprite/sharing-end.svg +5 -0
- package/src/components/wt-vidstack-player/components/layouts/video-layout.vue +12 -2
- package/src/components/wt-vidstack-player/components/panels/screen-sharing-control-panel/screen-sharing-control-panel.vue +211 -0
- package/src/components/wt-vidstack-player/types/WtVidstackPlayerControlsMode.ts +7 -0
- package/src/components/wt-vidstack-player/types/WtVidstackPlayerSession.ts +7 -0
- package/src/components/wt-vidstack-player/wt-vidstack-player.vue +24 -3
- package/src/plugins/primevue/theme/components/components.js +1 -2
- package/src/plugins/primevue/theme/extend/player/player.js +15 -0
- package/src/plugins/primevue/theme/webitel-theme.js +6 -1
- package/types/components/wt-vidstack-player/components/layouts/video-layout.vue.d.ts +5 -1
- package/types/components/wt-vidstack-player/components/panels/screen-sharing-control-panel/screen-sharing-control-panel.vue.d.ts +6 -0
- package/types/components/wt-vidstack-player/types/WtVidstackPlayerControlsMode.d.ts +5 -0
- package/types/components/wt-vidstack-player/types/WtVidstackPlayerSession.d.ts +7 -0
- package/types/components/wt-vidstack-player/wt-vidstack-player.vue.d.ts +6 -0
- package/types/plugins/primevue/theme/extend/player/player.d.ts +3 -0
- package/dist/vidstack-54Jpr2Lq-B2le6Uto.js +0 -142
- package/dist/vidstack-BP-l85ST-CTFw3KUN.js +0 -21
- package/dist/vidstack-BTBUzdbF-BuhaE3ef.js +0 -29
- package/dist/vidstack-Ccp8mxka-2ZiXmway.js +0 -20
- package/dist/vidstack-Dgd3Tj9x-BuTqiZFH.js +0 -397
- package/dist/vidstack-DscYSLiW-Dk1undJ-.js +0 -33
- package/dist/vidstack-HTyVv8Yq-DzaVyW2f.js +0 -52
- package/dist/vidstack-audio-BEcEzkeF.js +0 -26
- package/dist/vidstack-dash-D8SZVGUN.js +0 -405
- package/dist/vidstack-google-cast-Yhgv2Xji.js +0 -405
- package/dist/vidstack-hls-C5jjqF8L.js +0 -328
- package/dist/vidstack-video-1erl9Gbe.js +0 -149
- package/dist/vidstack-vimeo-BSb58vEP.js +0 -434
- package/dist/vidstack-youtube-BeeLfeYv.js +0 -204
- package/src/plugins/primevue/theme/extend/extend.js +0 -7
- package/src/plugins/primevue/theme/extend/spacings/spacings.js +0 -15
- package/types/plugins/primevue/theme/extend/extend.d.ts +0 -5
- package/types/plugins/primevue/theme/extend/spacings/spacings.d.ts +0 -13
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
import { r as E, b as c, p as S, d as f, Q as v, l as m, e as w, D as u, f as q, g as _, T, L as l, I, m as L, n as D, o as R, q as $ } from "./install-By5bv5Ga.js";
|
|
2
|
-
import { VideoProvider as O } from "./vidstack-video-1erl9Gbe.js";
|
|
3
|
-
import { R as x } from "./vidstack-Ccp8mxka-2ZiXmway.js";
|
|
4
|
-
const C = (h) => q(h);
|
|
5
|
-
class A {
|
|
6
|
-
constructor(t, i) {
|
|
7
|
-
this.m = t, this.b = i, this.d = null, this.qb = null, this.rb = {}, this.sb = /* @__PURE__ */ new Set(), this.na = -1;
|
|
8
|
-
}
|
|
9
|
-
get instance() {
|
|
10
|
-
return this.d;
|
|
11
|
-
}
|
|
12
|
-
setup(t) {
|
|
13
|
-
const { streamType: i } = this.b.$state, e = f(i).includes("live"), r = f(i).includes("ll-");
|
|
14
|
-
this.d = new t({
|
|
15
|
-
lowLatencyMode: r,
|
|
16
|
-
backBufferLength: r ? 4 : e ? 8 : void 0,
|
|
17
|
-
renderTextTracksNatively: !1,
|
|
18
|
-
...this.rb
|
|
19
|
-
});
|
|
20
|
-
const n = this.Oi.bind(this);
|
|
21
|
-
for (const o of Object.values(t.Events))
|
|
22
|
-
this.d.on(o, n);
|
|
23
|
-
this.d.on(t.Events.ERROR, this.Q.bind(this));
|
|
24
|
-
for (const o of this.sb)
|
|
25
|
-
o(this.d);
|
|
26
|
-
this.b.player.dispatch("hls-instance", {
|
|
27
|
-
detail: this.d
|
|
28
|
-
}), this.d.attachMedia(this.m), this.d.on(t.Events.FRAG_LOADING, this.Pi.bind(this)), this.d.on(t.Events.AUDIO_TRACK_SWITCHED, this.Qi.bind(this)), this.d.on(t.Events.LEVEL_SWITCHED, this.Ri.bind(this)), this.d.on(t.Events.LEVEL_LOADED, this.Si.bind(this)), this.d.on(t.Events.NON_NATIVE_TEXT_TRACKS_FOUND, this.Ti.bind(this)), this.d.on(t.Events.CUES_PARSED, this.Ui.bind(this)), this.b.qualities[v.Ia] = this.je.bind(this), m(this.b.qualities, "change", this.ke.bind(this)), m(this.b.audioTracks, "change", this.le.bind(this)), this.qb = w(this.me.bind(this));
|
|
29
|
-
}
|
|
30
|
-
aa(t, i) {
|
|
31
|
-
return new u(C(t), { detail: i });
|
|
32
|
-
}
|
|
33
|
-
me() {
|
|
34
|
-
if (!this.b.$state.live())
|
|
35
|
-
return;
|
|
36
|
-
const t = new x(this.ne.bind(this));
|
|
37
|
-
return t.Xa(), t.$.bind(t);
|
|
38
|
-
}
|
|
39
|
-
ne() {
|
|
40
|
-
var t;
|
|
41
|
-
this.b.$state.liveSyncPosition.set(((t = this.d) == null ? void 0 : t.liveSyncPosition) ?? 1 / 0);
|
|
42
|
-
}
|
|
43
|
-
Oi(t, i) {
|
|
44
|
-
var e;
|
|
45
|
-
(e = this.b.player) == null || e.dispatch(this.aa(t, i));
|
|
46
|
-
}
|
|
47
|
-
Ti(t, i) {
|
|
48
|
-
const e = this.aa(t, i);
|
|
49
|
-
let r = -1;
|
|
50
|
-
for (let n = 0; n < i.tracks.length; n++) {
|
|
51
|
-
const o = i.tracks[n], s = o.subtitleTrack ?? o.closedCaptions, d = new _({
|
|
52
|
-
id: `hls-${o.kind}-${n}`,
|
|
53
|
-
src: s == null ? void 0 : s.url,
|
|
54
|
-
label: o.label,
|
|
55
|
-
language: s == null ? void 0 : s.lang,
|
|
56
|
-
kind: o.kind,
|
|
57
|
-
default: o.default
|
|
58
|
-
});
|
|
59
|
-
d[T.ma] = 2, d[T.hb] = () => {
|
|
60
|
-
d.mode === "showing" ? (this.d.subtitleTrack = n, r = n) : r === n && (this.d.subtitleTrack = -1, r = -1);
|
|
61
|
-
}, this.b.textTracks.add(d, e);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
Ui(t, i) {
|
|
65
|
-
var o;
|
|
66
|
-
const e = (o = this.d) == null ? void 0 : o.subtitleTrack, r = this.b.textTracks.getById(`hls-${i.type}-${e}`);
|
|
67
|
-
if (!r)
|
|
68
|
-
return;
|
|
69
|
-
const n = this.aa(t, i);
|
|
70
|
-
for (const s of i.cues)
|
|
71
|
-
s.positionAlign = "auto", r.addCue(s, n);
|
|
72
|
-
}
|
|
73
|
-
Qi(t, i) {
|
|
74
|
-
const e = this.b.audioTracks[i.id];
|
|
75
|
-
if (e) {
|
|
76
|
-
const r = this.aa(t, i);
|
|
77
|
-
this.b.audioTracks[l.ea](e, !0, r);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
Ri(t, i) {
|
|
81
|
-
const e = this.b.qualities[i.level];
|
|
82
|
-
if (e) {
|
|
83
|
-
const r = this.aa(t, i);
|
|
84
|
-
this.b.qualities[l.ea](e, !0, r);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
Si(t, i) {
|
|
88
|
-
var g;
|
|
89
|
-
if (this.b.$state.canPlay())
|
|
90
|
-
return;
|
|
91
|
-
const { type: e, live: r, totalduration: n, targetduration: o } = i.details, s = this.aa(t, i);
|
|
92
|
-
this.b.delegate.c(
|
|
93
|
-
"stream-type-change",
|
|
94
|
-
r ? e === "EVENT" && Number.isFinite(n) && o >= 10 ? "live:dvr" : "live" : "on-demand",
|
|
95
|
-
s
|
|
96
|
-
), this.b.delegate.c("duration-change", n, s);
|
|
97
|
-
const d = this.d.media;
|
|
98
|
-
this.d.currentLevel === -1 && this.b.qualities[v.Wa](!0, s);
|
|
99
|
-
for (const a of this.d.audioTracks) {
|
|
100
|
-
const p = {
|
|
101
|
-
id: a.id.toString(),
|
|
102
|
-
label: a.name,
|
|
103
|
-
language: a.lang || "",
|
|
104
|
-
kind: "main"
|
|
105
|
-
};
|
|
106
|
-
this.b.audioTracks[l.da](p, s);
|
|
107
|
-
}
|
|
108
|
-
for (const a of this.d.levels) {
|
|
109
|
-
const p = {
|
|
110
|
-
id: ((g = a.id) == null ? void 0 : g.toString()) ?? a.height + "p",
|
|
111
|
-
width: a.width,
|
|
112
|
-
height: a.height,
|
|
113
|
-
codec: a.codecSet,
|
|
114
|
-
bitrate: a.bitrate
|
|
115
|
-
};
|
|
116
|
-
this.b.qualities[l.da](p, s);
|
|
117
|
-
}
|
|
118
|
-
d.dispatchEvent(new u("canplay", { trigger: s }));
|
|
119
|
-
}
|
|
120
|
-
Q(t, i) {
|
|
121
|
-
var e;
|
|
122
|
-
if (i.fatal)
|
|
123
|
-
switch (i.type) {
|
|
124
|
-
case "networkError":
|
|
125
|
-
this.pe(i.error);
|
|
126
|
-
break;
|
|
127
|
-
case "mediaError":
|
|
128
|
-
(e = this.d) == null || e.recoverMediaError();
|
|
129
|
-
break;
|
|
130
|
-
default:
|
|
131
|
-
this.qc(i.error);
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
Pi() {
|
|
136
|
-
this.na >= 0 && this._a();
|
|
137
|
-
}
|
|
138
|
-
pe(t) {
|
|
139
|
-
var i;
|
|
140
|
-
this._a(), (i = this.d) == null || i.startLoad(), this.na = window.setTimeout(() => {
|
|
141
|
-
this.na = -1, this.qc(t);
|
|
142
|
-
}, 5e3);
|
|
143
|
-
}
|
|
144
|
-
_a() {
|
|
145
|
-
clearTimeout(this.na), this.na = -1;
|
|
146
|
-
}
|
|
147
|
-
qc(t) {
|
|
148
|
-
this.b.delegate.c("error", {
|
|
149
|
-
message: t.message,
|
|
150
|
-
code: 1,
|
|
151
|
-
error: t
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
je() {
|
|
155
|
-
this.d && (this.d.currentLevel = -1);
|
|
156
|
-
}
|
|
157
|
-
ke() {
|
|
158
|
-
const { qualities: t } = this.b;
|
|
159
|
-
!this.d || t.auto || (this.d[t.switch + "Level"] = t.selectedIndex, I && (this.m.currentTime = this.m.currentTime));
|
|
160
|
-
}
|
|
161
|
-
le() {
|
|
162
|
-
const { audioTracks: t } = this.b;
|
|
163
|
-
this.d && this.d.audioTrack !== t.selectedIndex && (this.d.audioTrack = t.selectedIndex);
|
|
164
|
-
}
|
|
165
|
-
Vi(t) {
|
|
166
|
-
var i;
|
|
167
|
-
this._a(), c(t.src) && ((i = this.d) == null || i.loadSource(t.src));
|
|
168
|
-
}
|
|
169
|
-
Wi() {
|
|
170
|
-
var t, i;
|
|
171
|
-
this._a(), (t = this.d) == null || t.destroy(), this.d = null, (i = this.qb) == null || i.call(this), this.qb = null;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
class H {
|
|
175
|
-
constructor(t, i, e) {
|
|
176
|
-
this.L = t, this.b = i, this.La = e, this.qe();
|
|
177
|
-
}
|
|
178
|
-
async qe() {
|
|
179
|
-
const t = {
|
|
180
|
-
onLoadStart: this.Ma.bind(this),
|
|
181
|
-
onLoaded: this.tb.bind(this),
|
|
182
|
-
onLoadError: this.re.bind(this)
|
|
183
|
-
};
|
|
184
|
-
let i = await j(this.L, t);
|
|
185
|
-
if (L(i) && !c(this.L) && (i = await N(this.L, t)), !i)
|
|
186
|
-
return null;
|
|
187
|
-
if (!i.isSupported()) {
|
|
188
|
-
const e = "[vidstack] `hls.js` is not supported in this environment";
|
|
189
|
-
return this.b.player.dispatch(new u("hls-unsupported")), this.b.delegate.c("error", { message: e, code: 4 }), null;
|
|
190
|
-
}
|
|
191
|
-
return i;
|
|
192
|
-
}
|
|
193
|
-
Ma() {
|
|
194
|
-
this.b.player.dispatch(new u("hls-lib-load-start"));
|
|
195
|
-
}
|
|
196
|
-
tb(t) {
|
|
197
|
-
this.b.player.dispatch(
|
|
198
|
-
new u("hls-lib-loaded", {
|
|
199
|
-
detail: t
|
|
200
|
-
})
|
|
201
|
-
), this.La(t);
|
|
202
|
-
}
|
|
203
|
-
re(t) {
|
|
204
|
-
const i = D(t);
|
|
205
|
-
this.b.player.dispatch(
|
|
206
|
-
new u("hls-lib-load-error", {
|
|
207
|
-
detail: i
|
|
208
|
-
})
|
|
209
|
-
), this.b.delegate.c("error", {
|
|
210
|
-
message: i.message,
|
|
211
|
-
code: 4,
|
|
212
|
-
error: i
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
async function N(h, t = {}) {
|
|
217
|
-
var i, e, r, n, o;
|
|
218
|
-
if (!L(h)) {
|
|
219
|
-
if ((i = t.onLoadStart) == null || i.call(t), h.prototype && h.prototype !== Function)
|
|
220
|
-
return (e = t.onLoaded) == null || e.call(t, h), h;
|
|
221
|
-
try {
|
|
222
|
-
const s = (r = await h()) == null ? void 0 : r.default;
|
|
223
|
-
if (s && s.isSupported)
|
|
224
|
-
(n = t.onLoaded) == null || n.call(t, s);
|
|
225
|
-
else
|
|
226
|
-
throw Error(
|
|
227
|
-
""
|
|
228
|
-
);
|
|
229
|
-
return s;
|
|
230
|
-
} catch (s) {
|
|
231
|
-
(o = t.onLoadError) == null || o.call(t, s);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
async function j(h, t = {}) {
|
|
236
|
-
var i, e, r;
|
|
237
|
-
if (c(h)) {
|
|
238
|
-
(i = t.onLoadStart) == null || i.call(t);
|
|
239
|
-
try {
|
|
240
|
-
if (await R(h), !$(window.Hls))
|
|
241
|
-
throw Error(
|
|
242
|
-
""
|
|
243
|
-
);
|
|
244
|
-
const n = window.Hls;
|
|
245
|
-
return (e = t.onLoaded) == null || e.call(t, n), n;
|
|
246
|
-
} catch (n) {
|
|
247
|
-
(r = t.onLoadError) == null || r.call(t, n);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
const V = "https://cdn.jsdelivr.net", b = class b extends O {
|
|
252
|
-
constructor() {
|
|
253
|
-
super(...arguments), this.$$PROVIDER_TYPE = "HLS", this.rc = null, this.e = new A(this.video, this.b), this.oa = `${V}/npm/hls.js@^1.5.0/dist/hls.min.js`;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* The `hls.js` constructor.
|
|
257
|
-
*/
|
|
258
|
-
get ctor() {
|
|
259
|
-
return this.rc;
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* The current `hls.js` instance.
|
|
263
|
-
*/
|
|
264
|
-
get instance() {
|
|
265
|
-
return this.e.instance;
|
|
266
|
-
}
|
|
267
|
-
get type() {
|
|
268
|
-
return "hls";
|
|
269
|
-
}
|
|
270
|
-
get canLiveSync() {
|
|
271
|
-
return !0;
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* The `hls.js` configuration object.
|
|
275
|
-
*
|
|
276
|
-
* @see {@link https://github.com/video-dev/hls.js/blob/master/docs/API.md#fine-tuning}
|
|
277
|
-
*/
|
|
278
|
-
get config() {
|
|
279
|
-
return this.e.rb;
|
|
280
|
-
}
|
|
281
|
-
set config(t) {
|
|
282
|
-
this.e.rb = t;
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* The `hls.js` constructor (supports dynamic imports) or a URL of where it can be found.
|
|
286
|
-
*
|
|
287
|
-
* @defaultValue `https://cdn.jsdelivr.net/npm/hls.js@^1.0.0/dist/hls.min.js`
|
|
288
|
-
*/
|
|
289
|
-
get library() {
|
|
290
|
-
return this.oa;
|
|
291
|
-
}
|
|
292
|
-
set library(t) {
|
|
293
|
-
this.oa = t;
|
|
294
|
-
}
|
|
295
|
-
preconnect() {
|
|
296
|
-
c(this.oa) && S(this.oa);
|
|
297
|
-
}
|
|
298
|
-
setup() {
|
|
299
|
-
super.setup(), new H(this.oa, this.b, (t) => {
|
|
300
|
-
this.rc = t, this.e.setup(t), this.b.delegate.c("provider-setup", this);
|
|
301
|
-
const i = f(this.b.$state.source);
|
|
302
|
-
i && this.loadSource(i);
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
async loadSource(t, i) {
|
|
306
|
-
if (!c(t.src)) {
|
|
307
|
-
this.oc();
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
this.a.preload = i || "", this.ge(t, "application/x-mpegurl"), this.e.Vi(t), this.K = t;
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* The given callback is invoked when a new `hls.js` instance is created and right before it's
|
|
314
|
-
* attached to media.
|
|
315
|
-
*/
|
|
316
|
-
onInstance(t) {
|
|
317
|
-
const i = this.e.instance;
|
|
318
|
-
return i && t(i), this.e.sb.add(t), () => this.e.sb.delete(t);
|
|
319
|
-
}
|
|
320
|
-
destroy() {
|
|
321
|
-
this.e.Wi();
|
|
322
|
-
}
|
|
323
|
-
};
|
|
324
|
-
b.supported = E();
|
|
325
|
-
let y = b;
|
|
326
|
-
export {
|
|
327
|
-
y as HLSProvider
|
|
328
|
-
};
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { s as p, t as u, u as o, v as f, w as d, l as c, D as g, g as m, T as n } from "./install-By5bv5Ga.js";
|
|
2
|
-
import { H as P, a as b } from "./vidstack-Dgd3Tj9x-BuTqiZFH.js";
|
|
3
|
-
class k {
|
|
4
|
-
constructor(t, e) {
|
|
5
|
-
this.m = t, this.b = e, t.textTracks.onaddtrack = this.Yd.bind(this), d(this.ce.bind(this));
|
|
6
|
-
}
|
|
7
|
-
Yd(t) {
|
|
8
|
-
const e = t.track;
|
|
9
|
-
if (!e || T(this.m, e))
|
|
10
|
-
return;
|
|
11
|
-
const i = new m({
|
|
12
|
-
id: e.id,
|
|
13
|
-
kind: e.kind,
|
|
14
|
-
label: e.label ?? "",
|
|
15
|
-
language: e.language,
|
|
16
|
-
type: "vtt"
|
|
17
|
-
});
|
|
18
|
-
i[n._] = { track: e }, i[n.ma] = 2, i[n.Mf] = !0;
|
|
19
|
-
let s = 0;
|
|
20
|
-
const h = (l) => {
|
|
21
|
-
if (e.cues)
|
|
22
|
-
for (let a = s; a < e.cues.length; a++)
|
|
23
|
-
i.addCue(e.cues[a], l), s++;
|
|
24
|
-
};
|
|
25
|
-
h(t), e.oncuechange = h, this.b.textTracks.add(i, t), i.setMode(e.mode, t);
|
|
26
|
-
}
|
|
27
|
-
ce() {
|
|
28
|
-
var t;
|
|
29
|
-
this.m.textTracks.onaddtrack = null;
|
|
30
|
-
for (const e of this.b.textTracks) {
|
|
31
|
-
const i = (t = e[n._]) == null ? void 0 : t.track;
|
|
32
|
-
i != null && i.oncuechange && (i.oncuechange = null);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function T(r, t) {
|
|
37
|
-
return Array.from(r.children).find((e) => e.track === t);
|
|
38
|
-
}
|
|
39
|
-
class x {
|
|
40
|
-
constructor(t, e) {
|
|
41
|
-
this.m = t, this.a = e, this.E = (i, s) => {
|
|
42
|
-
this.a.delegate.c("picture-in-picture-change", i, s);
|
|
43
|
-
}, c(this.m, "enterpictureinpicture", this.Gi.bind(this)), c(this.m, "leavepictureinpicture", this.Hi.bind(this));
|
|
44
|
-
}
|
|
45
|
-
get active() {
|
|
46
|
-
return document.pictureInPictureElement === this.m;
|
|
47
|
-
}
|
|
48
|
-
get supported() {
|
|
49
|
-
return o(this.m);
|
|
50
|
-
}
|
|
51
|
-
async enter() {
|
|
52
|
-
return this.m.requestPictureInPicture();
|
|
53
|
-
}
|
|
54
|
-
exit() {
|
|
55
|
-
return document.exitPictureInPicture();
|
|
56
|
-
}
|
|
57
|
-
Gi(t) {
|
|
58
|
-
this.E(!0, t);
|
|
59
|
-
}
|
|
60
|
-
Hi(t) {
|
|
61
|
-
this.E(!1, t);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
class y {
|
|
65
|
-
constructor(t, e) {
|
|
66
|
-
this.m = t, this.a = e, this.U = "inline", c(this.m, "webkitpresentationmodechanged", this.hb.bind(this));
|
|
67
|
-
}
|
|
68
|
-
get pb() {
|
|
69
|
-
return u(this.m);
|
|
70
|
-
}
|
|
71
|
-
async fd(t) {
|
|
72
|
-
this.U !== t && this.m.webkitSetPresentationMode(t);
|
|
73
|
-
}
|
|
74
|
-
hb(t) {
|
|
75
|
-
var i;
|
|
76
|
-
const e = this.U;
|
|
77
|
-
this.U = this.m.webkitPresentationMode, (i = this.a.player) == null || i.dispatch(
|
|
78
|
-
new g("video-presentation-change", {
|
|
79
|
-
detail: this.U,
|
|
80
|
-
trigger: t
|
|
81
|
-
})
|
|
82
|
-
), ["fullscreen", "picture-in-picture"].forEach((s) => {
|
|
83
|
-
(this.U === s || e === s) && this.a.delegate.c(`${s}-change`, this.U === s, t);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
class O {
|
|
88
|
-
constructor(t) {
|
|
89
|
-
this.Oa = t;
|
|
90
|
-
}
|
|
91
|
-
get active() {
|
|
92
|
-
return this.Oa.U === "fullscreen";
|
|
93
|
-
}
|
|
94
|
-
get supported() {
|
|
95
|
-
return this.Oa.pb;
|
|
96
|
-
}
|
|
97
|
-
async enter() {
|
|
98
|
-
this.Oa.fd("fullscreen");
|
|
99
|
-
}
|
|
100
|
-
async exit() {
|
|
101
|
-
this.Oa.fd("inline");
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
class w {
|
|
105
|
-
constructor(t) {
|
|
106
|
-
this.Oa = t;
|
|
107
|
-
}
|
|
108
|
-
get active() {
|
|
109
|
-
return this.Oa.U === "picture-in-picture";
|
|
110
|
-
}
|
|
111
|
-
get supported() {
|
|
112
|
-
return this.Oa.pb;
|
|
113
|
-
}
|
|
114
|
-
async enter() {
|
|
115
|
-
this.Oa.fd("picture-in-picture");
|
|
116
|
-
}
|
|
117
|
-
async exit() {
|
|
118
|
-
this.Oa.fd("inline");
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
class I extends P {
|
|
122
|
-
constructor(t, e) {
|
|
123
|
-
super(t, e), this.$$PROVIDER_TYPE = "VIDEO", p(() => {
|
|
124
|
-
if (this.airPlay = new b(t, e), u(t)) {
|
|
125
|
-
const i = new y(t, e);
|
|
126
|
-
this.fullscreen = new O(i), this.pictureInPicture = new w(i);
|
|
127
|
-
} else o(t) && (this.pictureInPicture = new x(t, e));
|
|
128
|
-
}, this.scope);
|
|
129
|
-
}
|
|
130
|
-
get type() {
|
|
131
|
-
return "video";
|
|
132
|
-
}
|
|
133
|
-
setup() {
|
|
134
|
-
super.setup(), f(this.video) && new k(this.video, this.b), this.b.textRenderers.Xf(this.video), d(() => {
|
|
135
|
-
this.b.textRenderers.Xf(null);
|
|
136
|
-
}), this.type === "video" && this.b.delegate.c("provider-setup", this);
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* The native HTML `<video>` element.
|
|
140
|
-
*
|
|
141
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement}
|
|
142
|
-
*/
|
|
143
|
-
get video() {
|
|
144
|
-
return this.a;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
export {
|
|
148
|
-
I as VideoProvider
|
|
149
|
-
};
|