@instructure/studio-player 1.1.14 → 1.2.0
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/README.md +2 -2
- package/dist/{ar-DWuLBmz_.js → ar-Z9acuZzl.js} +59 -57
- package/dist/{ca-Qqae8qG8.js → ca-DlR1wIBB.js} +53 -51
- package/dist/chromecast-fcYiHsj5.js +4 -0
- package/dist/{cy-BpEFkqco.js → cy-Bfp7KxBK.js} +56 -54
- package/dist/{da-wed3aJ7h.js → da-qrZgDst-.js} +48 -46
- package/dist/{da-x-k12-COGvNdvr.js → da-x-k12-By8rNInq.js} +46 -44
- package/dist/{de-nKvELG0o.js → de-knn0V76L.js} +52 -50
- package/dist/dev-D3SS6qhA.js +1000 -0
- package/dist/{en_AU-MbaPa8_v.js → en-AU-x-unimelb-ByeXpRSQ.js} +54 -52
- package/dist/en-AyGO5HzS.js +133 -0
- package/dist/{en-GB-x-ukhe-B4JozeRC.js → en-GB-x-ukhe-xHRAKkin.js} +56 -54
- package/dist/{en-AU-x-unimelb-CkNBO1qD.js → en_AU-DyOGFAXY.js} +48 -46
- package/dist/{en_CY-Bic0boap.js → en_CY-BOdUgRsC.js} +52 -50
- package/dist/{en_GB-Bic0boap.js → en_GB-BgDkmLv4.js} +50 -48
- package/dist/errors-Bfk1GqFn.js +70 -0
- package/dist/{es-BcgDzQZG.js → es-CBqAZZdR.js} +54 -52
- package/dist/{es_ES-Dpu1hibc.js → es_ES-DLfG4pu4.js} +60 -58
- package/dist/{fi-BEWl8re7.js → fi-Dq0xAMjn.js} +55 -53
- package/dist/{fr-DiQce0QU.js → fr-CvtcW3Dj.js} +58 -56
- package/dist/fr_CA-ZpBdXMbh.js +133 -0
- package/dist/ga-83Dv-X5Z.js +133 -0
- package/dist/{hi-DFgKd5Rh.js → hi-xRyetvo6.js} +59 -57
- package/dist/ht-DA2-RKUH.js +133 -0
- package/dist/id-CEs1cZOo.js +133 -0
- package/dist/index-COMpNSdw.css +1 -0
- package/dist/{is-CTl9VBTw.js → is-BbinArrV.js} +56 -54
- package/dist/{it-DS73ictn.js → it-HslrRsSS.js} +58 -56
- package/dist/ja-D89KNqN9.js +133 -0
- package/dist/mi-aU_9ve5X.js +133 -0
- package/dist/{ms-C_fuUCcA.js → ms-bWAzRpaY.js} +52 -50
- package/dist/nb-M_VkURkp.js +133 -0
- package/dist/{nb-CrJr2akb.js → nb-x-k12-B-_bQnAo.js} +54 -52
- package/dist/{nl-CrynP9Ac.js → nl-DHdAiTnV.js} +56 -54
- package/dist/pl-1Qw2eZF3.js +133 -0
- package/dist/{pt-GnFuQolP.js → pt-Ck4sSJ6k.js} +52 -50
- package/dist/{pt_BR-Bw-U8Fma.js → pt_BR-Cx97cXwr.js} +56 -54
- package/dist/ru-C-htuaP4.js +133 -0
- package/dist/sl-CQCpGyzi.js +133 -0
- package/dist/srt-parser-HIGL5vQl.js +27 -0
- package/dist/ssa-parser-DsrjQpwb.js +209 -0
- package/dist/studio-player.es.js +4728 -4742
- package/dist/sv-e5AFl9Ar.js +133 -0
- package/dist/sv-x-k12-pMVzTct2.js +133 -0
- package/dist/{th-DY_qsUyE.js → th-D_TJAjfw.js} +63 -61
- package/dist/{vi-CZWY3NLh.js → vi-Cm6S7qCi.js} +53 -51
- package/dist/vidstack-CjqtyAQk.js +9772 -0
- package/dist/vidstack-audio-CkMeA4-b.js +32 -0
- package/dist/vidstack-dash-CMEjAqOU.js +95 -0
- package/dist/vidstack-google-cast-BMQWFfhs.js +313 -0
- package/dist/vidstack-hls-D1a98pZ4.js +95 -0
- package/dist/vidstack-html-CPvoK3qB.js +73 -0
- package/dist/vidstack-video-C_npz5Cj.js +39 -0
- package/dist/vidstack-vimeo-j7LNW6Re.js +426 -0
- package/dist/vidstack-youtube-C_ammZWO.js +264 -0
- package/dist/zh-DaDuLWt4.js +133 -0
- package/dist/zh-Hans-Bh10_Au7.js +133 -0
- package/dist/zh-Hant-DvNKec8H.js +133 -0
- package/dist/{zh-Hant-DuAgeN0L.js → zh_HK-CwSDZpFm.js} +59 -57
- package/package.json +4 -4
- package/dist/en-Da2QqQzB.js +0 -131
- package/dist/errors-DCJKAXTz.js +0 -70
- package/dist/fr_CA-zzDHXzBI.js +0 -131
- package/dist/ga-BnfTovup.js +0 -125
- package/dist/ht-DmkZypkC.js +0 -131
- package/dist/id-D12ot73_.js +0 -131
- package/dist/index-CXoy768z.css +0 -1
- package/dist/ja-B0B-sKEG.js +0 -131
- package/dist/mi-BX_XpUQT.js +0 -131
- package/dist/nb-x-k12-LqbRKYNM.js +0 -131
- package/dist/patches.d.ts +0 -1
- package/dist/pl-CBE8GSTo.js +0 -131
- package/dist/prod-DTLJXtPo.js +0 -994
- package/dist/ru-Din5Ed0v.js +0 -131
- package/dist/sl-DOsudmDY.js +0 -131
- package/dist/srt-parser-CWqahKwO.js +0 -27
- package/dist/ssa-parser-BqjjKy4M.js +0 -209
- package/dist/sv-CxnJbrMd.js +0 -131
- package/dist/sv-x-k12-C3MKrKJe.js +0 -131
- package/dist/vidstack-CpEp8jXV.js +0 -32955
- package/dist/zh-Cb-utrSO.js +0 -131
- package/dist/zh-Hans-C6EE8GVu.js +0 -131
- package/dist/zh_HK-BaabEC8v.js +0 -131
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var a = (i, e, t) => e in i ? o(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var r = (i, e, t) => a(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { s as p, H as d } from "./vidstack-CjqtyAQk.js";
|
|
5
|
+
import { H as u } from "./vidstack-html-CPvoK3qB.js";
|
|
6
|
+
class n extends u {
|
|
7
|
+
constructor(t, s) {
|
|
8
|
+
super(t, s);
|
|
9
|
+
r(this, "$$PROVIDER_TYPE", "AUDIO");
|
|
10
|
+
r(this, "airPlay");
|
|
11
|
+
p(() => {
|
|
12
|
+
this.airPlay = new d(this.media, s);
|
|
13
|
+
}, this.scope);
|
|
14
|
+
}
|
|
15
|
+
get type() {
|
|
16
|
+
return "audio";
|
|
17
|
+
}
|
|
18
|
+
setup() {
|
|
19
|
+
super.setup(), this.type === "audio" && this.ctx.notify("provider-setup", this);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The native HTML `<audio>` element.
|
|
23
|
+
*
|
|
24
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement}
|
|
25
|
+
*/
|
|
26
|
+
get audio() {
|
|
27
|
+
return this.media;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
n as AudioProvider
|
|
32
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
|
+
var u = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var g = (e, s, t) => s in e ? S(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
+
var h = (e, s, t) => g(e, typeof s != "symbol" ? s + "" : s, t), d = (e, s, t) => s.has(e) || u("Cannot " + t);
|
|
7
|
+
var i = (e, s, t) => (d(e, s, "read from private field"), t ? t.call(e) : s.get(e)), a = (e, s, t) => s.has(e) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), p = (e, s, t, n) => (d(e, s, "write to private field"), n ? n.call(e, t) : s.set(e, t), t);
|
|
8
|
+
import { D as f, i as m, a as l, p as y, b as D, c as x } from "./vidstack-CjqtyAQk.js";
|
|
9
|
+
import { VideoProvider as v } from "./vidstack-video-C_npz5Cj.js";
|
|
10
|
+
const $ = "https://cdn.jsdelivr.net";
|
|
11
|
+
var c, r, o;
|
|
12
|
+
class b extends v {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
h(this, "$$PROVIDER_TYPE", "DASH");
|
|
16
|
+
a(this, c, null);
|
|
17
|
+
a(this, r, new f(this.video, this.ctx));
|
|
18
|
+
a(this, o, `${$}/npm/dashjs@4.7.4/dist/dash.all.min.js`);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The `dash.js` constructor.
|
|
22
|
+
*/
|
|
23
|
+
get ctor() {
|
|
24
|
+
return i(this, c);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The current `dash.js` instance.
|
|
28
|
+
*/
|
|
29
|
+
get instance() {
|
|
30
|
+
return i(this, r).instance;
|
|
31
|
+
}
|
|
32
|
+
get type() {
|
|
33
|
+
return "dash";
|
|
34
|
+
}
|
|
35
|
+
get canLiveSync() {
|
|
36
|
+
return !0;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The `dash.js` configuration object.
|
|
40
|
+
*
|
|
41
|
+
* @see {@link https://cdn.dashjs.org/latest/jsdoc/module-Settings.html}
|
|
42
|
+
*/
|
|
43
|
+
get config() {
|
|
44
|
+
return i(this, r).config;
|
|
45
|
+
}
|
|
46
|
+
set config(t) {
|
|
47
|
+
i(this, r).config = t;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The `dash.js` constructor (supports dynamic imports) or a URL of where it can be found.
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue `https://cdn.jsdelivr.net/npm/dashjs@4.7.4/dist/dash.all.min.js`
|
|
53
|
+
*/
|
|
54
|
+
get library() {
|
|
55
|
+
return i(this, o);
|
|
56
|
+
}
|
|
57
|
+
set library(t) {
|
|
58
|
+
p(this, o, t);
|
|
59
|
+
}
|
|
60
|
+
preconnect() {
|
|
61
|
+
l(i(this, o)) && y(i(this, o));
|
|
62
|
+
}
|
|
63
|
+
setup() {
|
|
64
|
+
super.setup(), new D(i(this, o), this.ctx, (t) => {
|
|
65
|
+
p(this, c, t), i(this, r).setup(t), this.ctx.notify("provider-setup", this);
|
|
66
|
+
const n = x(this.ctx.$state.source);
|
|
67
|
+
n && this.loadSource(n);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async loadSource(t, n) {
|
|
71
|
+
if (!l(t.src)) {
|
|
72
|
+
this.removeSource();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this.media.preload = n || "", this.appendSource(t, "application/x-mpegurl"), i(this, r).loadSource(t), this.currentSrc = t;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The given callback is invoked when a new `dash.js` instance is created and right before it's
|
|
79
|
+
* attached to media.
|
|
80
|
+
*/
|
|
81
|
+
onInstance(t) {
|
|
82
|
+
const n = i(this, r).instance;
|
|
83
|
+
return n && t(n), i(this, r).onInstance(t);
|
|
84
|
+
}
|
|
85
|
+
destroy() {
|
|
86
|
+
i(this, r).destroy();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
c = new WeakMap(), r = new WeakMap(), o = new WeakMap(), /**
|
|
90
|
+
* Whether `dash.js` is supported in this environment.
|
|
91
|
+
*/
|
|
92
|
+
h(b, "supported", m());
|
|
93
|
+
export {
|
|
94
|
+
b as DASHProvider
|
|
95
|
+
};
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
var ht = Object.defineProperty;
|
|
2
|
+
var U = (r) => {
|
|
3
|
+
throw TypeError(r);
|
|
4
|
+
};
|
|
5
|
+
var ct = (r, t, s) => t in r ? ht(r, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[t] = s;
|
|
6
|
+
var _ = (r, t, s) => ct(r, typeof t != "symbol" ? t + "" : t, s), D = (r, t, s) => t.has(r) || U("Cannot " + s);
|
|
7
|
+
var e = (r, t, s) => (D(r, t, "read from private field"), s ? s.call(r) : t.get(r)), d = (r, t, s) => t.has(r) ? U("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, s), u = (r, t, s, n) => (D(r, t, "write to private field"), n ? n.call(r, s) : t.set(r, s), s), a = (r, t, s) => (D(r, t, "access private method"), s);
|
|
8
|
+
import { l as ut, d as dt, T as E, R as lt, G as ft, k as F, o as mt, e as x, c as I, f as gt } from "./vidstack-CjqtyAQk.js";
|
|
9
|
+
function Tt() {
|
|
10
|
+
return "https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";
|
|
11
|
+
}
|
|
12
|
+
function vt() {
|
|
13
|
+
var r;
|
|
14
|
+
return !!((r = window.cast) != null && r.framework);
|
|
15
|
+
}
|
|
16
|
+
function wt() {
|
|
17
|
+
var r, t;
|
|
18
|
+
return !!((t = (r = window.chrome) == null ? void 0 : r.cast) != null && t.isAvailable);
|
|
19
|
+
}
|
|
20
|
+
function At() {
|
|
21
|
+
return L().getCastState() === cast.framework.CastState.CONNECTED;
|
|
22
|
+
}
|
|
23
|
+
function L() {
|
|
24
|
+
return window.cast.framework.CastContext.getInstance();
|
|
25
|
+
}
|
|
26
|
+
function q() {
|
|
27
|
+
return L().getCurrentSession();
|
|
28
|
+
}
|
|
29
|
+
function B() {
|
|
30
|
+
var r;
|
|
31
|
+
return (r = q()) == null ? void 0 : r.getSessionObj().media[0];
|
|
32
|
+
}
|
|
33
|
+
function j(r) {
|
|
34
|
+
var s;
|
|
35
|
+
return ((s = B()) == null ? void 0 : s.media.contentId) === (r == null ? void 0 : r.src);
|
|
36
|
+
}
|
|
37
|
+
function kt() {
|
|
38
|
+
return {
|
|
39
|
+
language: "en-US",
|
|
40
|
+
autoJoinPolicy: chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,
|
|
41
|
+
receiverApplicationId: chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,
|
|
42
|
+
resumeSavedSession: !0,
|
|
43
|
+
androidReceiverCompatible: !0
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function Ct(r) {
|
|
47
|
+
return `Google Cast Error Code: ${r}`;
|
|
48
|
+
}
|
|
49
|
+
function yt(r, t) {
|
|
50
|
+
return ut(L(), r, t);
|
|
51
|
+
}
|
|
52
|
+
var o, h, C, y, A, T, p, S, v, k, f, w, i, Y, J, P, K, b, z, Q, W, M, N, R, O, X, Z, tt, G, et, V, st, $, m, it, nt, H, at;
|
|
53
|
+
class Et {
|
|
54
|
+
constructor(t, s) {
|
|
55
|
+
d(this, i);
|
|
56
|
+
_(this, "$$PROVIDER_TYPE", "GOOGLE_CAST");
|
|
57
|
+
_(this, "scope", dt());
|
|
58
|
+
d(this, o);
|
|
59
|
+
d(this, h);
|
|
60
|
+
d(this, C);
|
|
61
|
+
d(this, y, null);
|
|
62
|
+
d(this, A, "disconnected");
|
|
63
|
+
d(this, T, 0);
|
|
64
|
+
d(this, p, 0);
|
|
65
|
+
d(this, S, new E(0, 0));
|
|
66
|
+
d(this, v, new lt(a(this, i, Q).bind(this)));
|
|
67
|
+
d(this, k);
|
|
68
|
+
d(this, f, null);
|
|
69
|
+
d(this, w, !1);
|
|
70
|
+
u(this, o, t), u(this, h, s), u(this, C, new ft(t, s, a(this, i, at).bind(this)));
|
|
71
|
+
}
|
|
72
|
+
get type() {
|
|
73
|
+
return "google-cast";
|
|
74
|
+
}
|
|
75
|
+
get currentSrc() {
|
|
76
|
+
return e(this, y);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The Google Cast remote player.
|
|
80
|
+
*
|
|
81
|
+
* @see {@link https://developers.google.com/cast/docs/reference/web_sender/cast.framework.RemotePlayer}
|
|
82
|
+
*/
|
|
83
|
+
get player() {
|
|
84
|
+
return e(this, o);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @see {@link https://developers.google.com/cast/docs/reference/web_sender/cast.framework.CastContext}
|
|
88
|
+
*/
|
|
89
|
+
get cast() {
|
|
90
|
+
return L();
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* @see {@link https://developers.google.com/cast/docs/reference/web_sender/cast.framework.CastSession}
|
|
94
|
+
*/
|
|
95
|
+
get session() {
|
|
96
|
+
return q();
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @see {@link https://developers.google.com/cast/docs/reference/web_sender/chrome.cast.media.Media}
|
|
100
|
+
*/
|
|
101
|
+
get media() {
|
|
102
|
+
return B();
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Whether the current Google Cast session belongs to this provider.
|
|
106
|
+
*/
|
|
107
|
+
get hasActiveSession() {
|
|
108
|
+
return j(e(this, y));
|
|
109
|
+
}
|
|
110
|
+
setup() {
|
|
111
|
+
a(this, i, Y).call(this), a(this, i, J).call(this), e(this, C).setup(), e(this, h).notify("provider-setup", this);
|
|
112
|
+
}
|
|
113
|
+
async play() {
|
|
114
|
+
var t;
|
|
115
|
+
if (!(!e(this, o).isPaused && !e(this, w))) {
|
|
116
|
+
if (e(this, w)) {
|
|
117
|
+
await a(this, i, H).call(this, !1, 0);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
(t = e(this, o).controller) == null || t.playOrPause();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
async pause() {
|
|
124
|
+
var t;
|
|
125
|
+
e(this, o).isPaused || (t = e(this, o).controller) == null || t.playOrPause();
|
|
126
|
+
}
|
|
127
|
+
getMediaStatus(t) {
|
|
128
|
+
return new Promise((s, n) => {
|
|
129
|
+
var c;
|
|
130
|
+
(c = this.media) == null || c.getStatus(t, s, n);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
setMuted(t) {
|
|
134
|
+
var n;
|
|
135
|
+
(t && !e(this, o).isMuted || !t && e(this, o).isMuted) && ((n = e(this, o).controller) == null || n.muteOrUnmute());
|
|
136
|
+
}
|
|
137
|
+
setCurrentTime(t) {
|
|
138
|
+
var s;
|
|
139
|
+
e(this, o).currentTime = t, e(this, h).notify("seeking", t), (s = e(this, o).controller) == null || s.seek();
|
|
140
|
+
}
|
|
141
|
+
setVolume(t) {
|
|
142
|
+
var s;
|
|
143
|
+
e(this, o).volumeLevel = t, (s = e(this, o).controller) == null || s.setVolumeLevel();
|
|
144
|
+
}
|
|
145
|
+
async loadSource(t) {
|
|
146
|
+
var c;
|
|
147
|
+
if (((c = e(this, f)) == null ? void 0 : c.src) !== t && u(this, f, null), j(t)) {
|
|
148
|
+
a(this, i, K).call(this), u(this, y, t);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
e(this, h).notify("load-start");
|
|
152
|
+
const s = a(this, i, nt).call(this, t), n = await this.session.loadMedia(s);
|
|
153
|
+
if (n) {
|
|
154
|
+
u(this, y, null), e(this, h).notify("error", Error(Ct(n)));
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
u(this, y, t);
|
|
158
|
+
}
|
|
159
|
+
destroy() {
|
|
160
|
+
a(this, i, P).call(this), a(this, i, b).call(this);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
o = new WeakMap(), h = new WeakMap(), C = new WeakMap(), y = new WeakMap(), A = new WeakMap(), T = new WeakMap(), p = new WeakMap(), S = new WeakMap(), v = new WeakMap(), k = new WeakMap(), f = new WeakMap(), w = new WeakMap(), i = new WeakSet(), Y = function() {
|
|
164
|
+
yt(
|
|
165
|
+
cast.framework.CastContextEventType.CAST_STATE_CHANGED,
|
|
166
|
+
a(this, i, M).bind(this)
|
|
167
|
+
);
|
|
168
|
+
}, J = function() {
|
|
169
|
+
const t = cast.framework.RemotePlayerEventType, s = {
|
|
170
|
+
[t.IS_CONNECTED_CHANGED]: a(this, i, M),
|
|
171
|
+
[t.IS_MEDIA_LOADED_CHANGED]: a(this, i, N),
|
|
172
|
+
[t.CAN_CONTROL_VOLUME_CHANGED]: a(this, i, R),
|
|
173
|
+
[t.CAN_SEEK_CHANGED]: a(this, i, O),
|
|
174
|
+
[t.DURATION_CHANGED]: a(this, i, tt),
|
|
175
|
+
[t.IS_MUTED_CHANGED]: a(this, i, G),
|
|
176
|
+
[t.VOLUME_LEVEL_CHANGED]: a(this, i, G),
|
|
177
|
+
[t.IS_PAUSED_CHANGED]: a(this, i, et),
|
|
178
|
+
[t.LIVE_SEEKABLE_RANGE_CHANGED]: a(this, i, V),
|
|
179
|
+
[t.PLAYER_STATE_CHANGED]: a(this, i, st)
|
|
180
|
+
};
|
|
181
|
+
u(this, k, s);
|
|
182
|
+
const n = a(this, i, W).bind(this);
|
|
183
|
+
for (const c of F(s))
|
|
184
|
+
e(this, o).controller.addEventListener(c, n);
|
|
185
|
+
mt(() => {
|
|
186
|
+
for (const c of F(s))
|
|
187
|
+
e(this, o).controller.removeEventListener(c, n);
|
|
188
|
+
});
|
|
189
|
+
}, P = function() {
|
|
190
|
+
e(this, f) || (u(this, p, 0), u(this, S, new E(0, 0))), e(this, v).stop(), u(this, T, 0), u(this, f, null);
|
|
191
|
+
}, K = function() {
|
|
192
|
+
const t = new x("resume-session", { detail: this.session });
|
|
193
|
+
a(this, i, N).call(this, t);
|
|
194
|
+
const { muted: s, volume: n, savedState: c } = e(this, h).$state, l = c();
|
|
195
|
+
this.setCurrentTime(Math.max(e(this, o).currentTime, (l == null ? void 0 : l.currentTime) ?? 0)), this.setMuted(s()), this.setVolume(n()), (l == null ? void 0 : l.paused) === !1 && this.play();
|
|
196
|
+
}, b = function() {
|
|
197
|
+
this.cast.endCurrentSession(!0);
|
|
198
|
+
const { remotePlaybackLoader: t } = e(this, h).$state;
|
|
199
|
+
t.set(null);
|
|
200
|
+
}, z = function() {
|
|
201
|
+
const { savedState: t } = e(this, h).$state;
|
|
202
|
+
t.set({
|
|
203
|
+
paused: e(this, o).isPaused,
|
|
204
|
+
currentTime: e(this, o).currentTime
|
|
205
|
+
}), a(this, i, b).call(this);
|
|
206
|
+
}, Q = function() {
|
|
207
|
+
a(this, i, Z).call(this);
|
|
208
|
+
}, W = function(t) {
|
|
209
|
+
e(this, k)[t.type].call(this, t);
|
|
210
|
+
}, M = function(t) {
|
|
211
|
+
const s = this.cast.getCastState(), n = s === cast.framework.CastState.CONNECTED ? "connected" : s === cast.framework.CastState.CONNECTING ? "connecting" : "disconnected";
|
|
212
|
+
if (e(this, A) === n) return;
|
|
213
|
+
const c = { type: "google-cast", state: n }, l = a(this, i, m).call(this, t);
|
|
214
|
+
u(this, A, n), e(this, h).notify("remote-playback-change", c, l), n === "disconnected" && a(this, i, z).call(this);
|
|
215
|
+
}, N = function(t) {
|
|
216
|
+
if (!!!e(this, o).isMediaLoaded) return;
|
|
217
|
+
const n = I(e(this, h).$state.source);
|
|
218
|
+
Promise.resolve().then(() => {
|
|
219
|
+
if (n !== I(e(this, h).$state.source) || !e(this, o).isMediaLoaded) return;
|
|
220
|
+
a(this, i, P).call(this);
|
|
221
|
+
const c = e(this, o).duration;
|
|
222
|
+
u(this, S, new E(0, c));
|
|
223
|
+
const l = {
|
|
224
|
+
provider: this,
|
|
225
|
+
duration: c,
|
|
226
|
+
buffered: new E(0, 0),
|
|
227
|
+
seekable: a(this, i, $).call(this)
|
|
228
|
+
}, g = a(this, i, m).call(this, t);
|
|
229
|
+
e(this, h).notify("loaded-metadata", void 0, g), e(this, h).notify("loaded-data", void 0, g), e(this, h).notify("can-play", l, g), a(this, i, R).call(this), a(this, i, O).call(this, t);
|
|
230
|
+
const { volume: rt, muted: ot } = e(this, h).$state;
|
|
231
|
+
this.setVolume(rt()), this.setMuted(ot()), e(this, v).start(), e(this, C).syncRemoteTracks(g), e(this, C).syncRemoteActiveIds(g);
|
|
232
|
+
});
|
|
233
|
+
}, R = function() {
|
|
234
|
+
e(this, h).$state.canSetVolume.set(e(this, o).canControlVolume);
|
|
235
|
+
}, O = function(t) {
|
|
236
|
+
const s = a(this, i, m).call(this, t);
|
|
237
|
+
e(this, h).notify("stream-type-change", a(this, i, X).call(this), s);
|
|
238
|
+
}, X = function() {
|
|
239
|
+
var s;
|
|
240
|
+
return ((s = e(this, o).mediaInfo) == null ? void 0 : s.streamType) === chrome.cast.media.StreamType.LIVE ? e(this, o).canSeek ? "live:dvr" : "live" : "on-demand";
|
|
241
|
+
}, Z = function() {
|
|
242
|
+
if (e(this, f)) return;
|
|
243
|
+
const t = e(this, o).currentTime;
|
|
244
|
+
t !== e(this, T) && (e(this, h).notify("time-change", t), t > e(this, p) && (u(this, p, t), a(this, i, V).call(this)), e(this, h).$state.seeking() && e(this, h).notify("seeked", t), u(this, T, t));
|
|
245
|
+
}, tt = function(t) {
|
|
246
|
+
if (!e(this, o).isMediaLoaded || e(this, f)) return;
|
|
247
|
+
const s = e(this, o).duration, n = a(this, i, m).call(this, t);
|
|
248
|
+
u(this, S, new E(0, s)), e(this, h).notify("duration-change", s, n);
|
|
249
|
+
}, G = function(t) {
|
|
250
|
+
if (!e(this, o).isMediaLoaded) return;
|
|
251
|
+
const s = {
|
|
252
|
+
muted: e(this, o).isMuted,
|
|
253
|
+
volume: e(this, o).volumeLevel
|
|
254
|
+
}, n = a(this, i, m).call(this, t);
|
|
255
|
+
e(this, h).notify("volume-change", s, n);
|
|
256
|
+
}, et = function(t) {
|
|
257
|
+
const s = a(this, i, m).call(this, t);
|
|
258
|
+
e(this, o).isPaused ? e(this, h).notify("pause", void 0, s) : e(this, h).notify("play", void 0, s);
|
|
259
|
+
}, V = function(t) {
|
|
260
|
+
const s = {
|
|
261
|
+
seekable: a(this, i, $).call(this),
|
|
262
|
+
buffered: new E(0, e(this, p))
|
|
263
|
+
}, n = t ? a(this, i, m).call(this, t) : void 0;
|
|
264
|
+
e(this, h).notify("progress", s, n);
|
|
265
|
+
}, st = function(t) {
|
|
266
|
+
const s = e(this, o).playerState, n = chrome.cast.media.PlayerState;
|
|
267
|
+
if (u(this, w, s === n.IDLE), s === n.PAUSED) return;
|
|
268
|
+
const c = a(this, i, m).call(this, t);
|
|
269
|
+
switch (s) {
|
|
270
|
+
case n.PLAYING:
|
|
271
|
+
e(this, h).notify("playing", void 0, c);
|
|
272
|
+
break;
|
|
273
|
+
case n.BUFFERING:
|
|
274
|
+
e(this, h).notify("waiting", void 0, c);
|
|
275
|
+
break;
|
|
276
|
+
case n.IDLE:
|
|
277
|
+
e(this, v).stop(), e(this, h).notify("pause"), e(this, h).notify("end");
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
}, $ = function() {
|
|
281
|
+
return e(this, o).liveSeekableRange ? new E(e(this, o).liveSeekableRange.start, e(this, o).liveSeekableRange.end) : e(this, S);
|
|
282
|
+
}, m = function(t) {
|
|
283
|
+
return t instanceof Event ? t : new x(t.type, { detail: t });
|
|
284
|
+
}, it = function(t) {
|
|
285
|
+
const { streamType: s, title: n, poster: c } = e(this, h).$state;
|
|
286
|
+
return new gt(t).setMetadata(n(), c()).setStreamType(s()).setTracks(e(this, C).getLocalTextTracks()).build();
|
|
287
|
+
}, nt = function(t) {
|
|
288
|
+
var l, g;
|
|
289
|
+
const s = a(this, i, it).call(this, t), n = new chrome.cast.media.LoadRequest(s), c = e(this, h).$state.savedState();
|
|
290
|
+
return n.autoplay = (((l = e(this, f)) == null ? void 0 : l.paused) ?? (c == null ? void 0 : c.paused)) === !1, n.currentTime = ((g = e(this, f)) == null ? void 0 : g.time) ?? (c == null ? void 0 : c.currentTime) ?? 0, n;
|
|
291
|
+
}, H = async function(t, s) {
|
|
292
|
+
const n = I(e(this, h).$state.source);
|
|
293
|
+
u(this, f, { src: n, paused: t, time: s }), await this.loadSource(n);
|
|
294
|
+
}, at = function() {
|
|
295
|
+
a(this, i, H).call(this, e(this, o).isPaused, e(this, o).currentTime).catch((t) => {
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
const Lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
299
|
+
__proto__: null,
|
|
300
|
+
GoogleCastProvider: Et
|
|
301
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
302
|
+
export {
|
|
303
|
+
q as a,
|
|
304
|
+
wt as b,
|
|
305
|
+
Ct as c,
|
|
306
|
+
kt as d,
|
|
307
|
+
Tt as e,
|
|
308
|
+
B as f,
|
|
309
|
+
L as g,
|
|
310
|
+
vt as h,
|
|
311
|
+
At as i,
|
|
312
|
+
Lt as p
|
|
313
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
|
+
var u = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var g = (e, s, t) => s in e ? S(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
+
var a = (e, s, t) => g(e, typeof s != "symbol" ? s + "" : s, t), d = (e, s, t) => s.has(e) || u("Cannot " + t);
|
|
7
|
+
var i = (e, s, t) => (d(e, s, "read from private field"), t ? t.call(e) : s.get(e)), h = (e, s, t) => s.has(e) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), p = (e, s, t, n) => (d(e, s, "write to private field"), n ? n.call(e, t) : s.set(e, t), t);
|
|
8
|
+
import { g as f, h as m, a as l, p as y, j as L, c as x } from "./vidstack-CjqtyAQk.js";
|
|
9
|
+
import { VideoProvider as v } from "./vidstack-video-C_npz5Cj.js";
|
|
10
|
+
const $ = "https://cdn.jsdelivr.net";
|
|
11
|
+
var c, r, o;
|
|
12
|
+
class j extends v {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
a(this, "$$PROVIDER_TYPE", "HLS");
|
|
16
|
+
h(this, c, null);
|
|
17
|
+
h(this, r, new f(this.video, this.ctx));
|
|
18
|
+
h(this, o, `${$}/npm/hls.js@^1.5.0/dist/hls.min.js`);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The `hls.js` constructor.
|
|
22
|
+
*/
|
|
23
|
+
get ctor() {
|
|
24
|
+
return i(this, c);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The current `hls.js` instance.
|
|
28
|
+
*/
|
|
29
|
+
get instance() {
|
|
30
|
+
return i(this, r).instance;
|
|
31
|
+
}
|
|
32
|
+
get type() {
|
|
33
|
+
return "hls";
|
|
34
|
+
}
|
|
35
|
+
get canLiveSync() {
|
|
36
|
+
return !0;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The `hls.js` configuration object.
|
|
40
|
+
*
|
|
41
|
+
* @see {@link https://github.com/video-dev/hls.js/blob/master/docs/API.md#fine-tuning}
|
|
42
|
+
*/
|
|
43
|
+
get config() {
|
|
44
|
+
return i(this, r).config;
|
|
45
|
+
}
|
|
46
|
+
set config(t) {
|
|
47
|
+
i(this, r).config = t;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The `hls.js` constructor (supports dynamic imports) or a URL of where it can be found.
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue `https://cdn.jsdelivr.net/npm/hls.js@^1.0.0/dist/hls.min.js`
|
|
53
|
+
*/
|
|
54
|
+
get library() {
|
|
55
|
+
return i(this, o);
|
|
56
|
+
}
|
|
57
|
+
set library(t) {
|
|
58
|
+
p(this, o, t);
|
|
59
|
+
}
|
|
60
|
+
preconnect() {
|
|
61
|
+
l(i(this, o)) && y(i(this, o));
|
|
62
|
+
}
|
|
63
|
+
setup() {
|
|
64
|
+
super.setup(), new L(i(this, o), this.ctx, (t) => {
|
|
65
|
+
p(this, c, t), i(this, r).setup(t), this.ctx.notify("provider-setup", this);
|
|
66
|
+
const n = x(this.ctx.$state.source);
|
|
67
|
+
n && this.loadSource(n);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async loadSource(t, n) {
|
|
71
|
+
if (!l(t.src)) {
|
|
72
|
+
this.removeSource();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this.media.preload = n || "", this.appendSource(t, "application/x-mpegurl"), i(this, r).loadSource(t), this.currentSrc = t;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The given callback is invoked when a new `hls.js` instance is created and right before it's
|
|
79
|
+
* attached to media.
|
|
80
|
+
*/
|
|
81
|
+
onInstance(t) {
|
|
82
|
+
const n = i(this, r).instance;
|
|
83
|
+
return n && t(n), i(this, r).onInstance(t);
|
|
84
|
+
}
|
|
85
|
+
destroy() {
|
|
86
|
+
i(this, r).destroy();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
c = new WeakMap(), r = new WeakMap(), o = new WeakMap(), /**
|
|
90
|
+
* Whether `hls.js` is supported in this environment.
|
|
91
|
+
*/
|
|
92
|
+
a(j, "supported", m());
|
|
93
|
+
export {
|
|
94
|
+
j as HLSProvider
|
|
95
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var m = (i) => {
|
|
3
|
+
throw TypeError(i);
|
|
4
|
+
};
|
|
5
|
+
var p = (i, e, t) => e in i ? l(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
6
|
+
var d = (i, e, t) => p(i, typeof e != "symbol" ? e + "" : e, t), S = (i, e, t) => e.has(i) || m("Cannot " + t);
|
|
7
|
+
var h = (i, e, t) => e.has(i) ? m("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
8
|
+
var n = (i, e, t) => (S(i, e, "access private method"), t);
|
|
9
|
+
import { A as y, d as v, m as f, N as T, o as b, n as c, q as $, a as M } from "./vidstack-CjqtyAQk.js";
|
|
10
|
+
var r, u;
|
|
11
|
+
class g {
|
|
12
|
+
constructor(e, t) {
|
|
13
|
+
h(this, r);
|
|
14
|
+
d(this, "scope", v());
|
|
15
|
+
d(this, "currentSrc", null);
|
|
16
|
+
d(this, "audioGain");
|
|
17
|
+
this.media = e, this.ctx = t, this.audioGain = new y(e, (a) => {
|
|
18
|
+
this.ctx.notify("audio-gain-change", a);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
setup() {
|
|
22
|
+
new f(this, this.ctx), "audioTracks" in this.media && new T(this, this.ctx), b(() => {
|
|
23
|
+
this.audioGain.destroy(), this.media.srcObject = null, this.media.removeAttribute("src");
|
|
24
|
+
for (const e of this.media.querySelectorAll("source")) e.remove();
|
|
25
|
+
this.media.load();
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
get type() {
|
|
29
|
+
return "";
|
|
30
|
+
}
|
|
31
|
+
setPlaybackRate(e) {
|
|
32
|
+
this.media.playbackRate = e;
|
|
33
|
+
}
|
|
34
|
+
async play() {
|
|
35
|
+
return this.media.play();
|
|
36
|
+
}
|
|
37
|
+
async pause() {
|
|
38
|
+
return this.media.pause();
|
|
39
|
+
}
|
|
40
|
+
setMuted(e) {
|
|
41
|
+
this.media.muted = e;
|
|
42
|
+
}
|
|
43
|
+
setVolume(e) {
|
|
44
|
+
this.media.volume = e;
|
|
45
|
+
}
|
|
46
|
+
setCurrentTime(e) {
|
|
47
|
+
this.media.currentTime = e;
|
|
48
|
+
}
|
|
49
|
+
setPlaysInline(e) {
|
|
50
|
+
c(this.media, "playsinline", e);
|
|
51
|
+
}
|
|
52
|
+
async loadSource({ src: e, type: t }, a) {
|
|
53
|
+
this.media.preload = a || "", $(e) ? (this.removeSource(), this.media.srcObject = e) : (this.media.srcObject = null, M(e) ? t !== "?" ? this.appendSource({ src: e, type: t }) : (this.removeSource(), this.media.src = n(this, r, u).call(this, e)) : (this.removeSource(), this.media.src = window.URL.createObjectURL(e))), this.media.load(), this.currentSrc = { src: e, type: t };
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Append source so it works when requesting AirPlay since hls.js will remove it.
|
|
57
|
+
*/
|
|
58
|
+
appendSource(e, t) {
|
|
59
|
+
const a = this.media.querySelector("source[data-vds]"), s = a ?? document.createElement("source");
|
|
60
|
+
c(s, "src", n(this, r, u).call(this, e.src)), c(s, "type", e.type !== "?" ? e.type : t), c(s, "data-vds", ""), a || this.media.append(s);
|
|
61
|
+
}
|
|
62
|
+
removeSource() {
|
|
63
|
+
var e;
|
|
64
|
+
(e = this.media.querySelector("source[data-vds]")) == null || e.remove();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
r = new WeakSet(), u = function(e) {
|
|
68
|
+
const { clipStartTime: t, clipEndTime: a } = this.ctx.$state, s = t(), o = a();
|
|
69
|
+
return s > 0 && o > 0 ? `${e}#t=${s},${o}` : s > 0 ? `${e}#t=${s}` : o > 0 ? `${e}#t=0,${o}` : e;
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
g as H
|
|
73
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var o = (s, t, e) => t in s ? n(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var i = (s, t, e) => o(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { s as c, H as u, r as P, V as p, F as d, P as h, t as l, u as f, v as V, w as y, o as I } from "./vidstack-CjqtyAQk.js";
|
|
5
|
+
import { H as v } from "./vidstack-html-CPvoK3qB.js";
|
|
6
|
+
class m extends v {
|
|
7
|
+
constructor(e, r) {
|
|
8
|
+
super(e, r);
|
|
9
|
+
i(this, "$$PROVIDER_TYPE", "VIDEO");
|
|
10
|
+
i(this, "airPlay");
|
|
11
|
+
i(this, "fullscreen");
|
|
12
|
+
i(this, "pictureInPicture");
|
|
13
|
+
c(() => {
|
|
14
|
+
if (this.airPlay = new u(e, r), P(e)) {
|
|
15
|
+
const a = new p(e, r);
|
|
16
|
+
this.fullscreen = new d(a), this.pictureInPicture = new h(a);
|
|
17
|
+
} else l(e) && (this.pictureInPicture = new f(e, r));
|
|
18
|
+
}, this.scope);
|
|
19
|
+
}
|
|
20
|
+
get type() {
|
|
21
|
+
return "video";
|
|
22
|
+
}
|
|
23
|
+
setup() {
|
|
24
|
+
super.setup(), V(this.video) && new y(this.video, this.ctx), this.ctx.textRenderers.attachVideo(this.video), I(() => {
|
|
25
|
+
this.ctx.textRenderers.attachVideo(null);
|
|
26
|
+
}), this.type === "video" && this.ctx.notify("provider-setup", this);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The native HTML `<video>` element.
|
|
30
|
+
*
|
|
31
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement}
|
|
32
|
+
*/
|
|
33
|
+
get video() {
|
|
34
|
+
return this.media;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
m as VideoProvider
|
|
39
|
+
};
|