@instructure/studio-player 1.2.3 → 1.3.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/dist/types.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import { ReactSVGElement } from 'react';
2
2
  export type { VideoMimeType, MediaRemoteControl, MediaPlayerInstance, MediaCrossOrigin, } from '@vidstack/react';
3
+ export type CaptionSourceType = 'youtube' | 'standard';
3
4
  export type CaptionMetaData = {
4
- src: string;
5
+ src?: string;
5
6
  label: string;
6
7
  language: string;
7
8
  type: 'vtt' | 'srt';
9
+ sourceType?: CaptionSourceType;
8
10
  };
9
11
  export type CaptionOffsetOverride = {
10
12
  top: string;
@@ -7,7 +7,7 @@ var y = (n, e, t) => Qw(n, typeof e != "symbol" ? e + "" : e, t), cl = (n, e, t)
7
7
  var s = (n, e, t) => (cl(n, e, "read from private field"), t ? t.call(n) : e.get(n)), c = (n, e, t) => e.has(n) ? zu("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), u = (n, e, t, i) => (cl(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t), a = (n, e, t) => (cl(n, e, "access private method"), t);
8
8
  import { jsx as N, Fragment as zw, jsxs as Jr } from "react/jsx-runtime";
9
9
  import * as $ from "react";
10
- import { g as Yw, a as Xw, i as Yu, h as Jw, b as Zw, c as tT, d as eT, e as iT, f as sT } from "./vidstack-google-cast-DkNpqlWe.js";
10
+ import { g as Yw, a as Xw, i as Yu, h as Jw, b as Zw, c as tT, d as eT, e as iT, f as sT } from "./vidstack-google-cast-D3ys_R-E.js";
11
11
  const li = Symbol(0);
12
12
  let mh = !1, $l = !1, Qe = null, Qn = null, Ae = null, ye = 0, jn = [], $u = {};
13
13
  const nT = () => {
@@ -1058,6 +1058,7 @@ class Ns extends Gd {
1058
1058
  y(this, "language", "");
1059
1059
  y(this, "kind");
1060
1060
  y(this, "default", !1);
1061
+ y(this, "sourceType");
1061
1062
  c(this, Ca, !1);
1062
1063
  c(this, Si, 0);
1063
1064
  c(this, Xs, "disabled");
@@ -2808,10 +2809,7 @@ nr = new WeakMap(), Ci = new WeakMap(), Oa = new WeakMap(), rr = new WeakMap(),
2808
2809
  }, i));
2809
2810
  }, Nl = function(t, i) {
2810
2811
  var r;
2811
- this.$state.controlsVisible() !== t && (this.$state.controlsVisible.set(t), !t && document.activeElement && ((r = this.el) != null && r.contains(document.activeElement)) && (u(this, rs, document.activeElement), requestAnimationFrame(() => {
2812
- var o;
2813
- (o = this.el) == null || o.focus({ preventScroll: !0 });
2814
- })), this.dispatch("controls-change", {
2812
+ this.$state.controlsVisible() !== t && (this.$state.controlsVisible.set(t), !t && document.activeElement && ((r = this.el) != null && r.contains(document.activeElement)) && u(this, rs, document.activeElement), this.dispatch("controls-change", {
2815
2813
  detail: t,
2816
2814
  trigger: i
2817
2815
  }));
@@ -2994,7 +2992,7 @@ class G$ {
2994
2992
  return "audio";
2995
2993
  }
2996
2994
  async load(e) {
2997
- return new (await import("./vidstack-audio-DrAqFIY8.js")).AudioProvider(this.target, e);
2995
+ return new (await import("./vidstack-audio-Bq1pJf-F.js")).AudioProvider(this.target, e);
2998
2996
  }
2999
2997
  }
3000
2998
  class Du {
@@ -3009,7 +3007,7 @@ class Du {
3009
3007
  return "video";
3010
3008
  }
3011
3009
  async load(e) {
3012
- return new (await import("./vidstack-video-DLP1iFR6.js")).VideoProvider(this.target, e);
3010
+ return new (await import("./vidstack-video-CqIaj_35.js")).VideoProvider(this.target, e);
3013
3011
  }
3014
3012
  }
3015
3013
  const Mh = class Mh extends Du {
@@ -3021,7 +3019,7 @@ const Mh = class Mh extends Du {
3021
3019
  return Mh.supported && ca(t);
3022
3020
  }
3023
3021
  async load(t) {
3024
- return new (await import("./vidstack-hls-C8R0nR7X.js")).HLSProvider(this.target, t);
3022
+ return new (await import("./vidstack-hls-BytcbBHn.js")).HLSProvider(this.target, t);
3025
3023
  }
3026
3024
  };
3027
3025
  y(Mh, "supported", Mu());
@@ -3845,7 +3843,7 @@ const qh = class qh extends Du {
3845
3843
  return qh.supported && Lu(t);
3846
3844
  }
3847
3845
  async load(t) {
3848
- return new (await import("./vidstack-dash-kRwnnSOY.js")).DASHProvider(this.target, t);
3846
+ return new (await import("./vidstack-dash-Bi8vMZlt.js")).DASHProvider(this.target, t);
3849
3847
  }
3850
3848
  };
3851
3849
  y(qh, "supported", FT());
@@ -3871,10 +3869,10 @@ class av {
3871
3869
  return "video";
3872
3870
  }
3873
3871
  async load(e) {
3874
- return new (await import("./vidstack-vimeo-BQZL281S.js").then((t) => t.p)).VimeoProvider(this.target, e);
3872
+ return new (await import("./vidstack-vimeo-B9SDrle5.js").then((t) => t.p)).VimeoProvider(this.target, e);
3875
3873
  }
3876
3874
  async loadPoster(e, t, i) {
3877
- const { resolveVimeoVideoId: r, getVimeoVideoInfo: o } = await import("./vidstack-vimeo-BQZL281S.js").then((d) => d.u);
3875
+ const { resolveVimeoVideoId: r, getVimeoVideoInfo: o } = await import("./vidstack-vimeo-B9SDrle5.js").then((d) => d.u);
3878
3876
  if (!R(e.src)) return null;
3879
3877
  const { videoId: h, hash: l } = r(e.src);
3880
3878
  return h ? o(h, i, l).then((d) => d ? d.poster : null) : null;
@@ -3905,10 +3903,10 @@ class ov {
3905
3903
  return "video";
3906
3904
  }
3907
3905
  async load(e) {
3908
- return new (await import("./vidstack-youtube-y0agPfx8.js").then((t) => t.p)).YouTubeProvider(this.target, e);
3906
+ return new (await import("./vidstack-youtube-Dgmpq-MT.js").then((t) => t.p)).YouTubeProvider(this.target, e);
3909
3907
  }
3910
3908
  async loadPoster(e, t, i) {
3911
- const { findYouTubePoster: r, resolveYouTubeVideoId: o } = await import("./vidstack-youtube-y0agPfx8.js").then((l) => l.u), h = R(e.src) && o(e.src);
3909
+ const { findYouTubePoster: r, resolveYouTubeVideoId: o } = await import("./vidstack-youtube-Dgmpq-MT.js").then((l) => l.u), h = R(e.src) && o(e.src);
3912
3910
  return h ? r(h, i) : null;
3913
3911
  }
3914
3912
  }
@@ -9543,7 +9541,7 @@ class Mk {
9543
9541
  async load(e) {
9544
9542
  if (!s(this, Rs))
9545
9543
  throw Error("[vidstack] google cast player was not initialized");
9546
- return new (await import("./vidstack-google-cast-DkNpqlWe.js").then((t) => t.p)).GoogleCastProvider(s(this, Rs), e);
9544
+ return new (await import("./vidstack-google-cast-D3ys_R-E.js").then((t) => t.p)).GoogleCastProvider(s(this, Rs), e);
9547
9545
  }
9548
9546
  }
9549
9547
  Rs = new WeakMap(), Yt = new WeakSet(), _w = async function(e) {
@@ -1,8 +1,8 @@
1
1
  var o = Object.defineProperty;
2
2
  var a = (i, e, t) => e in i ? o(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
3
  var r = (i, e, t) => a(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { s as p, H as d } from "./vidstack-VlpmInuO.js";
5
- import { H as u } from "./vidstack-html-8X1ahFwj.js";
4
+ import { s as p, H as d } from "./vidstack-B8iikcPv.js";
5
+ import { H as u } from "./vidstack-html-BpBnqulz.js";
6
6
  class n extends u {
7
7
  constructor(t, s) {
8
8
  super(t, s);
@@ -5,8 +5,8 @@ var u = (e) => {
5
5
  var g = (e, s, t) => s in e ? S(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
6
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
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-VlpmInuO.js";
9
- import { VideoProvider as v } from "./vidstack-video-DLP1iFR6.js";
8
+ import { D as f, i as m, a as l, p as y, b as D, c as x } from "./vidstack-B8iikcPv.js";
9
+ import { VideoProvider as v } from "./vidstack-video-CqIaj_35.js";
10
10
  const $ = "https://cdn.jsdelivr.net";
11
11
  var c, r, o;
12
12
  class b extends v {
@@ -5,7 +5,7 @@ var U = (r) => {
5
5
  var ct = (r, t, s) => t in r ? ht(r, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[t] = s;
6
6
  var _ = (r, t, s) => ct(r, typeof t != "symbol" ? t + "" : t, s), D = (r, t, s) => t.has(r) || U("Cannot " + s);
7
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-VlpmInuO.js";
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-B8iikcPv.js";
9
9
  function Tt() {
10
10
  return "https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";
11
11
  }
@@ -5,8 +5,8 @@ var u = (e) => {
5
5
  var g = (e, s, t) => s in e ? S(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
6
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
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-VlpmInuO.js";
9
- import { VideoProvider as v } from "./vidstack-video-DLP1iFR6.js";
8
+ import { g as f, h as m, a as l, p as y, j as L, c as x } from "./vidstack-B8iikcPv.js";
9
+ import { VideoProvider as v } from "./vidstack-video-CqIaj_35.js";
10
10
  const $ = "https://cdn.jsdelivr.net";
11
11
  var c, r, o;
12
12
  class j extends v {
@@ -6,7 +6,7 @@ var p = (i, e, t) => e in i ? l(i, e, { enumerable: !0, configurable: !0, writab
6
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
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
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-VlpmInuO.js";
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-B8iikcPv.js";
10
10
  var r, u;
11
11
  class g {
12
12
  constructor(e, t) {
@@ -1,8 +1,8 @@
1
1
  var n = Object.defineProperty;
2
2
  var o = (s, t, e) => t in s ? n(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
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-VlpmInuO.js";
5
- import { H as v } from "./vidstack-html-8X1ahFwj.js";
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-B8iikcPv.js";
5
+ import { H as v } from "./vidstack-html-BpBnqulz.js";
6
6
  class m extends v {
7
7
  constructor(e, r) {
8
8
  super(e, r);
@@ -1,42 +1,42 @@
1
1
  var me = Object.defineProperty;
2
- var W = (r) => {
3
- throw TypeError(r);
2
+ var W = (a) => {
3
+ throw TypeError(a);
4
4
  };
5
- var ke = (r, c, e) => c in r ? me(r, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[c] = e;
6
- var b = (r, c, e) => ke(r, typeof c != "symbol" ? c + "" : c, e), j = (r, c, e) => c.has(r) || W("Cannot " + e);
7
- var s = (r, c, e) => (j(r, c, "read from private field"), e ? e.call(r) : c.get(r)), d = (r, c, e) => c.has(r) ? W("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(r) : c.set(r, e), f = (r, c, e, t) => (j(r, c, "write to private field"), t ? t.call(r, e) : c.set(r, e), e), h = (r, c, e) => (j(r, c, "access private method"), e);
8
- import { E as ve, d as we, x as Y, T as g, R as Te, p as Pe, y as x, c as A, a as Ce, z as G, L as M, l as $e, B as ge, C as Ee, I as Re, Q as J } from "./vidstack-VlpmInuO.js";
5
+ var ke = (a, c, e) => c in a ? me(a, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[c] = e;
6
+ var b = (a, c, e) => ke(a, typeof c != "symbol" ? c + "" : c, e), j = (a, c, e) => c.has(a) || W("Cannot " + e);
7
+ var s = (a, c, e) => (j(a, c, "read from private field"), e ? e.call(a) : c.get(a)), d = (a, c, e) => c.has(a) ? W("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(a) : c.set(a, e), f = (a, c, e, t) => (j(a, c, "write to private field"), t ? t.call(a, e) : c.set(a, e), e), h = (a, c, e) => (j(a, c, "access private method"), e);
8
+ import { E as ve, d as we, x as Y, T as g, R as Te, p as Pe, y as x, c as A, a as Ce, z as G, L as M, l as $e, B as ge, C as Ee, I as Re, Q as J } from "./vidstack-B8iikcPv.js";
9
9
  const Ve = /(?:https:\/\/)?(?:player\.)?vimeo(?:\.com)?\/(?:video\/)?(\d+)(?:(?:\?hash=|\?h=|\/)(.*))?/, O = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
10
- function K(r) {
11
- const c = r.match(Ve);
10
+ function K(a) {
11
+ const c = a.match(Ve);
12
12
  return { videoId: c == null ? void 0 : c[1], hash: c == null ? void 0 : c[2] };
13
13
  }
14
- async function X(r, c, e) {
15
- if (O.has(r)) return O.get(r);
16
- if (_.has(r)) return _.get(r);
17
- let t = `https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/${r}`;
14
+ async function X(a, c, e) {
15
+ if (O.has(a)) return O.get(a);
16
+ if (_.has(a)) return _.get(a);
17
+ let t = `https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/${a}`;
18
18
  e && (t = t.concat(`?h=${e}`));
19
19
  const n = window.fetch(t, {
20
20
  mode: "cors",
21
21
  signal: c.signal
22
- }).then((a) => a.json()).then((a) => {
22
+ }).then((r) => r.json()).then((r) => {
23
23
  var N, U;
24
- const l = /vimeocdn.com\/video\/(.*)?_/, p = (U = (N = a == null ? void 0 : a.thumbnail_url) == null ? void 0 : N.match(l)) == null ? void 0 : U[1], C = p ? `https://i.vimeocdn.com/video/${p}_1920x1080.webp` : "", $ = {
25
- title: (a == null ? void 0 : a.title) ?? "",
26
- duration: (a == null ? void 0 : a.duration) ?? 0,
24
+ const l = /vimeocdn.com\/video\/(.*)?_/, p = (U = (N = r == null ? void 0 : r.thumbnail_url) == null ? void 0 : N.match(l)) == null ? void 0 : U[1], C = p ? `https://i.vimeocdn.com/video/${p}_1920x1080.webp` : "", $ = {
25
+ title: (r == null ? void 0 : r.title) ?? "",
26
+ duration: (r == null ? void 0 : r.duration) ?? 0,
27
27
  poster: C,
28
- pro: a.account_type !== "basic"
28
+ pro: !0
29
29
  };
30
- return O.set(r, $), $;
31
- }).finally(() => _.delete(r));
32
- return _.set(r, n), n;
30
+ return O.set(a, $), $;
31
+ }).finally(() => _.delete(a));
32
+ return _.set(a, n), n;
33
33
  }
34
34
  const Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
35
35
  __proto__: null,
36
36
  getVimeoVideoInfo: X,
37
37
  resolveVimeoVideoId: K
38
38
  }, Symbol.toStringTag, { value: "Module" }));
39
- var o, y, m, w, E, S, k, R, I, T, v, V, i, Z, H, ee, te, P, se, ie, ne, Q, oe, he, ae, re, ce, q, ue, le, fe, L, de, F, pe, B, ye, be, u, D, z;
39
+ var o, y, m, w, E, S, k, R, I, T, v, V, i, Z, H, ee, te, P, se, ie, ne, Q, oe, he, re, ae, ce, q, ue, le, fe, L, de, F, pe, B, ye, be, u, D, z;
40
40
  class Se extends ve {
41
41
  constructor(e, t) {
42
42
  super(e);
@@ -138,15 +138,15 @@ class Se extends ve {
138
138
  return "https://player.vimeo.com";
139
139
  }
140
140
  buildParams() {
141
- const { keyDisabled: e } = s(this, o).$props, { playsInline: t, nativeControls: n } = s(this, o).$state, a = n();
141
+ const { keyDisabled: e } = s(this, o).$props, { playsInline: t, nativeControls: n } = s(this, o).$state, r = n();
142
142
  return {
143
143
  title: this.title,
144
144
  byline: this.byline,
145
145
  color: this.color,
146
146
  portrait: this.portrait,
147
- controls: a,
147
+ controls: r,
148
148
  h: this.hash,
149
- keyboard: a && !e(),
149
+ keyboard: r && !e(),
150
150
  transparent: !0,
151
151
  playsinline: t(),
152
152
  dnt: !this.cookies
@@ -170,9 +170,9 @@ o = new WeakMap(), y = new WeakMap(), m = new WeakMap(), w = new WeakMap(), E =
170
170
  const e = s(this, y).call(this);
171
171
  if (!e) return;
172
172
  const t = G(), n = new AbortController();
173
- return f(this, V, t), X(e, n, s(this, w)).then((a) => {
174
- t.resolve(a);
175
- }).catch((a) => {
173
+ return f(this, V, t), X(e, n, s(this, w)).then((r) => {
174
+ t.resolve(r);
175
+ }).catch((r) => {
176
176
  t.reject();
177
177
  }), () => {
178
178
  t.reject(), n.abort();
@@ -183,17 +183,17 @@ o = new WeakMap(), y = new WeakMap(), m = new WeakMap(), w = new WeakMap(), E =
183
183
  return $e(n, "change", () => {
184
184
  var l;
185
185
  if (n.auto) return;
186
- const a = (l = n.selected) == null ? void 0 : l.id;
187
- a && h(this, i, u).call(this, "setQuality", a);
186
+ const r = (l = n.selected) == null ? void 0 : l.id;
187
+ r && h(this, i, u).call(this, "setQuality", r);
188
188
  });
189
189
  }, te = function() {
190
190
  h(this, i, u).call(this, "getCurrentTime");
191
191
  }, P = new WeakMap(), se = function(e, t) {
192
192
  if (s(this, P) && e === 0) return;
193
- const { realCurrentTime: n, paused: a, bufferedEnd: l, seekableEnd: p, live: C } = s(this, o).$state;
193
+ const { realCurrentTime: n, paused: r, bufferedEnd: l, seekableEnd: p, live: C } = s(this, o).$state;
194
194
  if (n() === e) return;
195
195
  const $ = n();
196
- s(this, o).notify("time-change", e, t), Math.abs($ - e) > 1.5 && (s(this, o).notify("seeking", e, t), !a() && l() < e && s(this, o).notify("waiting", void 0, t)), !C() && p() - e < 0.01 && (s(this, o).notify("end", void 0, t), f(this, P, !0), setTimeout(() => {
196
+ s(this, o).notify("time-change", e, t), Math.abs($ - e) > 1.5 && (s(this, o).notify("seeking", e, t), !r() && l() < e && s(this, o).notify("waiting", void 0, t)), !C() && p() - e < 0.01 && (s(this, o).notify("end", void 0, t), f(this, P, !0), setTimeout(() => {
197
197
  f(this, P, !1);
198
198
  }, 500));
199
199
  }, ie = function(e, t) {
@@ -201,24 +201,24 @@ o = new WeakMap(), y = new WeakMap(), m = new WeakMap(), w = new WeakMap(), E =
201
201
  }, ne = function(e) {
202
202
  var n;
203
203
  const t = s(this, y).call(this);
204
- (n = s(this, V)) == null || n.promise.then((a) => {
205
- if (!a) return;
206
- const { title: l, poster: p, duration: C, pro: $ } = a;
204
+ (n = s(this, V)) == null || n.promise.then((r) => {
205
+ if (!r) return;
206
+ const { title: l, poster: p, duration: C, pro: $ } = r;
207
207
  s(this, m).set($), s(this, o).notify("title-change", l, e), s(this, o).notify("poster-change", p, e), s(this, o).notify("duration-change", C, e), h(this, i, Q).call(this, C, e);
208
208
  }).catch(() => {
209
209
  t === s(this, y).call(this) && (h(this, i, u).call(this, "getVideoTitle"), h(this, i, u).call(this, "getDuration"));
210
210
  });
211
211
  }, Q = function(e, t) {
212
- const { nativeControls: n } = s(this, o).$state, a = n();
212
+ const { nativeControls: n } = s(this, o).$state, r = n();
213
213
  f(this, k, new g(0, e));
214
214
  const l = {
215
215
  buffered: new g(0, 0),
216
216
  seekable: s(this, k),
217
217
  duration: e
218
218
  };
219
- s(this, o).delegate.ready(l, t), a || h(this, i, u).call(this, "_hideOverlay"), h(this, i, u).call(this, "getQualities"), h(this, i, u).call(this, "getChapters");
219
+ s(this, o).delegate.ready(l, t), r || h(this, i, u).call(this, "_hideOverlay"), h(this, i, u).call(this, "getQualities"), h(this, i, u).call(this, "getChapters");
220
220
  }, oe = function(e, t, n) {
221
- var a;
221
+ var r;
222
222
  switch (e) {
223
223
  case "getVideoTitle":
224
224
  const l = t;
@@ -247,13 +247,13 @@ o = new WeakMap(), y = new WeakMap(), m = new WeakMap(), w = new WeakMap(), E =
247
247
  h(this, i, pe).call(this, t, n);
248
248
  break;
249
249
  }
250
- (a = h(this, i, z).call(this, e)) == null || a.resolve();
250
+ (r = h(this, i, z).call(this, e)) == null || r.resolve();
251
251
  }, he = function() {
252
252
  for (const e of Ee)
253
253
  h(this, i, u).call(this, "addEventListener", e);
254
- }, ae = function(e) {
255
- s(this, R).stop(), s(this, o).notify("pause", void 0, e);
256
254
  }, re = function(e) {
255
+ s(this, R).stop(), s(this, o).notify("pause", void 0, e);
256
+ }, ae = function(e) {
257
257
  s(this, R).start(), s(this, o).notify("play", void 0, e);
258
258
  }, ce = function(e) {
259
259
  const { paused: t } = s(this, o).$state;
@@ -273,8 +273,8 @@ o = new WeakMap(), y = new WeakMap(), m = new WeakMap(), w = new WeakMap(), E =
273
273
  const { paused: t } = s(this, o).$state;
274
274
  t() && s(this, o).notify("play", void 0, e), s(this, o).notify("waiting", void 0, e);
275
275
  }, L = function(e, t, n) {
276
- const a = { volume: e, muted: t };
277
- s(this, o).notify("volume-change", a, n);
276
+ const r = { volume: e, muted: t };
277
+ s(this, o).notify("volume-change", r, n);
278
278
  }, // #onTextTrackChange(track: VimeoTextTrack, trigger: Event) {
279
279
  // const textTrack = this.#ctx.textTracks.toArray().find((t) => t.language === track.language);
280
280
  // if (textTrack) textTrack.mode = track.mode;
@@ -304,8 +304,8 @@ de = function(e) {
304
304
  kind: "chapters",
305
305
  default: !0
306
306
  }), { seekableEnd: n } = s(this, o).$state;
307
- for (let a = 0; a < e.length; a++) {
308
- const l = e[a], p = e[a + 1];
307
+ for (let r = 0; r < e.length; r++) {
308
+ const l = e[r], p = e[r + 1];
309
309
  t.addCue(
310
310
  new window.VTTCue(
311
311
  l.startTime,
@@ -321,12 +321,12 @@ de = function(e) {
321
321
  s(this, o).qualities[J.enableAuto] = e.some((n) => n.id === "auto") ? () => h(this, i, u).call(this, "setQuality", "auto") : void 0;
322
322
  for (const n of e) {
323
323
  if (n.id === "auto") continue;
324
- const a = +n.id.slice(0, -1);
325
- isNaN(a) || s(this, o).qualities[M.add](
324
+ const r = +n.id.slice(0, -1);
325
+ isNaN(r) || s(this, o).qualities[M.add](
326
326
  {
327
327
  id: n.id,
328
- width: a * (16 / 9),
329
- height: a,
328
+ width: r * (16 / 9),
329
+ height: r,
330
330
  codec: "avc1,h.264",
331
331
  bitrate: -1
332
332
  },
@@ -336,8 +336,8 @@ de = function(e) {
336
336
  h(this, i, B).call(this, e.find((n) => n.active), t);
337
337
  }, B = function({ id: e } = {}, t) {
338
338
  if (!e) return;
339
- const n = e === "auto", a = s(this, o).qualities.getById(e);
340
- n ? (s(this, o).qualities[J.setAuto](n, t), s(this, o).qualities[M.select](void 0, !0, t)) : s(this, o).qualities[M.select](a ?? void 0, !0, t);
339
+ const n = e === "auto", r = s(this, o).qualities.getById(e);
340
+ n ? (s(this, o).qualities[J.setAuto](n, t), s(this, o).qualities[M.select](void 0, !0, t)) : s(this, o).qualities[M.select](r ?? void 0, !0, t);
341
341
  }, ye = function(e, t, n) {
342
342
  switch (e) {
343
343
  case "ready":
@@ -347,13 +347,13 @@ de = function(e) {
347
347
  h(this, i, ne).call(this, n);
348
348
  break;
349
349
  case "play":
350
- h(this, i, re).call(this, n);
350
+ h(this, i, ae).call(this, n);
351
351
  break;
352
352
  case "playProgress":
353
353
  h(this, i, ce).call(this, n);
354
354
  break;
355
355
  case "pause":
356
- h(this, i, ae).call(this, n);
356
+ h(this, i, re).call(this, n);
357
357
  break;
358
358
  case "loadProgress":
359
359
  h(this, i, q).call(this, t.seconds, n);
@@ -402,11 +402,11 @@ de = function(e) {
402
402
  }
403
403
  }, be = function(e, t) {
404
404
  var l;
405
- const { message: n, method: a } = e;
406
- a === "setPlaybackRate" && s(this, m).set(!1), a && ((l = h(this, i, z).call(this, a)) == null || l.reject(n));
405
+ const { message: n, method: r } = e;
406
+ r === "setPlaybackRate" && s(this, m).set(!1), r && ((l = h(this, i, z).call(this, r)) == null || l.reject(n));
407
407
  }, u = async function(e, t) {
408
- let n = G(), a = s(this, v).get(e);
409
- return a || s(this, v).set(e, a = []), a.push(n), this.postMessage({
408
+ let n = G(), r = s(this, v).get(e);
409
+ return r || s(this, v).set(e, r = []), r.push(n), this.postMessage({
410
410
  method: e,
411
411
  value: t
412
412
  }), n.promise;