@banou/media-player 0.5.0 → 0.5.1

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 CHANGED
@@ -1,3 +1,6 @@
1
1
  ## Media Player
2
2
 
3
3
  A player that somehow manages to playback MKV files
4
+
5
+
6
+ Todo: add support for multi audio tracks
package/build/index.js CHANGED
@@ -161,15 +161,15 @@ function Nr() {
161
161
  throw Error();
162
162
  } catch (w) {
163
163
  var T = w.stack.trim().match(/\n( *(at )?)/);
164
- R = T && T[1] || "", he = -1 < w.stack.indexOf(`
164
+ R = T && T[1] || "", ve = -1 < w.stack.indexOf(`
165
165
  at`) ? " (<anonymous>)" : -1 < w.stack.indexOf("@") ? "@unknown:0:0" : "";
166
166
  }
167
167
  return `
168
- ` + R + i + he;
168
+ ` + R + i + ve;
169
169
  }
170
170
  function c(i, T) {
171
171
  if (!i || le) return "";
172
- var w = ve.get(i);
172
+ var w = Ee.get(i);
173
173
  if (w !== void 0) return w;
174
174
  le = !0, w = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
175
175
  var N = null;
@@ -227,10 +227,10 @@ function Nr() {
227
227
  "name",
228
228
  { value: "DetermineComponentFrameRoot" }
229
229
  );
230
- var P = G.DetermineComponentFrameRoot(), ae = P[0], Ee = P[1];
231
- if (ae && Ee) {
230
+ var P = G.DetermineComponentFrameRoot(), ae = P[0], ge = P[1];
231
+ if (ae && ge) {
232
232
  var q = ae.split(`
233
- `), me = Ee.split(`
233
+ `), me = ge.split(`
234
234
  `);
235
235
  for (P = D = 0; D < q.length && !q[D].includes(
236
236
  "DetermineComponentFrameRoot"
@@ -253,7 +253,7 @@ function Nr() {
253
253
  " at new ",
254
254
  " at "
255
255
  );
256
- return i.displayName && Pe.includes("<anonymous>") && (Pe = Pe.replace("<anonymous>", i.displayName)), typeof i == "function" && ve.set(i, Pe), Pe;
256
+ return i.displayName && Pe.includes("<anonymous>") && (Pe = Pe.replace("<anonymous>", i.displayName)), typeof i == "function" && Ee.set(i, Pe), Pe;
257
257
  }
258
258
  while (1 <= D && 0 <= P);
259
259
  break;
@@ -262,7 +262,7 @@ function Nr() {
262
262
  } finally {
263
263
  le = !1, oe.H = N, a(), Error.prepareStackTrace = w;
264
264
  }
265
- return q = (q = i ? i.displayName || i.name : "") ? s(q) : "", typeof i == "function" && ve.set(i, q), q;
265
+ return q = (q = i ? i.displayName || i.name : "") ? s(q) : "", typeof i == "function" && Ee.set(i, q), q;
266
266
  }
267
267
  function d(i) {
268
268
  if (i == null) return "";
@@ -324,7 +324,7 @@ function Nr() {
324
324
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
325
325
  )), i = this.props.ref, i !== void 0 ? i : null;
326
326
  }
327
- function S(i, T, w, N, G, D) {
327
+ function x(i, T, w, N, G, D) {
328
328
  return w = D.ref, i = {
329
329
  $$typeof: A,
330
330
  type: i,
@@ -386,13 +386,13 @@ React keys must be passed directly to JSX without using spread:
386
386
  }
387
387
  if (P = null, w !== void 0 && (r(w), P = "" + w), m(T) && (r(T.key), P = "" + T.key), "key" in T) {
388
388
  w = {};
389
- for (var Ee in T)
390
- Ee !== "key" && (w[Ee] = T[Ee]);
389
+ for (var ge in T)
390
+ ge !== "key" && (w[ge] = T[ge]);
391
391
  } else w = T;
392
392
  return P && g(
393
393
  w,
394
394
  typeof i == "function" ? i.displayName || i.name || "Unknown" : i
395
- ), S(i, P, D, G, p(), w);
395
+ ), x(i, P, D, G, p(), w);
396
396
  }
397
397
  function y(i, T) {
398
398
  if (typeof i == "object" && i && i.$$typeof !== fr) {
@@ -435,9 +435,9 @@ Check the render method of \`` + w + "`."), T || (i = e(i)) && (T = `
435
435
 
436
436
  Check the top-level render call using <` + i + ">."), T;
437
437
  }
438
- var x = mr, A = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), F = Symbol.for("react.profiler"), U = Symbol.for("react.consumer"), B = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), ue = Symbol.for("react.suspense_list"), Re = Symbol.for("react.memo"), Ae = Symbol.for("react.lazy"), dt = Symbol.for("react.offscreen"), Ye = Symbol.iterator, ze = Symbol.for("react.client.reference"), oe = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _e = Object.prototype.hasOwnProperty, ie = Object.assign, ft = Symbol.for("react.client.reference"), Ce = Array.isArray, fe = 0, Fe, Ve, We, Be, Ge, Xe, qe;
438
+ var S = mr, A = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), F = Symbol.for("react.profiler"), U = Symbol.for("react.consumer"), B = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), ue = Symbol.for("react.suspense_list"), Re = Symbol.for("react.memo"), Ae = Symbol.for("react.lazy"), dt = Symbol.for("react.offscreen"), Ye = Symbol.iterator, ze = Symbol.for("react.client.reference"), oe = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _e = Object.prototype.hasOwnProperty, ie = Object.assign, ft = Symbol.for("react.client.reference"), Ce = Array.isArray, fe = 0, Fe, Ve, We, Be, Ge, Xe, qe;
439
439
  n.__reactDisabledLog = !0;
