@instructure/studio-player 1.2.3 → 1.2.4

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.
@@ -6,8 +6,8 @@ import { createContext as Ya, useContext as Ka, useState as _r, useCallback as Z
6
6
  import { initReactI18next as zl, useTranslation as Hn } from "react-i18next";
7
7
  import Wl from "i18next";
8
8
  import Ql from "i18next-resources-to-backend";
9
- import { S as Dr, U as Xl, W as $l, X as Jl, Z as ia, _ as Wn, $ as ec, a0 as tc, a1 as nc, a2 as rc, a3 as ic, a4 as ac, a5 as oc, a6 as ra, a7 as Va, a8 as sc, a9 as Ps, aa as uc, ab as xs, ac as Fs, ad as lc, ae as cc, af as fc, ag as Ss, ah as As, ai as dc, aj as qa, ak as gc, al as hc } from "./vidstack-VlpmInuO.js";
10
- import { am as Th } from "./vidstack-VlpmInuO.js";
9
+ import { S as Dr, U as Xl, W as $l, X as Jl, Z as ia, _ as Wn, $ as ec, a0 as tc, a1 as nc, a2 as rc, a3 as ic, a4 as ac, a5 as oc, a6 as ra, a7 as Va, a8 as sc, a9 as Ps, aa as uc, ab as xs, ac as Fs, ad as lc, ae as cc, af as fc, ag as Ss, ah as As, ai as dc, aj as qa, ak as gc, al as hc } from "./vidstack-DFQqpjQI.js";
10
+ import { am as Th } from "./vidstack-DFQqpjQI.js";
11
11
  import { useFloating as aa, autoUpdate as oa, shift as za, offset as Wa, arrow as Qa, useMergeRefs as Xa, useListNavigation as ks, useDismiss as $a, useInteractions as Ja, FloatingFocusManager as eo, FloatingArrow as to, detectOverflow as mc } from "@floating-ui/react";
12
12
  var Ha = { exports: {} };
13
13
  /*! For license information please see dash.all.min.js.LICENSE.txt */
@@ -20561,7 +20561,7 @@ function _h({
20561
20561
  children: /* @__PURE__ */ ve(Ec, { contextValue: ue, children: /* @__PURE__ */ ln(
20562
20562
  gc,
20563
20563
  {
20564
- "data-version": "1.2.3",
20564
+ "data-version": "1.2.4",
20565
20565
  crossOrigin: P,
20566
20566
  storage: x ? null : Q,
20567
20567
  title: te,
@@ -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-DsFCd0_r.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 = () => {
@@ -2994,7 +2994,7 @@ class G$ {
2994
2994
  return "audio";
2995
2995
  }
2996
2996
  async load(e) {
2997
- return new (await import("./vidstack-audio-DrAqFIY8.js")).AudioProvider(this.target, e);
2997
+ return new (await import("./vidstack-audio-C8BDTOBT.js")).AudioProvider(this.target, e);
2998
2998
  }
2999
2999
  }
3000
3000
  class Du {
@@ -3009,7 +3009,7 @@ class Du {
3009
3009
  return "video";
3010
3010
  }
3011
3011
  async load(e) {
3012
- return new (await import("./vidstack-video-DLP1iFR6.js")).VideoProvider(this.target, e);
3012
+ return new (await import("./vidstack-video-detMAOO-.js")).VideoProvider(this.target, e);
3013
3013
  }
3014
3014
  }
3015
3015
  const Mh = class Mh extends Du {
@@ -3021,7 +3021,7 @@ const Mh = class Mh extends Du {
3021
3021
  return Mh.supported && ca(t);
3022
3022
  }
3023
3023
  async load(t) {
3024
- return new (await import("./vidstack-hls-C8R0nR7X.js")).HLSProvider(this.target, t);
3024
+ return new (await import("./vidstack-hls-DOGlQvLk.js")).HLSProvider(this.target, t);
3025
3025
  }
3026
3026
  };
3027
3027
  y(Mh, "supported", Mu());
@@ -3845,7 +3845,7 @@ const qh = class qh extends Du {
3845
3845
  return qh.supported && Lu(t);
3846
3846
  }
3847
3847
  async load(t) {
3848
- return new (await import("./vidstack-dash-kRwnnSOY.js")).DASHProvider(this.target, t);
3848
+ return new (await import("./vidstack-dash-CcyKz4DV.js")).DASHProvider(this.target, t);
3849
3849
  }
3850
3850
  };
3851
3851
  y(qh, "supported", FT());
@@ -3871,10 +3871,10 @@ class av {
3871
3871
  return "video";
3872
3872
  }
3873
3873
  async load(e) {
3874
- return new (await import("./vidstack-vimeo-BQZL281S.js").then((t) => t.p)).VimeoProvider(this.target, e);
3874
+ return new (await import("./vidstack-vimeo-BIMDkpy7.js").then((t) => t.p)).VimeoProvider(this.target, e);
3875
3875
  }
3876
3876
  async loadPoster(e, t, i) {
3877
- const { resolveVimeoVideoId: r, getVimeoVideoInfo: o } = await import("./vidstack-vimeo-BQZL281S.js").then((d) => d.u);
3877
+ const { resolveVimeoVideoId: r, getVimeoVideoInfo: o } = await import("./vidstack-vimeo-BIMDkpy7.js").then((d) => d.u);
3878
3878
  if (!R(e.src)) return null;
3879
3879
  const { videoId: h, hash: l } = r(e.src);
3880
3880
  return h ? o(h, i, l).then((d) => d ? d.poster : null) : null;
@@ -3905,10 +3905,10 @@ class ov {
3905
3905
  return "video";
3906
3906
  }
3907
3907
  async load(e) {
3908
- return new (await import("./vidstack-youtube-y0agPfx8.js").then((t) => t.p)).YouTubeProvider(this.target, e);
3908
+ return new (await import("./vidstack-youtube-ICZwIt3U.js").then((t) => t.p)).YouTubeProvider(this.target, e);
3909
3909
  }
3910
3910
  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);
3911
+ const { findYouTubePoster: r, resolveYouTubeVideoId: o } = await import("./vidstack-youtube-ICZwIt3U.js").then((l) => l.u), h = R(e.src) && o(e.src);
3912
3912
  return h ? r(h, i) : null;
3913
3913
  }
3914
3914
  }
@@ -9543,7 +9543,7 @@ class Mk {
9543
9543
  async load(e) {
9544
9544
  if (!s(this, Rs))
9545
9545
  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);
9546
+ return new (await import("./vidstack-google-cast-DsFCd0_r.js").then((t) => t.p)).GoogleCastProvider(s(this, Rs), e);
9547
9547
  }
9548
9548
  }
9549
9549
  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-DFQqpjQI.js";
5
+ import { H as u } from "./vidstack-html-C4pIs4NF.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-DFQqpjQI.js";
9
+ import { VideoProvider as v } from "./vidstack-video-detMAOO-.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-DFQqpjQI.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-DFQqpjQI.js";
9
+ import { VideoProvider as v } from "./vidstack-video-detMAOO-.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-DFQqpjQI.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-DFQqpjQI.js";
5
+ import { H as v } from "./vidstack-html-C4pIs4NF.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-DFQqpjQI.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;
@@ -5,7 +5,7 @@ var z = (a) => {
5
5
  var H = (a, o, e) => o in a ? G(a, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[o] = e;
6
6
  var w = (a, o, e) => H(a, typeof o != "symbol" ? o + "" : o, e), E = (a, o, e) => o.has(a) || z("Cannot " + e);
7
7
  var s = (a, o, e) => (E(a, o, "read from private field"), e ? e.call(a) : o.get(a)), p = (a, o, e) => o.has(a) ? z("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(a) : o.set(a, e), l = (a, o, e, t) => (E(a, o, "write to private field"), t ? t.call(a, e) : o.set(a, e), e), r = (a, o, e) => (E(a, o, "access private method"), e);
8
- import { E as Q, d as W, x as X, p as Z, y as ee, a as te, J as se, z as ie, Y as k, K as ae, M as _, T as j, O as ne } from "./vidstack-VlpmInuO.js";
8
+ import { E as Q, d as W, x as X, p as Z, y as ee, a as te, J as se, z as ie, Y as k, K as ae, M as _, T as j, O as ne } from "./vidstack-DFQqpjQI.js";
9
9
  const oe = /(?:youtu\.be|youtube|youtube\.com|youtube-nocookie\.com)(?:\/shorts)?\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|)((?:\w|-){11})/, C = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
10
10
  function B(a) {
11
11
  var o;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/studio-player",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "private": false,
5
5
  "description": "Next generation media player for Instructure",
6
6
  "module": "./dist/studio-player.es.js",