440
- var R, he, le = !1, ve = new (typeof WeakMap == "function" ? WeakMap : Map)(), fr = Symbol.for("react.client.reference"), Tt, wt = {}, Rt = {}, At = {};
440
+ var R, ve, le = !1, Ee = new (typeof WeakMap == "function" ? WeakMap : Map)(), fr = Symbol.for("react.client.reference"), Tt, wt = {}, Rt = {}, At = {};
441
441
  Ne.Fragment = _, Ne.jsx = function(i, T, w, N, G) {
442
442
  return h(i, T, w, !1, N, G);
443
443
  }, Ne.jsxs = function(i, T, w, N, G) {
@@ -524,9 +524,9 @@ function Ze(e, t) {
524
524
  function Fr(e, t) {
525
525
  return e.map(t).join("");
526
526
  }
527
- var st = 1, ye = 1, Qt = 0, J = 0, j = 0, Te = "";
527
+ var st = 1, xe = 1, Qt = 0, J = 0, j = 0, Te = "";
528
528
  function ct(e, t, r, n, o, a, s) {
529
- return { value: e, root: t, parent: r, type: n, props: o, children: a, line: st, column: ye, length: s, return: "" };
529
+ return { value: e, root: t, parent: r, type: n, props: o, children: a, line: st, column: xe, length: s, return: "" };
530
530
  }
531
531
  function Me(e, t) {
532
532
  return jr(ct("", null, null, "", null, null, 0), e, { length: -e.length }, t);
@@ -535,10 +535,10 @@ function Vr() {
535
535
  return j;
536
536
  }
537
537
  function Wr() {
538
- return j = J > 0 ? W(Te, --J) : 0, ye--, j === 10 && (ye = 1, st--), j;
538
+ return j = J > 0 ? W(Te, --J) : 0, xe--, j === 10 && (xe = 1, st--), j;
539
539
  }
540
540
  function Z() {
541
- return j = J < Qt ? W(Te, J++) : 0, ye++, j === 10 && (ye = 1, st++), j;
541
+ return j = J < Qt ? W(Te, J++) : 0, xe++, j === 10 && (xe = 1, st++), j;
542
542
  }
543
543
  function ne() {
544
544
  return W(Te, J);
@@ -588,7 +588,7 @@ function Ue(e) {
588
588
  return 0;
589
589
  }
590
590
  function er(e) {
591
- return st = ye = 1, Qt = te(Te = e), J = 0, [];
591
+ return st = xe = 1, Qt = te(Te = e), J = 0, [];
592
592
  }
593
593
  function tr(e) {
594
594
  return Te = "", e;
@@ -643,7 +643,7 @@ function Hr(e) {
643
643
  return tr(rt("", null, null, null, [""], e = er(e), 0, [0], e));
644
644
  }
645
645
  function rt(e, t, r, n, o, a, s, c, d) {
646
- for (var p = 0, m = 0, g = s, b = 0, S = 0, h = 0, y = 1, u = 1, l = 1, v = 0, x = "", A = o, f = a, _ = n, C = x; u; )
646
+ for (var p = 0, m = 0, g = s, b = 0, x = 0, h = 0, y = 1, u = 1, l = 1, v = 0, S = "", A = o, f = a, _ = n, C = S; u; )
647
647
  switch (h = v, v = Z()) {
648
648
  // (
649
649
  case 40:
@@ -693,14 +693,14 @@ function rt(e, t, r, n, o, a, s, c, d) {
693
693
  u = 0;
694
694
  // ;
695
695
  case 59 + m:
696
- l == -1 && (C = I(C, /\f/g, "")), S > 0 && te(C) - g && Ze(S > 32 ? Mt(C + ";", n, r, g - 1) : Mt(I(C, " ", "") + ";", n, r, g - 2), d);
696
+ l == -1 && (C = I(C, /\f/g, "")), x > 0 && te(C) - g && Ze(x > 32 ? Mt(C + ";", n, r, g - 1) : Mt(I(C, " ", "") + ";", n, r, g - 2), d);
697
697
  break;
698
698
  // @ ;
699
699
  case 59:
700
700
  C += ";";
701
701
  // { rule/at-rule
702
702
  default:
703
- if (Ze(_ = Nt(C, t, r, p, m, o, c, x, A = [], f = [], g), a), v === 123)
703
+ if (Ze(_ = Nt(C, t, r, p, m, o, c, S, A = [], f = [], g), a), v === 123)
704
704
  if (m === 0)
705
705
  rt(C, t, _, _, A, a, g, c, f);
706
706
  else
@@ -710,17 +710,17 @@ function rt(e, t, r, n, o, a, s, c, d) {
710
710
  case 108:
711
711
  case 109:
712
712
  case 115:
713
- rt(e, _, _, n && Ze(Nt(e, _, _, 0, 0, o, c, x, o, A = [], g), f), o, f, g, c, n ? A : f);
713
+ rt(e, _, _, n && Ze(Nt(e, _, _, 0, 0, o, c, S, o, A = [], g), f), o, f, g, c, n ? A : f);
714
714
  break;
715
715
  default:
716
716
  rt(C, _, _, _, [""], f, 0, c, f);
717
717
  }
718
718
  }
719
- p = m = S = 0, y = l = 1, x = C = "", g = s;
719
+ p = m = x = 0, y = l = 1, S = C = "", g = s;
720
720
  break;
721
721
  // :
722
722
  case 58:
723
- g = 1 + te(C), S = h;
723
+ g = 1 + te(C), x = h;
724
724
  default:
725
725
  if (y < 1) {
726
726
  if (v == 123)
@@ -739,7 +739,7 @@ function rt(e, t, r, n, o, a, s, c, d) {
739
739
  break;
740
740
  // @
741
741
  case 64:
742
- ne() === 45 && (C += tt(Z())), b = ne(), m = g = te(x = C += qr(et())), v++;
742
+ ne() === 45 && (C += tt(Z())), b = ne(), m = g = te(S = C += qr(et())), v++;
743
743
  break;
744
744
  // -
745
745
  case 45:
@@ -749,9 +749,9 @@ function rt(e, t, r, n, o, a, s, c, d) {
749
749
  return a;
750
750
  }
751
751
  function Nt(e, t, r, n, o, a, s, c, d, p, m) {
752
- for (var g = o - 1, b = o === 0 ? a : [""], S = xt(b), h = 0, y = 0, u = 0; h < n; ++h)
753
- for (var l = 0, v = $e(e, g + 1, g = Dr(y = s[h])), x = e; l < S; ++l)
754
- (x = Zt(y > 0 ? b[l] + " " + v : I(v, /&\f/g, b[l]))) && (d[u++] = x);
752
+ for (var g = o - 1, b = o === 0 ? a : [""], x = xt(b), h = 0, y = 0, u = 0; h < n; ++h)
753
+ for (var l = 0, v = $e(e, g + 1, g = Dr(y = s[h])), S = e; l < x; ++l)
754
+ (S = Zt(y > 0 ? b[l] + " " + v : I(v, /&\f/g, b[l]))) && (d[u++] = S);
755
755
  return ct(e, t, r, o === 0 ? bt : c, d, p, m);
756
756
  }
757
757
  function Kr(e, t, r) {
@@ -760,7 +760,7 @@ function Kr(e, t, r) {
760
760
  function Mt(e, t, r, n) {
761
761
  return ct(e, t, r, yt, $e(e, 0, n), $e(e, n + 1, -1), n);
762
762
  }
763
- function ge(e, t) {
763
+ function be(e, t) {
764
764
  for (var r = "", n = xt(e), o = 0; o < n; o++)
765
765
  r += t(e[o], o, e, t) || "";
766
766
  return r;
@@ -775,11 +775,11 @@ function Jr(e, t, r, n) {
775
775
  case Kt:
776
776
  return "";
777
777
  case Jt:
778
- return e.return = e.value + "{" + ge(e.children, n) + "}";
778
+ return e.return = e.value + "{" + be(e.children, n) + "}";
779
779
  case bt:
780
780
  e.value = e.props.join(",");
781
781
  }
782
- return te(r = ge(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
782
+ return te(r = be(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
783
783
  }
784
784
  function Zr(e) {
785
785
  var t = xt(e);
@@ -996,7 +996,7 @@ var sn = function(t, r, n, o) {
996
996
  t.return = rr(t.value, t.length);
997
997
  break;
998
998
  case Jt:
999
- return ge([Me(t, {
999
+ return be([Me(t, {
1000
1000
  value: I(t.value, "@", "@" + M)
1001
1001
  })], o);
1002
1002
  case bt:
@@ -1005,12 +1005,12 @@ var sn = function(t, r, n, o) {
1005
1005
  // :read-(only|write)
1006
1006
  case ":read-only":
1007
1007
  case ":read-write":
1008
- return ge([Me(t, {
1008
+ return be([Me(t, {
1009
1009
  props: [I(a, /:(read-\w+)/, ":" + it + "$1")]
1010
1010
  })], o);
1011
1011
  // :placeholder
1012
1012
  case "::placeholder":
1013
- return ge([Me(t, {
1013
+ return be([Me(t, {
1014
1014
  props: [I(a, /:(plac\w+)/, ":" + M + "input-$1")]
1015
1015
  }), Me(t, {
1016
1016
  props: [I(a, /:(plac\w+)/, ":" + it + "$1")]
@@ -1045,11 +1045,11 @@ var sn = function(t, r, n, o) {
1045
1045
  {
1046
1046
  var m, g = [Jr, Qr(function(y) {
1047
1047
  m.insert(y);
1048
- })], b = Zr(p.concat(o, g)), S = function(u) {
1049
- return ge(Hr(u), b);
1048
+ })], b = Zr(p.concat(o, g)), x = function(u) {
1049
+ return be(Hr(u), b);
1050
1050
  };
1051
- d = function(u, l, v, x) {
1052
- m = v, S(u ? u + "{" + l.styles + "}" : l.styles), x && (h.inserted[l.name] = !0);
1051
+ d = function(u, l, v, S) {
1052
+ m = v, x(u ? u + "{" + l.styles + "}" : l.styles), S && (h.inserted[l.name] = !0);
1053
1053
  };
1054
1054
  }
1055
1055
  var h = {
@@ -1081,8 +1081,8 @@ var Lt;
1081
1081
  function ln() {
1082
1082
  if (Lt) return L;
1083
1083
  Lt = 1;
1084
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, h = e ? Symbol.for("react.lazy") : 60116, y = e ? Symbol.for("react.block") : 60121, u = e ? Symbol.for("react.fundamental") : 60117, l = e ? Symbol.for("react.responder") : 60118, v = e ? Symbol.for("react.scope") : 60119;
1085
- function x(f) {
1084
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, x = e ? Symbol.for("react.memo") : 60115, h = e ? Symbol.for("react.lazy") : 60116, y = e ? Symbol.for("react.block") : 60121, u = e ? Symbol.for("react.fundamental") : 60117, l = e ? Symbol.for("react.responder") : 60118, v = e ? Symbol.for("react.scope") : 60119;
1085
+ function S(f) {
1086
1086
  if (typeof f == "object" && f !== null) {
1087
1087
  var _ = f.$$typeof;
1088
1088
  switch (_) {
@@ -1100,7 +1100,7 @@ function ln() {
1100
1100
  case c:
1101
1101
  case m:
1102
1102
  case h:
1103
- case S:
1103
+ case x:
1104
1104
  case s:
1105
1105
  return f;
1106
1106
  default:
@@ -1113,35 +1113,35 @@ function ln() {
1113
1113
  }
1114
1114
  }
1115
1115
  function A(f) {
1116
- return x(f) === p;
1116
+ return S(f) === p;
1117
1117
  }
1118
- return L.AsyncMode = d, L.ConcurrentMode = p, L.ContextConsumer = c, L.ContextProvider = s, L.Element = t, L.ForwardRef = m, L.Fragment = n, L.Lazy = h, L.Memo = S, L.Portal = r, L.Profiler = a, L.StrictMode = o, L.Suspense = g, L.isAsyncMode = function(f) {
1119
- return A(f) || x(f) === d;
1118
+ return L.AsyncMode = d, L.ConcurrentMode = p, L.ContextConsumer = c, L.ContextProvider = s, L.Element = t, L.ForwardRef = m, L.Fragment = n, L.Lazy = h, L.Memo = x, L.Portal = r, L.Profiler = a, L.StrictMode = o, L.Suspense = g, L.isAsyncMode = function(f) {
1119
+ return A(f) || S(f) === d;
1120
1120
  }, L.isConcurrentMode = A, L.isContextConsumer = function(f) {
1121
- return x(f) === c;
1121
+ return S(f) === c;
1122
1122
  }, L.isContextProvider = function(f) {
1123
- return x(f) === s;
1123
+ return S(f) === s;
1124
1124
  }, L.isElement = function(f) {
1125
1125
  return typeof f == "object" && f !== null && f.$$typeof === t;
1126
1126
  }, L.isForwardRef = function(f) {
1127
- return x(f) === m;
1127
+ return S(f) === m;
1128
1128
  }, L.isFragment = function(f) {
1129
- return x(f) === n;
1129
+ return S(f) === n;
1130
1130
  }, L.isLazy = function(f) {
1131
- return x(f) === h;
1131
+ return S(f) === h;
1132
1132
  }, L.isMemo = function(f) {
1133
- return x(f) === S;
1133
+ return S(f) === x;
1134
1134
  }, L.isPortal = function(f) {
1135
- return x(f) === r;
1135
+ return S(f) === r;
1136
1136
  }, L.isProfiler = function(f) {
1137
- return x(f) === a;
1137
+ return S(f) === a;
1138
1138
  }, L.isStrictMode = function(f) {
1139
- return x(f) === o;
1139
+ return S(f) === o;
1140
1140
  }, L.isSuspense = function(f) {
1141
- return x(f) === g;
1141
+ return S(f) === g;
1142
1142
  }, L.isValidElementType = function(f) {
1143
- return typeof f == "string" || typeof f == "function" || f === n || f === p || f === a || f === o || f === g || f === b || typeof f == "object" && f !== null && (f.$$typeof === h || f.$$typeof === S || f.$$typeof === s || f.$$typeof === c || f.$$typeof === m || f.$$typeof === u || f.$$typeof === l || f.$$typeof === v || f.$$typeof === y);
1144
- }, L.typeOf = x, L;
1143
+ return typeof f == "string" || typeof f == "function" || f === n || f === p || f === a || f === o || f === g || f === b || typeof f == "object" && f !== null && (f.$$typeof === h || f.$$typeof === x || f.$$typeof === s || f.$$typeof === c || f.$$typeof === m || f.$$typeof === u || f.$$typeof === l || f.$$typeof === v || f.$$typeof === y);
1144
+ }, L.typeOf = S, L;
1145
1145
  }
1146
1146
  var k = {};
1147
1147
  /** @license React v16.13.1
@@ -1155,15 +1155,15 @@ var k = {};
1155
1155
  var kt;
1156
1156
  function dn() {
1157
1157
  return kt || (kt = 1, process.env.NODE_ENV !== "production" && function() {
1158
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, h = e ? Symbol.for("react.lazy") : 60116, y = e ? Symbol.for("react.block") : 60121, u = e ? Symbol.for("react.fundamental") : 60117, l = e ? Symbol.for("react.responder") : 60118, v = e ? Symbol.for("react.scope") : 60119;
1159
- function x(R) {
1158
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, x = e ? Symbol.for("react.memo") : 60115, h = e ? Symbol.for("react.lazy") : 60116, y = e ? Symbol.for("react.block") : 60121, u = e ? Symbol.for("react.fundamental") : 60117, l = e ? Symbol.for("react.responder") : 60118, v = e ? Symbol.for("react.scope") : 60119;
1159
+ function S(R) {
1160
1160
  return typeof R == "string" || typeof R == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1161
- R === n || R === p || R === a || R === o || R === g || R === b || typeof R == "object" && R !== null && (R.$$typeof === h || R.$$typeof === S || R.$$typeof === s || R.$$typeof === c || R.$$typeof === m || R.$$typeof === u || R.$$typeof === l || R.$$typeof === v || R.$$typeof === y);
1161
+ R === n || R === p || R === a || R === o || R === g || R === b || typeof R == "object" && R !== null && (R.$$typeof === h || R.$$typeof === x || R.$$typeof === s || R.$$typeof === c || R.$$typeof === m || R.$$typeof === u || R.$$typeof === l || R.$$typeof === v || R.$$typeof === y);
1162
1162
  }
1163
1163
  function A(R) {
1164
1164
  if (typeof R == "object" && R !== null) {
1165
- var he = R.$$typeof;
1166
- switch (he) {
1165
+ var ve = R.$$typeof;
1166
+ switch (ve) {
1167
1167
  case t:
1168
1168
  var le = R.type;
1169
1169
  switch (le) {
@@ -1175,24 +1175,24 @@ function dn() {
1175
1175
  case g:
1176
1176
  return le;
1177
1177
  default:
1178
- var ve = le && le.$$typeof;
1179
- switch (ve) {
1178
+ var Ee = le && le.$$typeof;
1179
+ switch (Ee) {
1180
1180
  case c:
1181
1181
  case m:
1182
1182
  case h:
1183
- case S:
1183
+ case x:
1184
1184
  case s:
1185
- return ve;
1185
+ return Ee;
1186
1186
  default:
1187
- return he;
1187
+ return ve;
1188
1188
  }
1189
1189
  }
1190
1190
  case r:
1191
- return he;
1191
+ return ve;
1192
1192
  }
1193
1193
  }
1194
1194
  }
1195
- var f = d, _ = p, C = c, F = s, U = t, B = m, V = n, ee = h, ue = S, Re = r, Ae = a, dt = o, Ye = g, ze = !1;
1195
+ var f = d, _ = p, C = c, F = s, U = t, B = m, V = n, ee = h, ue = x, Re = r, Ae = a, dt = o, Ye = g, ze = !1;
1196
1196
  function oe(R) {
1197
1197
  return ze || (ze = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), _e(R) || A(R) === d;
1198
1198
  }
@@ -1218,7 +1218,7 @@ function dn() {
1218
1218
  return A(R) === h;
1219
1219
  }
1220
1220
  function We(R) {
1221
- return A(R) === S;
1221
+ return A(R) === x;
1222
1222
  }
1223
1223
  function Be(R) {
1224
1224
  return A(R) === r;
@@ -1232,7 +1232,7 @@ function dn() {
1232
1232
  function qe(R) {
1233
1233
  return A(R) === g;
1234
1234
  }
1235
- k.AsyncMode = f, k.ConcurrentMode = _, k.ContextConsumer = C, k.ContextProvider = F, k.Element = U, k.ForwardRef = B, k.Fragment = V, k.Lazy = ee, k.Memo = ue, k.Portal = Re, k.Profiler = Ae, k.StrictMode = dt, k.Suspense = Ye, k.isAsyncMode = oe, k.isConcurrentMode = _e, k.isContextConsumer = ie, k.isContextProvider = ft, k.isElement = Ce, k.isForwardRef = fe, k.isFragment = Fe, k.isLazy = Ve, k.isMemo = We, k.isPortal = Be, k.isProfiler = Ge, k.isStrictMode = Xe, k.isSuspense = qe, k.isValidElementType = x, k.typeOf = A;
1235
+ k.AsyncMode = f, k.ConcurrentMode = _, k.ContextConsumer = C, k.ContextProvider = F, k.Element = U, k.ForwardRef = B, k.Fragment = V, k.Lazy = ee, k.Memo = ue, k.Portal = Re, k.Profiler = Ae, k.StrictMode = dt, k.Suspense = Ye, k.isAsyncMode = oe, k.isConcurrentMode = _e, k.isContextConsumer = ie, k.isContextProvider = ft, k.isElement = Ce, k.isForwardRef = fe, k.isFragment = Fe, k.isLazy = Ve, k.isMemo = We, k.isPortal = Be, k.isProfiler = Ge, k.isStrictMode = Xe, k.isSuspense = qe, k.isValidElementType = S, k.typeOf = A;
1236
1236
  }()), k;
1237
1237
  }
1238
1238
  var $t;
@@ -1282,17 +1282,17 @@ function mn() {
1282
1282
  return e.isMemo(h) ? o : a[h.$$typeof] || t;
1283
1283
  }
1284
1284
  var c = Object.defineProperty, d = Object.getOwnPropertyNames, p = Object.getOwnPropertySymbols, m = Object.getOwnPropertyDescriptor, g = Object.getPrototypeOf, b = Object.prototype;
1285
- function S(h, y, u) {
1285
+ function x(h, y, u) {
1286
1286
  if (typeof y != "string") {
1287
1287
  if (b) {
1288
1288
  var l = g(y);
1289
- l && l !== b && S(h, l, u);
1289
+ l && l !== b && x(h, l, u);
1290
1290
  }
1291
1291
  var v = d(y);
1292
1292
  p && (v = v.concat(p(y)));
1293
- for (var x = s(h), A = s(y), f = 0; f < v.length; ++f) {
1293
+ for (var S = s(h), A = s(y), f = 0; f < v.length; ++f) {
1294
1294
  var _ = v[f];
1295
- if (!r[_] && !(u && u[_]) && !(A && A[_]) && !(x && x[_])) {
1295
+ if (!r[_] && !(u && u[_]) && !(A && A[_]) && !(S && S[_])) {
1296
1296
  var C = m(y, _);
1297
1297
  try {
1298
1298
  c(h, _, C);
@@ -1303,7 +1303,7 @@ function mn() {
1303
1303
  }
1304
1304
  return h;
1305
1305
  }
1306
- return mt = S, mt;
1306
+ return mt = x, mt;
1307
1307
  }
1308
1308
  mn();
1309
1309
  var pn = !0;
@@ -1576,7 +1576,9 @@ var An = function(t) {
1576
1576
  const On = Xt(({ sendBack: e, receive: t, input: r }) => {
1577
1577
  const { videoElement: n } = r;
1578
1578
  t((b) => {
1579
- b.type === "PLAY" && (n.play(), o()), b.type === "PAUSE" && (n.pause(), o()), b.type === "SET_TIME" && (n.currentTime = b.value, c()), b.type === "SET_VOLUME" && (n.volume = b.volume, n.muted = b.muted, d()), b.type === "SET_PLAYBACK_RATE" && (n.playbackRate = b.playbackRate, p());
1579
+ b.type === "PLAY" && n.play().then(() => o()).catch((x) => {
1580
+ console.error(x);
1581
+ }), b.type === "PAUSE" && (n.pause(), a()), b.type === "SET_TIME" && (n.currentTime = b.value, c()), b.type === "SET_VOLUME" && (n.volume = b.volume, n.muted = b.muted, d()), b.type === "SET_PLAYBACK_RATE" && (n.playbackRate = b.playbackRate, p());
1580
1582
  });
1581
1583
  const o = () => e({ type: "PLAYING" }), a = () => e({ type: "PAUSED" }), s = () => e({ type: "ENDED" }), c = () => e({ type: "TIME_UPDATE", currentTime: n.currentTime }), d = () => e({ type: "VOLUME_UPDATE", muted: n.muted, volume: n.volume }), p = () => e({ type: "PLAYBACK_RATE_UPDATE", playbackRate: n.playbackRate }), m = () => e({ type: "SEEKING", currentTime: n.currentTime }), g = () => e({ type: "DURATION_UPDATE", duration: n.duration });
1582
1584
  return n.addEventListener("play", o), n.addEventListener("pause", a), n.addEventListener("ended", s), n.addEventListener("timeupdate", c), n.addEventListener("volumechange", d), n.addEventListener("ratechange", p), n.addEventListener("seeking", m), n.addEventListener("durationchange", g), () => {
@@ -1624,7 +1626,7 @@ const On = Xt(({ sendBack: e, receive: t, input: r }) => {
1624
1626
  a.addEventListener("error", p);
1625
1627
  const m = new MediaSource(), g = URL.createObjectURL(m);
1626
1628
  a.src = g;
1627
- const b = () => a.currentTime + (s ?? Mn), S = () => a.currentTime + (c ?? In), h = () => a.currentTime + (d ?? Ln);
1629
+ const b = () => a.currentTime + (s ?? Mn), x = () => a.currentTime + (c ?? In), h = () => a.currentTime + (d ?? Ln);
1628
1630
  let y;
1629
1631
  const u = await new Promise(
1630
1632
  (U) => m.addEventListener(
@@ -1642,12 +1644,12 @@ const On = Xt(({ sendBack: e, receive: t, input: r }) => {
1642
1644
  )
1643
1645
  );
1644
1646
  if (!y) throw new Error("No header buffer");
1645
- const { appendBuffer: l, unbufferRange: v, updateTimestampOffset: x } = Nn(u);
1647
+ const { appendBuffer: l, unbufferRange: v, updateTimestampOffset: S } = Nn(u);
1646
1648
  l(y), t(async (U) => {
1647
- U.type === "DATA" ? await l(U.data) : U.type === "TIMESTAMP_OFFSET" && await x(U.timestampOffset);
1649
+ U.type === "DATA" ? await l(U.data) : U.type === "TIMESTAMP_OFFSET" && await S(U.timestampOffset);
1648
1650
  });
1649
1651
  const A = async () => {
1650
- const U = b(), B = S(), V = zt(u);
1652
+ const U = b(), B = x(), V = zt(u);
1651
1653
  for (const { start: ee, end: ue } of V)
1652
1654
  ee < U && await v(
1653
1655
  ee,
@@ -1677,10 +1679,10 @@ const On = Xt(({ sendBack: e, receive: t, input: r }) => {
1677
1679
  o = void 0, g.then(c).catch((h) => {
1678
1680
  console.error(h), d(h);
1679
1681
  });
1680
- let b, S;
1682
+ let b, x;
1681
1683
  n = new Promise((h, y) => {
1682
- b = h, S = y;
1683
- }), r = g.then(a(m, b, S)).catch((h) => (console.error(h), a(s, b, S)(h)));
1684
+ b = h, x = y;
1685
+ }), r = g.then(a(m, b, x)).catch((h) => (console.error(h), a(s, b, x)(h)));
1684
1686
  }, e - (m - s)), p;
1685
1687
  };
1686
1688
  return (...s) => {
@@ -1704,12 +1706,12 @@ const On = Xt(({ sendBack: e, receive: t, input: r }) => {
1704
1706
  read: m
1705
1707
  }), b = await g.init();
1706
1708
  b.indexes && e({ type: "INDEXES", indexes: b.indexes }), b.attachments?.length && e({ type: "NEW_ATTACHMENTS", attachments: b.attachments }), b.subtitles?.length && e({ type: "NEW_SUBTITLE_FRAGMENTS", subtitles: b.subtitles }), e({ type: "METADATA", ...b });
1707
- let S = !1, h = [];
1709
+ let x = !1, h = [];
1708
1710
  const y = $n(100, async () => {
1709
- if (!(h.length || S))
1711
+ if (!(h.length || x))
1710
1712
  try {
1711
1713
  const { data: u, subtitles: l, finished: v } = await g.read();
1712
- v && (S = !0), l.length && e({ type: "NEW_SUBTITLE_FRAGMENTS", subtitles: l }), e({ type: "DATA", data: u });
1714
+ v && (x = !0), l.length && e({ type: "NEW_SUBTITLE_FRAGMENTS", subtitles: l }), e({ type: "DATA", data: u });
1713
1715
  } catch (u) {
1714
1716
  if (u.message === "Cancelled") return;
1715
1717
  console.error(u);
@@ -1719,17 +1721,17 @@ const On = Xt(({ sendBack: e, receive: t, input: r }) => {
1719
1721
  if (u.type === "NEED_DATA")
1720
1722
  y();
1721
1723
  else if (u.type === "SEEKING") {
1722
- S = !1;
1724
+ x = !1;
1723
1725
  const { currentTime: l } = u, v = { currentTime: l };
1724
1726
  h = [...h, v];
1725
1727
  try {
1726
- const { data: x, pts: A } = await g.seek(l).finally(() => {
1728
+ const { data: S, pts: A } = await g.seek(l).finally(() => {
1727
1729
  h = h.filter((f) => f !== v);
1728
1730
  });
1729
- e({ type: "TIMESTAMP_OFFSET", timestampOffset: A }), e({ type: "DATA", data: x });
1730
- } catch (x) {
1731
- if (x.message === "Cancelled") return;
1732
- console.error(x);
1731
+ e({ type: "TIMESTAMP_OFFSET", timestampOffset: A }), e({ type: "DATA", data: S });
1732
+ } catch (S) {
1733
+ if (S.message === "Cancelled") return;
1734
+ console.error(S);
1733
1735
  }
1734
1736
  }
1735
1737
  }), () => {
@@ -1804,12 +1806,12 @@ ${d}`),
1804
1806
  const { publicPath: a, subtitlesRendererOptions: s, videoElement: c, canvasElement: d } = r;
1805
1807
  let p = [], m;
1806
1808
  const g = /* @__PURE__ */ new Map();
1807
- let b = [], S;
1809
+ let b = [], x;
1808
1810
  return t((h) => {
1809
1811
  if (h.type === "SELECT_SUBTITLE_STREAM") {
1810
- if (S = h.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: h.streamIndex }), !m) return;
1812
+ if (x = h.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: h.streamIndex }), !m) return;
1811
1813
  m.freeTrack(), b = [];
1812
- const y = g.get(S);
1814
+ const y = g.get(x);
1813
1815
  if (!y)
1814
1816
  throw new Error("newSubtitleStreams is undefined");
1815
1817
  const u = Le(y.header.content), l = {
@@ -1822,20 +1824,20 @@ ${d}`),
1822
1824
  }
1823
1825
  }, v = _t(l);
1824
1826
  m.setTrack(v), m.setCurrentTime(c.paused, c.currentTime, c.playbackRate);
1825
- for (const x in y.header.parsed.styles) {
1826
- const A = y.header.parsed.styles.style[Number(x)];
1827
+ for (const S in y.header.parsed.styles) {
1828
+ const A = y.header.parsed.styles.style[Number(S)];
1827
1829
  A && Wt(m, A);
1828
1830
  }
1829
- for (const x of y?.dialogues ?? [])
1831
+ for (const S of y?.dialogues ?? [])
1830
1832
  b.filter((f) => f.type === "dialogue").find(
1831
- (f) => f.streamIndex === x.streamIndex && f.index === x.index
1832
- ) || S !== x.streamIndex || (m?.createEvent(x.assEvent), b.push(x));
1833
+ (f) => f.streamIndex === S.streamIndex && f.index === S.index
1834
+ ) || x !== S.streamIndex || (m?.createEvent(S.assEvent), b.push(S));
1833
1835
  }
1834
1836
  if (h.type === "NEW_SUBTITLE_FRAGMENTS") {
1835
1837
  const y = h.subtitles.map((u) => {
1836
1838
  if (u.type === "header") {
1837
1839
  const l = Dn(u);
1838
- return g.set(u.streamIndex, { header: l, dialogues: [] }), S === void 0 && (S = u.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: u.streamIndex })), e({ type: "SUBTITLE_STREAMS_UPDATED", subtitlesStreams: [...g.values()] }), l;
1840
+ return g.set(u.streamIndex, { header: l, dialogues: [] }), x === void 0 && (x = u.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: u.streamIndex })), e({ type: "SUBTITLE_STREAMS_UPDATED", subtitlesStreams: [...g.values()] }), l;
1839
1841
  } else {
1840
1842
  const l = g.get(u.streamIndex)?.header;
1841
1843
  if (!l)
@@ -1848,7 +1850,7 @@ ${d}`),
1848
1850
  if (u.type === "dialogue") {
1849
1851
  if (b.filter((v) => v.type === "dialogue").find(
1850
1852
  (v) => v.streamIndex === u.streamIndex && v.index === u.index
1851
- ) || S !== u.streamIndex)
1853
+ ) || x !== u.streamIndex)
1852
1854
  continue;
1853
1855
  m?.createEvent(u.assEvent), b.push(u);
1854
1856
  } else if (u.type === "header") {
@@ -1861,11 +1863,11 @@ ${d}`),
1861
1863
  LayoutResX: "",
1862
1864
  LayoutResY: ""
1863
1865
  }
1864
- }, x = _t(v);
1866
+ }, S = _t(v);
1865
1867
  m = new br({
1866
1868
  video: c,
1867
1869
  canvas: d,
1868
- subContent: x,
1870
+ subContent: S,
1869
1871
  workerUrl: s.workerUrl,
1870
1872
  modernWasmUrl: s.wasmUrl,
1871
1873
  fonts: p.filter(Boolean).map(([A, f]) => f),
@@ -1909,17 +1911,17 @@ ${d}`),
1909
1911
  );
1910
1912
  }).sort((f, _) => f.timestamp - _.timestamp).forEach((f) => l(f));
1911
1913
  });
1912
- const S = await Ht({
1914
+ const x = await Ht({
1913
1915
  publicPath: s,
1914
1916
  workerUrl: c,
1915
1917
  bufferSize: d,
1916
1918
  length: p,
1917
1919
  read: m
1918
- }), h = await S.init(), y = new qt({ concurrency: 1 });
1920
+ }), h = await x.init(), y = new qt({ concurrency: 1 });
1919
1921
  let u = [];
1920
1922
  const l = (v) => y.add(async () => {
1921
1923
  if (u.find((U) => U.index.index === v.index)) return;
1922
- const x = await S.readKeyframe(v.timestamp), A = new Blob([x], { type: "image/png" }), f = URL.createObjectURL(A), _ = h.indexes.at(v.index + 1), C = _ ? _.timestamp - v.timestamp : h.info.input.duration - v.timestamp, F = {
1924
+ const S = await x.readKeyframe(v.timestamp), A = new Blob([S], { type: "image/png" }), f = URL.createObjectURL(A), _ = h.indexes.at(v.index + 1), C = _ ? _.timestamp - v.timestamp : h.info.input.duration - v.timestamp, F = {
1923
1925
  blob: A,
1924
1926
  url: f,
1925
1927
  timestamp: v.timestamp,
@@ -1929,7 +1931,7 @@ ${d}`),
1929
1931
  u.push(F), e({ type: "NEW_THUMBNAIL", thumbnail: F });
1930
1932
  });
1931
1933
  return g(), () => {
1932
- S.destroy();
1934
+ x.destroy();
1933
1935
  };
1934
1936
  }), Fn = Er({
1935
1937
  types: {},
@@ -2130,6 +2132,53 @@ ${d}`),
2130
2132
  if (!e) throw new Error("Media actor not found");
2131
2133
  if (!r) throw new Error("Duration not found");
2132
2134
  r === n ? (e.send({ type: "SET_TIME", value: 0 }), e.send({ type: "PLAY" })) : t ? e.send({ type: "PLAY" }) : e.send({ type: "PAUSE" });
2135
+ }, he = {
2136
+ headings: {
2137
+ small: `
2138
+ font-weight: 500;
2139
+ font-size: 1.8rem;
2140
+ line-height: 1.9rem;
2141
+ @media (min-width: 960px) {
2142
+ font-size: 1.8rem;
2143
+ line-height: 2.2rem;
2144
+ }
2145
+ @media (min-width: 2560px) {
2146
+ font-size: 2.2rem;
2147
+ line-height: 2.6rem;
2148
+ }
2149
+ `
2150
+ },
2151
+ bMedium: {
2152
+ bold: `
2153
+ font-weight: 600;
2154
+ font-size: 1.2rem;
2155
+ line-height: 1.7rem;
2156
+ @media (min-width: 960px) {
2157
+ font-size: 1.4rem;
2158
+ line-height: 2rem;
2159
+ }
2160
+ `,
2161
+ regular: `
2162
+ font-weight: 400;
2163
+ font-size: 1.2rem;
2164
+ line-height: 1.7rem;
2165
+ @media (min-width: 960px) {
2166
+ font-size: 1.4rem;
2167
+ line-height: 2rem;
2168
+ }
2169
+ `
2170
+ },
2171
+ bSmall: {
2172
+ regular: `
2173
+ font-weight: 400;
2174
+ font-size: 1rem;
2175
+ line-height: 1.4rem;
2176
+ @media (min-width: 960px) {
2177
+ font-size: 1.2rem;
2178
+ line-height: 1.7rem;
2179
+ }
2180
+ `
2181
+ }
2133
2182
  }, Vn = K`
2134
2183
  top: unset !important;
2135
2184
  left: unset !important;
@@ -2142,14 +2191,15 @@ ${d}`),
2142
2191
  top: 0;
2143
2192
  left: 0;
2144
2193
  width: 100%;
2145
- height: 100%;
2146
- margin-left: 2.5rem;
2147
- margin-top: 2.5rem;
2148
- font-size: 2rem;
2194
+ padding: 2.4rem;
2195
+ ${he.headings.small}
2149
2196
  color: white;
2150
2197
  text-shadow: 0 0 4px rgba(0, 0, 0, 1);
2151
2198
  z-index: 2;
2152
2199
  pointer-events: none;
2200
+
2201
+ background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 80%, transparent 100%);
2202
+ transition: opacity 0.1s cubic-bezier(.4,0,1,1);
2153
2203
  `, Bn = K`
2154
2204
  position: absolute;
2155
2205
  top: 0;
@@ -2174,7 +2224,14 @@ ${d}`),
2174
2224
  canvasElement: o
2175
2225
  });
2176
2226
  }, [o]), /* @__PURE__ */ $(cr, { children: [
2177
- n.title && !n.hideUI ? /* @__PURE__ */ E("div", { css: Wn, children: n.title }) : void 0,
2227
+ n.title ? /* @__PURE__ */ E(
2228
+ "div",
2229
+ {
2230
+ css: Wn,
2231
+ style: { ...n.hideUI ? { opacity: "0", pointerEvents: "none" } : {} },
2232
+ children: n.title
2233
+ }
2234
+ ) : void 0,
2178
2235
  r === void 0 && e ? /* @__PURE__ */ E("div", { css: Bn, children: e }) : void 0,
2179
2236
  /* @__PURE__ */ E("canvas", { ref: s, css: Vn })
2180
2237
  ] });
@@ -2184,38 +2241,6 @@ ${d}`),
2184
2241
  }, St = (e) => {
2185
2242
  const t = Math.max(ur, Math.min(gt, e));
2186
2243
  return Math.pow(t, gt / lr);
2187
- }, xe = {
2188
- bMedium: {
2189
- bold: `
2190
- font-weight: 600;
2191
- font-size: 1.2rem;
2192
- line-height: 1.7rem;
2193
- @media (min-width: 960px) {
2194
- font-size: 1.4rem;
2195
- line-height: 2rem;
2196
- }
2197
- `,
2198
- regular: `
2199
- font-weight: 400;
2200
- font-size: 1.2rem;
2201
- line-height: 1.7rem;
2202
- @media (min-width: 960px) {
2203
- font-size: 1.4rem;
2204
- line-height: 2rem;
2205
- }
2206
- `
2207
- },
2208
- bSmall: {
2209
- regular: `
2210
- font-weight: 400;
2211
- font-size: 1rem;
2212
- line-height: 1.4rem;
2213
- @media (min-width: 960px) {
2214
- font-size: 1.2rem;
2215
- line-height: 1.7rem;
2216
- }
2217
- `
2218
- }
2219
2244
  }, Xn = (e) => K`
2220
2245
  display: flex;
2221
2246
  justify-content: flex-end;
@@ -2226,7 +2251,7 @@ ${d}`),
2226
2251
  z-index: 3;
2227
2252
 
2228
2253
  * {
2229
- ${xe.bSmall.regular}
2254
+ ${he.bSmall.regular}
2230
2255
  }
2231
2256
 
2232
2257
  ${e === "sm" && K`
@@ -2238,7 +2263,7 @@ ${d}`),
2238
2263
  ${e === "lg" && K`
2239
2264
  padding: 1.2rem!important;
2240
2265
  `}
2241
- `, be = ({
2266
+ `, ye = ({
2242
2267
  id: e,
2243
2268
  toolTipText: t,
2244
2269
  text: r,
@@ -2334,7 +2359,7 @@ ${d}`),
2334
2359
  justify-content: center;
2335
2360
 
2336
2361
  text-shadow: 0 0 4px rgba(0, 0, 0, 1);
2337
- ${xe.bMedium.bold}
2362
+ ${he.bMedium.bold}
2338
2363
 
2339
2364
  position: absolute;
2340
2365
  top: -2.5rem;
@@ -2406,14 +2431,14 @@ ${d}`),
2406
2431
  }
2407
2432
  `, Kn = () => {
2408
2433
  const e = O.useActorRef(), t = O.useSelector((l) => l.context.media.currentTime), r = O.useSelector((l) => l.context.media.duration), n = O.useSelector((l) => l.context.indexes), o = O.useSelector((l) => l.context.thumbnails), a = Se(we), s = Ie(null), { scrub: c, value: d } = qn({ ref: s }), [p, m] = Q(void 0), g = (l) => {
2409
- const x = l.nativeEvent.offsetX / l.currentTarget.offsetWidth * (r ?? 0);
2410
- m(x);
2434
+ const S = l.nativeEvent.offsetX / l.currentTarget.offsetWidth * (r ?? 0);
2435
+ m(S);
2411
2436
  }, b = () => {
2412
2437
  s.current && m(void 0);
2413
- }, S = pe(
2438
+ }, x = pe(
2414
2439
  () => a.downloadedRanges?.map((l, v) => {
2415
2440
  if (!a.size || !r) return null;
2416
- const x = n.filter((B) => l.startByteOffset <= B.pos && B.pos <= l.endByteOffset), A = x.at(0), f = x.at(-1);
2441
+ const S = n.filter((B) => l.startByteOffset <= B.pos && B.pos <= l.endByteOffset), A = S.at(0), f = S.at(-1);
2417
2442
  if (!A || !f) return null;
2418
2443
  const _ = A.timestamp / r, C = f.timestamp / r, F = Number((C - _).toFixed(2)), U = _ * 100;
2419
2444
  return /* @__PURE__ */ E("div", { className: "loaded-part", style: { transform: `scaleX(${F})`, marginLeft: `${U}%` } }, v);
@@ -2421,8 +2446,8 @@ ${d}`),
2421
2446
  [r, n.length, a.downloadedRanges?.map(({ startByteOffset: l, endByteOffset: v }) => `${l}/${v}`).join(",")]
2422
2447
  ), h = pe(() => {
2423
2448
  if (!p || p < 0) return;
2424
- const l = Math.floor(p / 3600), v = Math.floor((p - l * 3600) / 60), x = Math.floor(p - l * 3600 - v * 60);
2425
- return `${l > 0 ? `${l}:` : ""}${v < 10 ? "0" : ""}${v}:${x < 10 ? "0" : ""}${x}`;
2449
+ const l = Math.floor(p / 3600), v = Math.floor((p - l * 3600) / 60), S = Math.floor(p - l * 3600 - v * 60);
2450
+ return `${l > 0 ? `${l}:` : ""}${v < 10 ? "0" : ""}${v}:${S < 10 ? "0" : ""}${S}`;
2426
2451
  }, [p]);
2427
2452
  z(() => {
2428
2453
  if (!e || d === void 0 || !r) return;
@@ -2454,7 +2479,7 @@ ${d}`),
2454
2479
  }
2455
2480
  ) : void 0,
2456
2481
  /* @__PURE__ */ E("div", { className: "progress" }),
2457
- /* @__PURE__ */ E("div", { className: "loaded", children: S }),
2482
+ /* @__PURE__ */ E("div", { className: "loaded", children: x }),
2458
2483
  /* @__PURE__ */ E("div", { className: "hover" }),
2459
2484
  /* @__PURE__ */ E("div", { className: "play-container", children: /* @__PURE__ */ E("div", { className: "play", style: { transform: `scaleX(${y})` } }) }),
2460
2485
  /* @__PURE__ */ E("div", { className: "chapters" }),
@@ -2496,7 +2521,7 @@ position: relative;
2496
2521
 
2497
2522
  border-radius: 8px;
2498
2523
  background-color: rgba(28,28,28,0.95);
2499
- ${xe.bMedium.regular}
2524
+ ${he.bMedium.regular}
2500
2525
 
2501
2526
  z-index: 4;
2502
2527
 
@@ -2531,7 +2556,7 @@ position: relative;
2531
2556
 
2532
2557
  .secondary {
2533
2558
  color: #eee;
2534
- ${xe.bSmall.regular}
2559
+ ${he.bSmall.regular}
2535
2560
  }
2536
2561
  }
2537
2562
  }
@@ -2562,12 +2587,12 @@ position: relative;
2562
2587
  [r.length]
2563
2588
  ), b = (h) => () => {
2564
2589
  e.send({ type: "SELECT_SUBTITLE_STREAM", streamIndex: h.streamIndex }), p();
2565
- }, S = (h) => () => {
2590
+ }, x = (h) => () => {
2566
2591
  c(h);
2567
2592
  };
2568
2593
  return /* @__PURE__ */ $("div", { css: Qn, ref: d, children: [
2569
2594
  /* @__PURE__ */ E(
2570
- be,
2595
+ ye,
2571
2596
  {
2572
2597
  id: "settings",
2573
2598
  disabled: o,
@@ -2584,28 +2609,28 @@ position: relative;
2584
2609
  }
2585
2610
  ),
2586
2611
  o && s === 0 && /* @__PURE__ */ $("div", { className: "popover", children: [
2587
- /* @__PURE__ */ $("div", { onClick: S(
2612
+ /* @__PURE__ */ $("div", { onClick: x(
2588
2613
  2
2589
2614
  /* Advanced */
2590
2615
  ), children: [
2591
2616
  /* @__PURE__ */ E("span", { children: "Advanced" }),
2592
2617
  /* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(Ke, {}) })
2593
2618
  ] }),
2594
- /* @__PURE__ */ $("div", { onClick: S(
2619
+ /* @__PURE__ */ $("div", { onClick: x(
2595
2620
  3
2596
2621
  /* SelectNewSources */
2597
2622
  ), children: [
2598
2623
  /* @__PURE__ */ E("div", { children: "Select new sources" }),
2599
2624
  /* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(Ke, {}) })
2600
2625
  ] }),
2601
- /* @__PURE__ */ $("div", { onClick: S(
2626
+ /* @__PURE__ */ $("div", { onClick: x(
2602
2627
  4
2603
2628
  /* Subtitles */
2604
2629
  ), children: [
2605
2630
  /* @__PURE__ */ E("div", { children: "Subtitles" }),
2606
2631
  /* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(Ke, {}) })
2607
2632
  ] }),
2608
- /* @__PURE__ */ $("div", { onClick: S(
2633
+ /* @__PURE__ */ $("div", { onClick: x(
2609
2634
  1
2610
2635
  /* PlaybackRate */
2611
2636
  ), children: [
@@ -2617,7 +2642,7 @@ position: relative;
2617
2642
  ] })
2618
2643
  ] }),
2619
2644
  o && s === 1 && /* @__PURE__ */ $("div", { className: "popover", children: [
2620
- /* @__PURE__ */ $("div", { onClick: S(
2645
+ /* @__PURE__ */ $("div", { onClick: x(
2621
2646
  0
2622
2647
  /* Default */
2623
2648
  ), children: [
@@ -2662,14 +2687,14 @@ position: relative;
2662
2687
  ] })
2663
2688
  ] })
2664
2689
  ] }),
2665
- o && s === 2 && /* @__PURE__ */ E("div", { className: "popover", children: /* @__PURE__ */ $("div", { onClick: S(
2690
+ o && s === 2 && /* @__PURE__ */ E("div", { className: "popover", children: /* @__PURE__ */ $("div", { onClick: x(
2666
2691
  0
2667
2692
  /* Default */
2668
2693
  ), children: [
2669
2694
  /* @__PURE__ */ E("div", { children: "Back" }),
2670
2695
  /* @__PURE__ */ E("div", {})
2671
2696
  ] }) }),
2672
- o && s === 3 && /* @__PURE__ */ E("div", { className: "popover", children: /* @__PURE__ */ $("div", { onClick: S(
2697
+ o && s === 3 && /* @__PURE__ */ E("div", { className: "popover", children: /* @__PURE__ */ $("div", { onClick: x(
2673
2698
  0
2674
2699
  /* Default */
2675
2700
  ), children: [
@@ -2688,7 +2713,7 @@ position: relative;
2688
2713
  },
2689
2714
  h.streamIndex
2690
2715
  )),
2691
- /* @__PURE__ */ $("div", { onClick: S(
2716
+ /* @__PURE__ */ $("div", { onClick: x(
2692
2717
  0
2693
2718
  /* Default */
2694
2719
  ), children: [
@@ -2759,12 +2784,12 @@ position: relative;
2759
2784
  u && u.removeEventListener("wheel", g);
2760
2785
  };
2761
2786
  }, [e]);
2762
- const b = e * 100, S = "#fff", h = "#3A3A3A", y = pe(
2787
+ const b = e * 100, x = "#fff", h = "#3A3A3A", y = pe(
2763
2788
  () => Math.round(n ? 0 : St(r) * 100),
2764
2789
  [r]
2765
2790
  );
2766
2791
  return /* @__PURE__ */ E(
2767
- be,
2792
+ ye,
2768
2793
  {
2769
2794
  id: "volume-slider",
2770
2795
  text: /* @__PURE__ */ E(
@@ -2778,7 +2803,7 @@ position: relative;
2778
2803
  {
2779
2804
  style: {
2780
2805
  background: `linear-gradient(to right,
2781
- ${S} 0% ${b}%,
2806
+ ${x} 0% ${b}%,
2782
2807
  ${h} ${b}% 100%
2783
2808
  )`
2784
2809
  },
@@ -2826,7 +2851,7 @@ position: relative;
2826
2851
  border-radius: 4px;
2827
2852
 
2828
2853
  .volume-value {
2829
- ${xe.bMedium.regular};
2854
+ ${he.bMedium.regular};
2830
2855
  color: #ffffff;
2831
2856
  }
2832
2857
  }
@@ -2848,7 +2873,7 @@ position: relative;
2848
2873
  });
2849
2874
  return /* @__PURE__ */ $("div", { css: oo, children: [
2850
2875
  /* @__PURE__ */ E(
2851
- be,
2876
+ ye,
2852
2877
  {
2853
2878
  id: "sound",
2854
2879
  text: /* @__PURE__ */ E(
@@ -2963,7 +2988,7 @@ position: relative;
2963
2988
 
2964
2989
  .left {
2965
2990
  .time {
2966
- ${xe.bMedium.regular}
2991
+ ${he.bMedium.regular}
2967
2992
  }
2968
2993
  }
2969
2994
  .right {
@@ -2994,11 +3019,11 @@ position: relative;
2994
3019
  document.removeEventListener("fullscreenchange", u);
2995
3020
  };
2996
3021
  }, []);
2997
- const S = () => {
3022
+ const x = () => {
2998
3023
  document.fullscreenElement ? document.exitFullscreen() : t.current && t.current.requestFullscreen();
2999
3024
  }, h = ot(({ direction: u, stepSize: l }) => {
3000
3025
  if (!r) return;
3001
- const v = St(a), x = u === "up" ? l : -l, A = Math.max(0, Math.min(1, v + x)), f = dr(A);
3026
+ const v = St(a), S = u === "up" ? l : -l, A = Math.max(0, Math.min(1, v + S)), f = dr(A);
3002
3027
  r.send({
3003
3028
  type: "SET_VOLUME",
3004
3029
  muted: s,
@@ -3008,7 +3033,7 @@ position: relative;
3008
3033
  z(() => {
3009
3034
  const u = (l) => {
3010
3035
  let v = !0;
3011
- if (l.key === "f") S();
3036
+ if (l.key === "f") x();
3012
3037
  else if (l.key === "k") nt(r, o, d, c);
3013
3038
  else if (l.key === " ") nt(r, o, d, c);
3014
3039
  else if (l.key === "m")
@@ -3036,7 +3061,7 @@ position: relative;
3036
3061
  /* @__PURE__ */ $("div", { className: "actions", children: [
3037
3062
  /* @__PURE__ */ $("div", { className: "left", children: [
3038
3063
  /* @__PURE__ */ E(
3039
- be,
3064
+ ye,
3040
3065
  {
3041
3066
  id: "play",
3042
3067
  tooltipPlace: "top-start",
@@ -3059,7 +3084,7 @@ position: relative;
3059
3084
  e,
3060
3085
  /* @__PURE__ */ E(eo, {}),
3061
3086
  /* @__PURE__ */ E(
3062
- be,
3087
+ ye,
3063
3088
  {
3064
3089
  id: "picture-in-picture",
3065
3090
  text: /* @__PURE__ */ E(
@@ -3074,7 +3099,7 @@ position: relative;
3074
3099
  }
3075
3100
  ),
3076
3101
  /* @__PURE__ */ E(
3077
- be,
3102
+ ye,
3078
3103
  {
3079
3104
  id: "full-screen",
3080
3105
  tooltipPlace: "top-end",
@@ -3083,7 +3108,7 @@ position: relative;
3083
3108
  {
3084
3109
  className: "full-screen",
3085
3110
  type: "button",
3086
- onClick: S,
3111
+ onClick: x,
3087
3112
  children: g ? /* @__PURE__ */ E(_r, {}) : /* @__PURE__ */ E(Cr, {})
3088
3113
  }
3089
3114
  ),
@@ -3134,10 +3159,10 @@ position: relative;
3134
3159
  ref: p,
3135
3160
  onMouseMove: (b) => {
3136
3161
  o.update({ ...o, hideUI: !1 }), d.current && clearInterval(d.current);
3137
- const S = setTimeout(() => {
3162
+ const x = setTimeout(() => {
3138
3163
  o.update({ ...o, hideUI: !0 });
3139
3164
  }, 3e3);
3140
- d.current = S;
3165
+ d.current = x;
3141
3166
  },
3142
3167
  onMouseOut: (b) => {
3143
3168
  b.currentTarget.parentElement !== b.relatedTarget && b.relatedTarget !== null || o.update({ ...o, hideUI: !0 });
@@ -3165,7 +3190,7 @@ position: relative;
3165
3190
  width: 100%;
3166
3191
  overflow: hidden;
3167
3192
  `, mo = ({ options: e, videoElement: t, children: r }) => {
3168
- const n = Se(we), o = O.useActorRef(), a = O.useSelector((u) => u.value), s = O.useSelector((u) => u.context.media.volume), c = O.useSelector((u) => u.context.media.muted), d = O.useSelector((u) => u.context.isReady), p = O.useSelector((u) => u.context.media.duration), [m, g] = Bt("mediaVolume", "1"), [b, S] = Bt("mediaMute", "false"), [h, y] = Q(!0);
3193
+ const n = Se(we), o = O.useActorRef(), a = O.useSelector((u) => u.value), s = O.useSelector((u) => u.context.media.volume), c = O.useSelector((u) => u.context.media.muted), d = O.useSelector((u) => u.context.isReady), p = O.useSelector((u) => u.context.media.duration), [m, g] = Bt("mediaVolume", "1"), [b, x] = Bt("mediaMute", "false"), [h, y] = Q(!0);
3169
3194
  return z(() => {
3170
3195
  o.send({
3171
3196
  type: "MEDIA_SOURCE_OPTIONS",
@@ -3186,12 +3211,12 @@ position: relative;
3186
3211
  (n.downloadedRanges?.map((u) => `${u.startByteOffset}-${u.endByteOffset}`) ?? []).join(",")
3187
3212
  ]
3188
3213
  ), z(() => {
3189
- const { size: u, read: l, publicPath: v, libavWorkerUrl: x, jassubWasmUrl: A } = e;
3190
- !l || !u || !v || !x || !A || o.send({
3214
+ const { size: u, read: l, publicPath: v, libavWorkerUrl: S, jassubWasmUrl: A } = e;
3215
+ !l || !u || !v || !S || !A || o.send({
3191
3216
  type: "REMUXER_OPTIONS",
3192
3217
  remuxerOptions: {
3193
3218
  publicPath: v,
3194
- workerUrl: x,
3219
+ workerUrl: S,
3195
3220
  bufferSize: e.bufferSize ?? lo,
3196
3221
  length: u,
3197
3222
  read: l
@@ -3217,7 +3242,7 @@ position: relative;
3217
3242
  type: "SET_VOLUME",
3218
3243
  muted: b === "true",
3219
3244
  volume: isNaN(Number(m)) ? 1 : Number(m)
3220
- }), y(!1)) : (g(s.toString()), S(c ? "true" : "false")));
3245
+ }), y(!1)) : (g(s.toString()), x(c ? "true" : "false")));
3221
3246
  }, [d, s, c, h]), z(() => {
3222
3247
  if (a === "OK")
3223
3248
  return () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banou/media-player",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
@@ -5,6 +5,7 @@ import { css } from '@emotion/react'
5
5
 
6
6
  import { MediaMachineContext } from '../state-machines'
7
7
  import { MediaPlayerContext } from '../utils/context'
8
+ import { fonts } from '../utils/fonts'
8
9
 
9
10
  const style = css`
10
11
  top: unset !important;
@@ -20,14 +21,15 @@ const titleStyle = css`
20
21
  top: 0;
21
22
  left: 0;
22
23
  width: 100%;
23
- height: 100%;
24
- margin-left: 2.5rem;
25
- margin-top: 2.5rem;
26
- font-size: 2rem;
24
+ padding: 2.4rem;
25
+ ${fonts.headings.small}
27
26
  color: white;
28
27
  text-shadow: 0 0 4px rgba(0, 0, 0, 1);
29
28
  z-index: 2;
30
29
  pointer-events: none;
30
+
31
+ background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 80%, transparent 100%);
32
+ transition: opacity 0.1s cubic-bezier(.4,0,1,1);
31
33
  `
32
34
 
33
35
  const loadingInformationStyle = css`
@@ -67,8 +69,15 @@ export const Overlay = ({ loadingInformation }: { loadingInformation?: ReactNode
67
69
  return (
68
70
  <>
69
71
  {
70
- mediaPlayerContext.title && !mediaPlayerContext.hideUI
71
- ? <div css={titleStyle}>{mediaPlayerContext.title}</div>
72
+ mediaPlayerContext.title
73
+ ? (
74
+ <div
75
+ css={titleStyle}
76
+ style={{ ...mediaPlayerContext.hideUI ? { opacity: '0', pointerEvents: 'none' } : {} }}
77
+ >
78
+ {mediaPlayerContext.title}
79
+ </div>
80
+ )
72
81
  : undefined
73
82
  }
74
83
  {
@@ -25,12 +25,16 @@ export default fromCallback<MediaPropertiesEvents, MediaPropertiesInput, MediaPr
25
25
 
26
26
  receive((event) => {
27
27
  if (event.type === 'PLAY') {
28
- videoElement.play()
29
- handlePlay()
28
+ videoElement
29
+ .play()
30
+ .then(() => handlePlay())
31
+ .catch((error) => {
32
+ console.error(error)
33
+ })
30
34
  }
31
35
  if (event.type === 'PAUSE') {
32
36
  videoElement.pause()
33
- handlePlay()
37
+ handlePause()
34
38
  }
35
39
  if (event.type === 'SET_TIME') {
36
40
  videoElement.currentTime = event.value
@@ -26,6 +26,10 @@ export const fonts = {
26
26
  font-size: 1.8rem;
27
27
  line-height: 2.2rem;
28
28
  }
29
+ @media (min-width: 2560px) {
30
+ font-size: 2.2rem;
31
+ line-height: 2.6rem;
32
+ }
29
33
  `,
30
34
  extraSmall: `
31
35
  font-weight: 500;