@grizzshutsdown/simpleplayer 0.1.7 → 0.1.9

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.
@@ -1,4 +1,4 @@
1
- const u = "16 / 9", m = "360px 0px", f = [
1
+ const p = "16 / 9", m = "360px 0px", f = [
2
2
  "src",
3
3
  "aspect-ratio",
4
4
  "preload-margin",
@@ -49,8 +49,10 @@ function a(o) {
49
49
  }
50
50
  function k(o) {
51
51
  const t = o;
52
- if (t.audioTracks && typeof t.audioTracks.length == "number")
53
- return t.audioTracks.length > 0 ? "available" : "unavailable";
52
+ if (t.audioTracks && typeof t.audioTracks.length == "number") {
53
+ if (t.audioTracks.length > 0) return "available";
54
+ if (o.readyState >= HTMLMediaElement.HAVE_METADATA) return "unavailable";
55
+ }
54
56
  const s = o;
55
57
  if (typeof s.mozHasAudio == "boolean")
56
58
  return s.mozHasAudio ? "available" : "unavailable";
@@ -80,7 +82,7 @@ function E(o, t) {
80
82
  }
81
83
  const C = `
82
84
  :host {
83
- --simple-player-aspect-ratio: ${u};
85
+ --simple-player-aspect-ratio: ${p};
84
86
  --space: 4px;
85
87
  --white: #fff;
86
88
  --black: #000;
@@ -164,6 +166,7 @@ const C = `
164
166
  min-height: 100%;
165
167
  overflow: hidden;
166
168
  --sp-progress-inset: 100%;
169
+ --sp-hover-fill-inset: 100%;
167
170
  --sp-scrub-preview-left: 0px;
168
171
  --sp-return-marker-left: 0px;
169
172
  --sp-return-marker-base-opacity: 1;
@@ -752,6 +755,28 @@ const C = `
752
755
  will-change: clip-path;
753
756
  }
754
757
 
758
+ .sp-progress-hover-fill {
759
+ position: absolute;
760
+ bottom: calc(var(--space) * 2);
761
+ left: 2px;
762
+ right: 2px;
763
+ z-index: 0;
764
+ height: var(--sp-progress-height);
765
+ border-radius: 3px;
766
+ background: var(--white);
767
+ opacity: 0;
768
+ pointer-events: none;
769
+ clip-path: inset(0 var(--sp-hover-fill-inset) 0 0 round 3px);
770
+ transform: translateZ(0);
771
+ transition: height 180ms ease, opacity 120ms ease;
772
+ }
773
+
774
+ .sp-progress:hover .sp-progress-hover-fill,
775
+ .sp-player.is-progress-hovering .sp-progress-hover-fill,
776
+ .sp-player.is-scrubbing .sp-progress-hover-fill {
777
+ opacity: 0.2;
778
+ }
779
+
755
780
  .sp-progress-marker {
756
781
  position: absolute;
757
782
  bottom: calc((var(--space) * 2) + 1.5px);
@@ -861,7 +886,7 @@ const C = `
861
886
  position: relative;
862
887
  right: auto;
863
888
  bottom: auto;
864
- width: calc(var(--sp-tray-time-width, 40px) + (var(--sp-control-tray-padding) * 2));
889
+ width: calc(var(--sp-tray-time-width, max-content) + (var(--sp-control-tray-padding) * 2));
865
890
  height: calc(var(--sp-control-slot-size) + (var(--sp-control-tray-padding) * 2));
866
891
  transition: width 240ms cubic-bezier(0.23, 1, 0.32, 1);
867
892
  overflow: hidden;
@@ -875,7 +900,6 @@ const C = `
875
900
 
876
901
  .sp-tray-time-holder .sp-control-tray-slots::before {
877
902
  width: calc(100% - (var(--sp-control-tray-padding) * 2));
878
- opacity: var(--sp-control-hover-opacity);
879
903
  }
880
904
 
881
905
  .sp-tray-time-holder .sp-tray-time-text {
@@ -1034,8 +1058,8 @@ const C = `
1034
1058
  transform: translateY(0) scale(1);
1035
1059
  }
1036
1060
  }
1037
- `, p = document.createElement("template");
1038
- p.innerHTML = `
1061
+ `, u = document.createElement("template");
1062
+ u.innerHTML = `
1039
1063
  <style>${C}</style>
1040
1064
  <div class="sp-player is-loading" data-sp-player>
1041
1065
  <video
@@ -1067,6 +1091,7 @@ p.innerHTML = `
1067
1091
  <span class="sp-time-text" data-sp-time-text>0:00</span>
1068
1092
  </span>
1069
1093
  <span class="sp-progress-fill" data-sp-progress></span>
1094
+ <span class="sp-progress-hover-fill" aria-hidden="true"></span>
1070
1095
  <span class="sp-progress-marker" aria-hidden="true"></span>
1071
1096
  </div>
1072
1097
  <span class="sp-tray-time" data-sp-tray-time>
@@ -1135,14 +1160,14 @@ class A extends HTMLElement {
1135
1160
  #V;
1136
1161
  #j;
1137
1162
  #oe;
1138
- #m;
1163
+ #c;
1139
1164
  #ss;
1140
1165
  #Es;
1141
1166
  #o;
1142
1167
  #z;
1143
- #p;
1144
- #O;
1168
+ #d;
1145
1169
  #Z;
1170
+ #O;
1146
1171
  #K = [];
1147
1172
  #ot = 0;
1148
1173
  #a = !1;
@@ -1183,7 +1208,7 @@ class A extends HTMLElement {
1183
1208
  #It = !1;
1184
1209
  #v = !1;
1185
1210
  #Rt = !1;
1186
- #ut = !1;
1211
+ #pt = !1;
1187
1212
  #U = !1;
1188
1213
  #os = null;
1189
1214
  #ns = null;
@@ -1191,7 +1216,7 @@ class A extends HTMLElement {
1191
1216
  #F = !1;
1192
1217
  #N = !1;
1193
1218
  #n = null;
1194
- #pt = 0;
1219
+ #ut = 0;
1195
1220
  #dt = 0;
1196
1221
  #mt = 0;
1197
1222
  #as = null;
@@ -1205,8 +1230,8 @@ class A extends HTMLElement {
1205
1230
  #Ss = 1200;
1206
1231
  #Ht = 1600;
1207
1232
  #ce = 140;
1208
- #ue = 380;
1209
- #pe = 650;
1233
+ #pe = 380;
1234
+ #ue = 650;
1210
1235
  #de = 2e3;
1211
1236
  #me = 3;
1212
1237
  #fe = 10;
@@ -1214,7 +1239,7 @@ class A extends HTMLElement {
1214
1239
  #be = 8;
1215
1240
  #ve = 18;
1216
1241
  constructor() {
1217
- super(), this.#r = this.attachShadow({ mode: "open" }), this.#r.append(p.content.cloneNode(!0));
1242
+ super(), this.#r = this.attachShadow({ mode: "open" }), this.#r.append(u.content.cloneNode(!0));
1218
1243
  }
1219
1244
  get src() {
1220
1245
  return this.getAttribute("src") ?? "";
@@ -1223,7 +1248,7 @@ class A extends HTMLElement {
1223
1248
  this.#cs("src", t);
1224
1249
  }
1225
1250
  get aspectRatio() {
1226
- return this.getAttribute("aspect-ratio") || u;
1251
+ return this.getAttribute("aspect-ratio") || p;
1227
1252
  }
1228
1253
  set aspectRatio(t) {
1229
1254
  this.#cs("aspect-ratio", t);
@@ -1268,7 +1293,7 @@ class A extends HTMLElement {
1268
1293
  return this.controlsEnabled && !this.hasAttribute("disable-volume") && !this.hasAttribute("no-volume");
1269
1294
  }
1270
1295
  set volumeEnabled(t) {
1271
- this.#us("volume", t);
1296
+ this.#ps("volume", t);
1272
1297
  }
1273
1298
  get volumeSliderEnabled() {
1274
1299
  return !this.hasAttribute("disable-volume-slider") && !this.hasAttribute("no-volume-slider");
@@ -1284,19 +1309,19 @@ class A extends HTMLElement {
1284
1309
  return this.controlsEnabled && !this.hasAttribute("disable-picture-in-picture") && !this.hasAttribute("no-picture-in-picture");
1285
1310
  }
1286
1311
  set pictureInPictureEnabled(t) {
1287
- this.#us("picture-in-picture", t);
1312
+ this.#ps("picture-in-picture", t);
1288
1313
  }
1289
1314
  get fullscreenEnabled() {
1290
1315
  return this.controlsEnabled && !this.hasAttribute("disable-fullscreen") && !this.hasAttribute("no-fullscreen");
1291
1316
  }
1292
1317
  set fullscreenEnabled(t) {
1293
- this.#us("fullscreen", t);
1318
+ this.#ps("fullscreen", t);
1294
1319
  }
1295
1320
  connectedCallback() {
1296
- this.#s = this.#r.querySelector("[data-sp-player]"), this.#t = this.#r.querySelector("[data-sp-video]"), this.#M = this.#r.querySelector("[data-sp-button]"), this.#i = this.#r.querySelector("[data-sp-progress-track]"), this.#V = this.#r.querySelector("[data-sp-control-tray]"), this.#j = this.#r.querySelector("[data-sp-control-tray-slots]"), this.#oe = this.#r.querySelector("[data-sp-tray-time]"), this.#m = this.#r.querySelector("[data-sp-tray-time-text]"), this.#ss = this.#r.querySelector("[data-sp-time]"), this.#Es = this.#r.querySelector("[data-sp-time-text]"), this.#o = this.#r.querySelector("[data-sp-volume-control]"), this.#z = this.#r.querySelector("[data-sp-volume-popover]"), this.#p = this.#r.querySelector("[data-sp-volume-track]"), this.#O = this.#r.querySelector("[data-sp-picture-in-picture-control]"), this.#Z = this.#r.querySelector("[data-sp-fullscreen-control]"), this.#K = [this.#o, this.#O, this.#Z], this.#Ms(), this.#ts || (this.#ge(), this.#ts = !0), this.#Bt(), this.#ms(), this.#ps(), this.#ds(), this.#w(), this.#y(), this.#Tt(), this.#Qt(), this.#u();
1321
+ this.#s = this.#r.querySelector("[data-sp-player]"), this.#t = this.#r.querySelector("[data-sp-video]"), this.#M = this.#r.querySelector("[data-sp-button]"), this.#i = this.#r.querySelector("[data-sp-progress-track]"), this.#V = this.#r.querySelector("[data-sp-control-tray]"), this.#j = this.#r.querySelector("[data-sp-control-tray-slots]"), this.#oe = this.#r.querySelector("[data-sp-tray-time]"), this.#c = this.#r.querySelector("[data-sp-tray-time-text]"), this.#ss = this.#r.querySelector("[data-sp-time]"), this.#Es = this.#r.querySelector("[data-sp-time-text]"), this.#o = this.#r.querySelector("[data-sp-volume-control]"), this.#z = this.#r.querySelector("[data-sp-volume-popover]"), this.#d = this.#r.querySelector("[data-sp-volume-track]"), this.#Z = this.#r.querySelector("[data-sp-picture-in-picture-control]"), this.#O = this.#r.querySelector("[data-sp-fullscreen-control]"), this.#K = [this.#o, this.#Z, this.#O], this.#Ms(), this.#ts || (this.#ge(), this.#ts = !0), this.#Bt(), this.#ms(), this.#us(), this.#ds(), this.#w(), this.#y(), this.#Tt(), this.#Qt(), this.#u();
1297
1322
  }
1298
1323
  disconnectedCallback() {
1299
- this.#E?.disconnect(), this.#E = null, this.#At.forEach((t) => t()), this.#At = [], this.#ts = !1, this.#P(), this.#$s(), this.#Ot(), this.#gs(), this.#rt(), this.#Zt(), this.#Ct(), this.#Us(), this.#vs(), this.#s.classList.remove("is-volume-icon-animating"), this.#j.style.removeProperty("--sp-control-hover-offset"), this.style.removeProperty("--sp-touch-control-hover-offset"), this.#xt(), this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#F = !1, this.#N = !1, this.#U = !1, this.#n = null, this.#o.classList.remove("is-volume-open"), this.#K.forEach((t) => t.classList.remove("is-control-tap-active")), this.#s.classList.remove("is-pointer-active"), this.#kt();
1324
+ this.#E?.disconnect(), this.#E = null, this.#At.forEach((t) => t()), this.#At = [], this.#ts = !1, this.#P(), this.#$s(), this.#Zt(), this.#gs(), this.#rt(), this.#Ot(), this.#Ct(), this.#Us(), this.#vs(), this.#s.classList.remove("is-volume-icon-animating"), this.#j.style.removeProperty("--sp-control-hover-offset"), this.style.removeProperty("--sp-touch-control-hover-offset"), this.#xt(), this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#F = !1, this.#N = !1, this.#U = !1, this.#n = null, this.#o.classList.remove("is-volume-open"), this.#K.forEach((t) => t.classList.remove("is-control-tap-active")), this.#s.classList.remove("is-pointer-active"), this.#kt();
1300
1325
  }
1301
1326
  attributeChangedCallback(t, s, e) {
1302
1327
  if (s !== e) {
@@ -1320,7 +1345,7 @@ class A extends HTMLElement {
1320
1345
  this.#ds();
1321
1346
  return;
1322
1347
  }
1323
- (t === "controls" || t.startsWith("enable-") || t.startsWith("disable-") || t.startsWith("no-")) && this.isConnected && (this.#ps(), this.#y(), this.#Tt(), this.#Qt(), this.#ds());
1348
+ (t === "controls" || t.startsWith("enable-") || t.startsWith("disable-") || t.startsWith("no-")) && this.isConnected && (this.#us(), this.#y(), this.#Tt(), this.#Qt(), this.#ds());
1324
1349
  }
1325
1350
  }
1326
1351
  #cs(t, s) {
@@ -1330,7 +1355,7 @@ class A extends HTMLElement {
1330
1355
  }
1331
1356
  this.setAttribute(t, s);
1332
1357
  }
1333
- #us(t, s) {
1358
+ #ps(t, s) {
1334
1359
  if (s) {
1335
1360
  this.setAttribute(`enable-${t}`, ""), this.removeAttribute(`disable-${t}`), this.removeAttribute(`no-${t}`);
1336
1361
  return;
@@ -1349,12 +1374,12 @@ class A extends HTMLElement {
1349
1374
  }
1350
1375
  this.#t.removeAttribute("autoplay"), this.#C || (this.#t.muted = !1, this.#t.removeAttribute("muted"));
1351
1376
  }
1352
- #ps() {
1377
+ #us() {
1353
1378
  if (!this.#s) return;
1354
1379
  const t = this.#T(), s = [
1355
1380
  { button: this.#o, enabled: t, className: "has-volume-control" },
1356
- { button: this.#O, enabled: this.pictureInPictureEnabled, className: "has-picture-in-picture-control" },
1357
- { button: this.#Z, enabled: this.fullscreenEnabled, className: "has-fullscreen-control" }
1381
+ { button: this.#Z, enabled: this.pictureInPictureEnabled, className: "has-picture-in-picture-control" },
1382
+ { button: this.#O, enabled: this.fullscreenEnabled, className: "has-fullscreen-control" }
1358
1383
  ];
1359
1384
  let e = 0;
1360
1385
  for (const i of s)
@@ -1368,17 +1393,20 @@ class A extends HTMLElement {
1368
1393
  this.#s && (this.#s.classList.toggle("has-pinned-time", this.#bt), this.#bt && this.#wt());
1369
1394
  }
1370
1395
  #ge() {
1371
- this.#e(this.#M, "click", this.#_e), this.#e(this, "pointerenter", this.#_t), this.#e(this, "pointermove", this.#Wt), this.#e(this, "pointerleave", this.#jt), this.#e(this, "mouseenter", this.#_t), this.#e(this, "mousemove", this.#Wt), this.#e(this, "mouseleave", this.#jt), this.#e(this.#s, "pointerenter", this.#_t), this.#e(this.#s, "pointermove", this.#Wt), this.#e(this.#s, "pointerleave", this.#jt), this.#e(this.#s, "mouseenter", this.#_t), this.#e(this.#s, "mousemove", this.#Wt), this.#e(this.#s, "mouseleave", this.#jt), this.#e(this.#M, "pointerenter", this.#et), this.#e(this.#M, "pointerleave", this.#it), this.#e(this.#M, "mouseenter", this.#et), this.#e(this.#M, "mouseleave", this.#it), this.#e(this.#i, "pointerenter", this.#et), this.#e(this.#i, "pointerleave", this.#it), this.#e(this.#i, "mouseenter", this.#et), this.#e(this.#i, "mouseleave", this.#it), this.#e(this.#i, "pointerenter", this.#ie), this.#e(this.#i, "pointerleave", this.#re), this.#e(this.#i, "mouseenter", this.#ie), this.#e(this.#i, "mouseleave", this.#re), this.#e(this.#V, "pointerenter", this.#et), this.#e(this.#V, "pointerleave", this.#it), this.#e(this.#V, "mouseenter", this.#et), this.#e(this.#V, "mouseleave", this.#it), this.#e(this.#r, "focusin", this.#Hs), this.#e(this.#r, "focusout", this.#xe), this.#e(this.#s, "pointerdown", this.#We), this.#e(this.#s, "dragstart", this.#Ut), this.#e(this.#s, "selectstart", this.#Ut), this.#e(this.#t, "dragstart", this.#Ut), this.#e(this.#t, "selectstart", this.#Ut), this.#e(this.#i, "pointerdown", this.#ei), this.#e(this.#i, "pointermove", this.#ri), this.#e(this.#i, "pointerup", this.#oi), this.#e(this.#i, "pointercancel", this.#ni), this.#e(this.#i, "keydown", this.#ii), this.#e(this.#o, "pointerenter", this.#se), this.#e(this.#o, "pointerleave", this.#ee), this.#e(this.#o, "click", this.#Oe), this.#e(this.#z, "pointerenter", this.#se), this.#e(this.#z, "pointerleave", this.#ee), this.#e(this.#p, "pointerdown", this.#Ze), this.#e(this.#p, "pointermove", this.#Ke), this.#e(this.#p, "pointerup", this.#Ge), this.#e(this.#p, "pointercancel", this.#Je), this.#e(this.#p, "click", this.#je), this.#e(this.#p, "keydown", this.#Qe), this.#e(this.#O, "click", this.#ti), this.#e(this.#Z, "click", this.#si), this.#e(this.#m, "click", this.#Xe);
1396
+ this.#e(this.#M, "click", this.#_e), this.#e(this, "pointerenter", this.#_t), this.#e(this, "pointermove", this.#Wt), this.#e(this, "pointerleave", this.#jt), this.#e(this, "mouseenter", this.#_t), this.#e(this, "mousemove", this.#Wt), this.#e(this, "mouseleave", this.#jt), this.#e(this.#s, "pointerenter", this.#_t), this.#e(this.#s, "pointermove", this.#Wt), this.#e(this.#s, "pointerleave", this.#jt), this.#e(this.#s, "mouseenter", this.#_t), this.#e(this.#s, "mousemove", this.#Wt), this.#e(this.#s, "mouseleave", this.#jt), this.#e(this.#M, "pointerenter", this.#et), this.#e(this.#M, "pointerleave", this.#it), this.#e(this.#M, "mouseenter", this.#et), this.#e(this.#M, "mouseleave", this.#it), this.#e(this.#i, "pointerenter", this.#et), this.#e(this.#i, "pointerleave", this.#it), this.#e(this.#i, "mouseenter", this.#et), this.#e(this.#i, "mouseleave", this.#it), this.#e(this.#i, "pointerenter", this.#ie), this.#e(this.#i, "pointerleave", this.#re), this.#e(this.#i, "mouseenter", this.#ie), this.#e(this.#i, "mouseleave", this.#re), this.#e(this.#V, "pointerenter", this.#et), this.#e(this.#V, "pointerleave", this.#it), this.#e(this.#V, "mouseenter", this.#et), this.#e(this.#V, "mouseleave", this.#it), this.#e(this.#r, "focusin", this.#Hs), this.#e(this.#r, "focusout", this.#xe), this.#e(this.#s, "pointerdown", this.#We), this.#e(this.#s, "dragstart", this.#Ut), this.#e(this.#s, "selectstart", this.#Ut), this.#e(this.#t, "dragstart", this.#Ut), this.#e(this.#t, "selectstart", this.#Ut), this.#e(this.#i, "pointerdown", this.#ei), this.#e(this.#i, "pointermove", this.#ri), this.#e(this.#i, "pointerup", this.#oi), this.#e(this.#i, "pointercancel", this.#ni), this.#e(this.#i, "keydown", this.#ii), this.#e(this.#o, "pointerenter", this.#se), this.#e(this.#o, "pointerleave", this.#ee), this.#e(this.#o, "click", this.#Ze), this.#e(this.#z, "pointerenter", this.#se), this.#e(this.#z, "pointerleave", this.#ee), this.#e(this.#d, "pointerdown", this.#Oe), this.#e(this.#d, "pointermove", this.#Ke), this.#e(this.#d, "pointerup", this.#Ge), this.#e(this.#d, "pointercancel", this.#Je), this.#e(this.#d, "click", this.#je), this.#e(this.#d, "keydown", this.#Qe), this.#e(this.#Z, "click", this.#ti), this.#e(this.#O, "click", this.#si), this.#e(this.#c, "click", this.#Xe);
1372
1397
  for (const t of this.#K)
1373
1398
  this.#e(t, "pointerenter", this.#qs), this.#e(t, "mouseenter", this.#qs), this.#e(t, "pointerdown", this.#ke);
1374
1399
  "ResizeObserver" in window && (this.#Mt = new ResizeObserver(() => {
1375
1400
  this.#$t();
1376
- }), this.#Mt.observe(this.#m), this.#At.push(() => {
1401
+ }), this.#Mt.observe(this.#c), this.#At.push(() => {
1377
1402
  this.#Mt?.disconnect(), this.#Mt = null;
1378
- })), this.#e(document, "pointerup", this.#ai), this.#e(document, "pointercancel", this.#li), this.#e(document, "pointermove", this.#Ds), this.#e(document, "mousemove", this.#Ds), this.#e(document, "fullscreenchange", this.#Et), this.#e(document, "webkitfullscreenchange", this.#Et), this.#e(document, "mozfullscreenchange", this.#Et), this.#e(document, "MSFullscreenChange", this.#Et), this.#e(this.#r, "fullscreenchange", this.#Et), this.#e(window, "blur", this.#hi), this.#e(window, "focus", this.#ci), this.#e(this.#t, "play", this.#ui), this.#e(this.#t, "pause", this.#pi), this.#e(this.#t, "ended", this.#di), this.#e(this.#t, "loadstart", this.#mi), this.#e(this.#t, "waiting", this.#Ts), this.#e(this.#t, "stalled", this.#Ts), this.#e(this.#t, "seeking", this.#Ts), this.#e(this.#t, "loadeddata", this.#Kt), this.#e(this.#t, "loadedmetadata", this.#fi), this.#e(this.#t, "canplay", this.#Kt), this.#e(this.#t, "canplaythrough", this.#Kt), this.#e(this.#t, "playing", this.#bi), this.#e(this.#t, "seeked", this.#vi), this.#e(this.#t, "error", this.#gi), this.#e(this.#t, "progress", this.#w), this.#e(this.#t, "suspend", this.#w), this.#e(this.#t, "timeupdate", this.#yi), this.#e(this.#t, "volumechange", this.#wi), this.#e(this.#t, "enterpictureinpicture", this.#Tt), this.#e(this.#t, "leavepictureinpicture", this.#Tt);
1403
+ })), this.#e(document, "pointerup", this.#ai), this.#e(document, "pointercancel", this.#li), this.#e(document, "pointermove", this.#Ds), this.#e(document, "mousemove", this.#Ds), this.#e(document, "fullscreenchange", this.#Et), this.#e(document, "webkitfullscreenchange", this.#Et), this.#e(document, "mozfullscreenchange", this.#Et), this.#e(document, "MSFullscreenChange", this.#Et), this.#e(this.#r, "fullscreenchange", this.#Et), this.#e(window, "blur", this.#hi), this.#e(window, "focus", this.#ci), this.#e(this.#t, "play", this.#pi), this.#e(this.#t, "pause", this.#ui), this.#e(this.#t, "ended", this.#di), this.#e(this.#t, "loadstart", this.#mi), this.#e(this.#t, "waiting", this.#Ts), this.#e(this.#t, "stalled", this.#Ts), this.#e(this.#t, "seeking", this.#Ts), this.#e(this.#t, "loadeddata", this.#Kt), this.#e(this.#t, "loadedmetadata", this.#fi), this.#e(this.#t, "canplay", this.#Kt), this.#e(this.#t, "canplaythrough", this.#Kt), this.#e(this.#t, "playing", this.#bi), this.#e(this.#t, "seeked", this.#vi), this.#e(this.#t, "error", this.#gi), this.#e(this.#t, "progress", this.#w), this.#e(this.#t, "suspend", this.#w), this.#e(this.#t, "timeupdate", this.#yi), this.#e(this.#t, "volumechange", this.#wi), this.#e(this.#t, "enterpictureinpicture", this.#Tt), this.#e(this.#t, "leavepictureinpicture", this.#Tt);
1379
1404
  }
1380
1405
  #$t() {
1381
- !this.#s || !this.#m || this.#s.style.setProperty("--sp-tray-time-width", `${Math.ceil(this.#m.scrollWidth)}px`);
1406
+ if (!this.#s || !this.#c) return;
1407
+ this.#c.style.width = "fit-content";
1408
+ const t = Math.ceil(this.#c.scrollWidth);
1409
+ this.#c.style.width = "", this.#s.style.setProperty("--sp-tray-time-width", `${t}px`);
1382
1410
  }
1383
1411
  #e(t, s, e) {
1384
1412
  t.addEventListener(s, e), this.#At.push(() => t.removeEventListener(s, e));
@@ -1402,26 +1430,26 @@ class A extends HTMLElement {
1402
1430
  }
1403
1431
  #ye = () => {
1404
1432
  if (this.#at = 0, !(this.#x || this.#a || this.#F)) {
1405
- if (this.#d()) {
1433
+ if (this.#m()) {
1406
1434
  this.#s.classList.remove("is-controls-visible");
1407
1435
  return;
1408
1436
  }
1409
1437
  this.#U || this.#s.classList.remove("is-pointer-active");
1410
1438
  }
1411
1439
  };
1412
- #Nt(t = this.#d() ? this.#Ss : this.#Ht) {
1440
+ #Nt(t = this.#m() ? this.#Ss : this.#Ht) {
1413
1441
  this.#P(), this.#at = window.setTimeout(this.#ye, t);
1414
1442
  }
1415
1443
  #R() {
1416
- this.#d() && this.#Nt(this.#Ss);
1444
+ this.#m() && this.#Nt(this.#Ss);
1417
1445
  }
1418
1446
  #D() {
1419
- if (!this.#d()) return !1;
1447
+ if (!this.#m()) return !1;
1420
1448
  const t = this.#s.classList.contains("is-controls-visible");
1421
1449
  return this.#s.classList.add("is-controls-visible"), this.#R(), !t;
1422
1450
  }
1423
1451
  #fs(t = !1) {
1424
- !t && this.#d() || (this.#s.classList.add("is-pointer-active"), this.#U ? this.#P() : this.#Nt(t ? this.#Ht : void 0));
1452
+ !t && this.#m() || (this.#s.classList.add("is-pointer-active"), this.#U ? this.#P() : this.#Nt(t ? this.#Ht : void 0));
1425
1453
  }
1426
1454
  #Yt() {
1427
1455
  this.#U = !1, this.#P(), this.#s.classList.remove("is-pointer-active");
@@ -1440,11 +1468,11 @@ class A extends HTMLElement {
1440
1468
  return i.width <= 0 || i.height <= 0 ? !1 : s >= i.left && s <= i.right && e >= i.top && e <= i.bottom;
1441
1469
  }
1442
1470
  #zs() {
1443
- this.#v && (this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#xt(), this.#wt());
1471
+ this.#v && (this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#s.style.setProperty("--sp-hover-fill-inset", "100%"), this.#xt(), this.#wt());
1444
1472
  }
1445
1473
  #Is(t, s) {
1446
- if (this.#d()) return;
1447
- !this.#c() && this.#Vs(this.#i, t, s) ? (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#W(t, !1, !1)) : this.#c() || this.#zs();
1474
+ if (this.#m()) return;
1475
+ !this.#p() && this.#Vs(this.#i, t, s) ? (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#W(t, !1, !1)) : this.#p() || this.#zs();
1448
1476
  const e = this.#K.find((r) => !r.hidden && !this.#bs(r) && this.#Vs(r, t, s)) ?? null;
1449
1477
  if (!e) return;
1450
1478
  const i = Number(e.dataset.spControlIndex ?? 0);
@@ -1454,7 +1482,7 @@ class A extends HTMLElement {
1454
1482
  return this.#s.classList.contains("is-controls-visible") || this.#s.classList.contains("is-pointer-active") || this.#r.activeElement instanceof HTMLElement;
1455
1483
  }
1456
1484
  #Xt() {
1457
- return this.#d() && performance.now() < this.#rs;
1485
+ return this.#m() && performance.now() < this.#rs;
1458
1486
  }
1459
1487
  #bs(t) {
1460
1488
  return t instanceof HTMLButtonElement && (t.disabled || t === this.#o && !this.#T());
@@ -1485,7 +1513,7 @@ class A extends HTMLElement {
1485
1513
  this.#U = !1, this.#Nt(this.#Ht);
1486
1514
  };
1487
1515
  #Hs = () => {
1488
- this.#d() ? this.#s.classList.add("is-controls-visible") : this.#s.classList.add("is-pointer-active"), this.#P();
1516
+ this.#m() ? this.#s.classList.add("is-controls-visible") : this.#s.classList.add("is-pointer-active"), this.#P();
1489
1517
  };
1490
1518
  #xe = () => {
1491
1519
  this.#Nt(this.#Ht);
@@ -1512,13 +1540,13 @@ class A extends HTMLElement {
1512
1540
  #$s() {
1513
1541
  this.#lt && (window.clearTimeout(this.#lt), this.#lt = 0);
1514
1542
  }
1515
- #Ot() {
1543
+ #Zt() {
1516
1544
  this.#Q && (window.clearTimeout(this.#Q), this.#Q = 0);
1517
1545
  }
1518
1546
  #gs() {
1519
1547
  this.#tt && (window.clearTimeout(this.#tt), this.#tt = 0);
1520
1548
  }
1521
- #Zt() {
1549
+ #Ot() {
1522
1550
  this.#Vt && (window.clearTimeout(this.#Vt), this.#Vt = 0);
1523
1551
  }
1524
1552
  #Us() {
@@ -1535,16 +1563,16 @@ class A extends HTMLElement {
1535
1563
  this.#s.classList.remove("is-progress-settling");
1536
1564
  return;
1537
1565
  }
1538
- this.#ht = !0, this.#As = performance.now() + this.#pe, this.#c() || this.#l(), this.#g(), this.#s.classList.remove("is-progress-settling"), this.#u();
1566
+ this.#ht = !0, this.#As = performance.now() + this.#ue, this.#p() || this.#l(), this.#g(), this.#s.classList.remove("is-progress-settling"), this.#u();
1539
1567
  }
1540
1568
  };
1541
1569
  #Te() {
1542
- this.#ht || this.#tt || (this.#s.classList.add("is-progress-settling"), this.#_(0), this.#tt = window.setTimeout(this.#Ns, this.#ue));
1570
+ this.#ht || this.#tt || (this.#s.classList.add("is-progress-settling"), this.#_(0), this.#tt = window.setTimeout(this.#Ns, this.#pe));
1543
1571
  }
1544
1572
  async #Y() {
1545
1573
  if (this.#C) return;
1546
1574
  const t = this.#t.dataset.src || this.src;
1547
- t && (this.#Ot(), this.#Zt(), this.#is += 1, this.#C = !0, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#Bt(), this.#t.src = t, this.#t.preload = "auto", this.#t.load(), this.#t.autoplay && this.#t.muted && await this.#t.play().catch(() => {
1575
+ t && (this.#Zt(), this.#Ot(), this.#is += 1, this.#C = !0, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#Bt(), this.#t.src = t, this.#t.preload = "auto", this.#t.load(), this.#t.autoplay && this.#t.muted && await this.#t.play().catch(() => {
1548
1576
  }));
1549
1577
  }
1550
1578
  #Ys() {
@@ -1600,26 +1628,26 @@ class A extends HTMLElement {
1600
1628
  #Ce() {
1601
1629
  return this.#C && !this.#t.error && this.#A && (this.#t.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA || this.#t.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !this.#s.classList.contains("is-loading"));
1602
1630
  }
1603
- #c() {
1631
+ #p() {
1604
1632
  return this.#x || this.#a || this.#I;
1605
1633
  }
1606
1634
  #Ae() {
1607
1635
  this.#is >= this.#me || this.#Q || (this.#Q = window.setTimeout(() => {
1608
- this.#Q = 0, this.#Zt(), this.#C = !1, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#s.classList.contains("has-loaded-once") || this.#_(0), this.#t.removeAttribute("src"), this.#t.load(), this.#Y();
1636
+ this.#Q = 0, this.#Ot(), this.#C = !1, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#s.classList.contains("has-loaded-once") || this.#_(0), this.#t.removeAttribute("src"), this.#t.load(), this.#Y();
1609
1637
  }, this.#de));
1610
1638
  }
1611
1639
  #_s() {
1612
1640
  return this.#I ? (this.#I = !1, this.#nt = !1, this.#l(), this.#g(), !0) : !1;
1613
1641
  }
1614
1642
  #Ws() {
1615
- return this.#Ot(), !this.#s.classList.contains("has-loaded-once") && this.#Te(), this.#s.classList.add("has-loaded-once"), this.#s.classList.add("has-visible-frame"), this.#w(), this.#b = null, this.#I ? (this.#_s(), !0) : (this.#c() || this.#l(), this.#g(), !0);
1643
+ return this.#Zt(), !this.#s.classList.contains("has-loaded-once") && this.#Te(), this.#s.classList.add("has-loaded-once"), this.#s.classList.add("has-visible-frame"), this.#w(), this.#b = null, this.#I ? (this.#_s(), !0) : (this.#p() || this.#l(), this.#g(), !0);
1616
1644
  }
1617
1645
  #Le() {
1618
1646
  if (this.#A || this.#q || this.#t.error) return;
1619
1647
  this.#q = !0;
1620
1648
  const t = this.#$, s = () => {
1621
1649
  if (t === this.#$) {
1622
- if (this.#Zt(), this.#q = !1, this.#A = !this.#t.error && this.#t.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && this.#t.videoWidth > 0 && this.#t.videoHeight > 0, this.#A) {
1650
+ if (this.#Ot(), this.#q = !1, this.#A = !this.#t.error && this.#t.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && this.#t.videoWidth > 0 && this.#t.videoHeight > 0, this.#A) {
1623
1651
  if (this.#B || this.#L) return;
1624
1652
  this.#B = !0, window.requestAnimationFrame(() => {
1625
1653
  window.requestAnimationFrame(() => {
@@ -1654,7 +1682,7 @@ class A extends HTMLElement {
1654
1682
  #H() {
1655
1683
  this.#k = null, this.#st = null;
1656
1684
  }
1657
- #Os() {
1685
+ #Zs() {
1658
1686
  if (!Number.isFinite(this.#t.duration) || this.#t.duration <= 0) {
1659
1687
  this.#k = null;
1660
1688
  return;
@@ -1664,7 +1692,7 @@ class A extends HTMLElement {
1664
1692
  }
1665
1693
  #Fe() {
1666
1694
  if (!Number.isFinite(this.#t.duration) || this.#t.duration <= 0) {
1667
- this.#st = null, this.#Os();
1695
+ this.#st = null, this.#Zs();
1668
1696
  return;
1669
1697
  }
1670
1698
  const t = this.#s.style.getPropertyValue("--sp-progress-inset"), s = Number.parseFloat(t), e = Number.isFinite(s) ? Math.min(1, Math.max(0, 1 - s / 100)) : null, i = this.#X(), r = Math.min(1, Math.max(0, i / this.#t.duration)), n = Math.max(e ?? 0, r);
@@ -1675,7 +1703,7 @@ class A extends HTMLElement {
1675
1703
  }
1676
1704
  #X() {
1677
1705
  if (!Number.isFinite(this.#t.duration) || this.#t.duration <= 0) return this.#t.currentTime || 0;
1678
- if (this.#c()) return this.#f;
1706
+ if (this.#p()) return this.#f;
1679
1707
  if (this.#k !== null) return this.#k;
1680
1708
  if (!this.#js()) return this.#t.currentTime || 0;
1681
1709
  if (this.#zt || !this.#ht || performance.now() < this.#As)
@@ -1721,7 +1749,7 @@ class A extends HTMLElement {
1721
1749
  } : { percent: e, targetTime: r };
1722
1750
  }
1723
1751
  #wt(t = this.#X()) {
1724
- !this.#bt || this.#v || this.#c() || (this.#m.textContent = this.#ks(t), this.#$t());
1752
+ !this.#bt || this.#v || this.#p() || (this.#c.textContent = this.#ks(t), this.#$t());
1725
1753
  }
1726
1754
  #g(t = this.#X()) {
1727
1755
  const s = Number.isFinite(this.#t.duration) && this.#t.duration > 0;
@@ -1742,7 +1770,7 @@ class A extends HTMLElement {
1742
1770
  #W(t, s = this.#a, e = !0) {
1743
1771
  if (!Number.isFinite(this.#t.duration) || this.#t.duration <= 0) return this.#t.currentTime;
1744
1772
  const i = this.#i.getBoundingClientRect(), r = this.#Ve(t, i), n = this.#Ie(t, i, r, s);
1745
- return e && this.#_(n.percent), this.#bt || this.#s.style.setProperty("--sp-scrub-preview-left", `${this.#Gt(n.percent, i)}px`), this.#Es.textContent = a(n.targetTime), this.#m.textContent = this.#ks(n.targetTime), this.#$t(), e && (this.#i.setAttribute("aria-valuenow", `${n.targetTime}`), this.#i.setAttribute(
1773
+ return this.#s.style.setProperty("--sp-hover-fill-inset", `${(1 - r) * 100}%`), e && this.#_(n.percent), this.#bt || this.#s.style.setProperty("--sp-scrub-preview-left", `${this.#Gt(n.percent, i)}px`), this.#Es.textContent = a(n.targetTime), this.#c.textContent = this.#ks(n.targetTime), this.#$t(), e && (this.#i.setAttribute("aria-valuenow", `${n.targetTime}`), this.#i.setAttribute(
1746
1774
  "aria-valuetext",
1747
1775
  `${a(n.targetTime)} of ${a(this.#t.duration)}`
1748
1776
  )), this.#Re(), n.targetTime;
@@ -1783,7 +1811,7 @@ class A extends HTMLElement {
1783
1811
  return k(this.#t);
1784
1812
  }
1785
1813
  #T() {
1786
- return this.volumeEnabled && this.#ut && this.#Rt;
1814
+ return this.volumeEnabled && this.#pt && this.#Rt;
1787
1815
  }
1788
1816
  #S() {
1789
1817
  this.#Ct(), this.#Jt(this.#n), this.#F = !1, this.#N = !1, this.#n = null, this.#o.classList.remove("is-volume-open", "is-control-tap-active"), this.#z.classList.remove("is-scrubbing-volume");
@@ -1793,30 +1821,30 @@ class A extends HTMLElement {
1793
1821
  this.#s.classList.remove("is-volume-unavailable", "is-volume-muted", "is-volume-sound", "is-volume-icon-animating"), this.#S(), this.#o.disabled = !0, this.#o.setAttribute("aria-disabled", "true");
1794
1822
  return;
1795
1823
  }
1796
- if (!this.#ut) {
1824
+ if (!this.#pt) {
1797
1825
  const l = this.#He();
1798
- l !== "unknown" ? (this.#ut = !0, this.#Rt = l === "available") : this.#t.readyState >= HTMLMediaElement.HAVE_METADATA && !P(this.#t) && (this.#ut = !0, this.#Rt = !0);
1826
+ l !== "unknown" ? (this.#pt = !0, this.#Rt = l === "available") : this.#t.readyState >= HTMLMediaElement.HAVE_METADATA && !P(this.#t) && (this.#pt = !0, this.#Rt = !0);
1799
1827
  }
1800
1828
  const t = this.#o.hidden, s = this.#T(), e = !s || this.#t.muted || this.#t.volume <= 0, i = s && !this.#t.muted ? this.#t.volume : 0, r = Math.round(i * 100), n = e ? "muted" : "sound";
1801
1829
  this.#as && this.#as !== n && this.#Pe(), this.#as = n, this.#s.classList.toggle("is-volume-unavailable", !s), this.#s.classList.toggle("is-volume-muted", e), this.#s.classList.toggle("is-volume-sound", !e), this.#s.style.setProperty("--sp-volume-level", `${r}%`), this.#o.disabled = !s, this.#o.setAttribute("aria-disabled", `${!s}`), this.#o.setAttribute(
1802
1830
  "aria-label",
1803
1831
  s ? e ? "Unmute video" : "Mute video" : "Video has no audio"
1804
- ), this.#p.setAttribute("aria-valuenow", `${r}`), this.#p.setAttribute("aria-valuetext", `${r}%`), s || this.#S(), t === s && this.#ps();
1832
+ ), this.#d.setAttribute("aria-valuenow", `${r}`), this.#d.setAttribute("aria-valuetext", `${r}%`), s || this.#S(), t === s && this.#us();
1805
1833
  };
1806
- #Zs(t) {
1834
+ #Os(t) {
1807
1835
  if (!this.#T()) return;
1808
- const s = this.#p.getBoundingClientRect(), e = Math.min(1, Math.max(0, 1 - (t - s.top) / s.height)), i = Math.round(e * 100) / 100;
1836
+ const s = this.#d.getBoundingClientRect(), e = Math.min(1, Math.max(0, 1 - (t - s.top) / s.height)), i = Math.round(e * 100) / 100;
1809
1837
  this.#t.volume = i, this.#t.muted = i <= 0, this.#y();
1810
1838
  }
1811
1839
  #Jt(t) {
1812
- t !== null && this.#p.hasPointerCapture(t) && this.#p.releasePointerCapture(t);
1840
+ t !== null && this.#d.hasPointerCapture(t) && this.#d.releasePointerCapture(t);
1813
1841
  }
1814
1842
  #Pt(t) {
1815
- this.#F = !1, this.#n = null, this.#z.classList.remove("is-scrubbing-volume"), this.#p.blur(), this.#Jt(t), this.#te(260);
1843
+ this.#F = !1, this.#n = null, this.#z.classList.remove("is-scrubbing-volume"), this.#d.blur(), this.#Jt(t), this.#te(260);
1816
1844
  }
1817
1845
  #Tt = () => {
1818
1846
  const t = document.pictureInPictureElement === this.#t, s = this.#t, e = !!(this.pictureInPictureEnabled && document.pictureInPictureEnabled && s.requestPictureInPicture);
1819
- this.#s.classList.toggle("is-picture-in-picture", t), this.#O.disabled = !e, this.#O.setAttribute("aria-label", t ? "Exit picture in picture" : "Enter picture in picture");
1847
+ this.#s.classList.toggle("is-picture-in-picture", t), this.#Z.disabled = !e, this.#Z.setAttribute("aria-label", t ? "Exit picture in picture" : "Enter picture in picture");
1820
1848
  };
1821
1849
  #ys() {
1822
1850
  return b(this.#r);
@@ -1835,7 +1863,7 @@ class A extends HTMLElement {
1835
1863
  }
1836
1864
  #Qt = () => {
1837
1865
  const t = this.#ys(), s = t === this.#s || t === this, e = this.#Ks();
1838
- return this.#s.classList.toggle("is-fullscreen", s), this.#Z.disabled = !e, this.#Z.setAttribute("aria-label", s ? "Exit fullscreen" : "Enter fullscreen"), s;
1866
+ return this.#s.classList.toggle("is-fullscreen", s), this.#O.disabled = !e, this.#O.setAttribute("aria-label", s ? "Exit fullscreen" : "Enter fullscreen"), s;
1839
1867
  };
1840
1868
  #Et = () => {
1841
1869
  const t = this.#Qt();
@@ -1855,10 +1883,10 @@ class A extends HTMLElement {
1855
1883
  async #Js(t, s, e) {
1856
1884
  if (!this.#x && !this.#a) return;
1857
1885
  const i = this.#a;
1858
- this.#rt(), this.#x = !1, this.#a = !1, this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#h = null, this.#s.classList.remove("is-scrubbing"), this.#xt(), this.#ws(s), e && t !== null && (this.#H(), this.#f = this.#W(t, i), this.#I = !0, this.#nt = this.#G, this.#t.currentTime = this.#f, this.#l(this.#f)), this.#g(this.#f), i && this.#G && await this.#t.play(), this.#R();
1886
+ this.#rt(), this.#x = !1, this.#a = !1, this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#s.style.setProperty("--sp-hover-fill-inset", "100%"), this.#h = null, this.#s.classList.remove("is-scrubbing"), this.#xt(), this.#ws(s), e && t !== null && (this.#H(), this.#f = this.#W(t, i), this.#I = !0, this.#nt = this.#G, this.#t.currentTime = this.#f, this.#l(this.#f)), this.#g(this.#f), i && this.#G && await this.#t.play(), this.#R();
1859
1887
  }
1860
1888
  #xs(t) {
1861
- !this.#x && !this.#a || (this.#rt(), this.#x = !1, this.#a = !1, this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#h = null, this.#s.classList.remove("is-scrubbing"), this.#xt(), this.#ws(t), this.#l(), this.#g(), this.#G && this.#t.play(), this.#R());
1889
+ !this.#x && !this.#a || (this.#rt(), this.#x = !1, this.#a = !1, this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#s.style.setProperty("--sp-hover-fill-inset", "100%"), this.#h = null, this.#s.classList.remove("is-scrubbing"), this.#xt(), this.#ws(t), this.#l(), this.#g(), this.#G && this.#t.play(), this.#R());
1862
1890
  }
1863
1891
  #ks(t) {
1864
1892
  if (!this.#ls) return a(t);
@@ -1869,12 +1897,12 @@ class A extends HTMLElement {
1869
1897
  this.#ft && (window.clearTimeout(this.#ft), this.#ft = 0);
1870
1898
  }
1871
1899
  #Ye() {
1872
- this.#Ne(), this.#m.classList.remove("is-time-animating"), this.#m.offsetWidth, this.#m.classList.add("is-time-animating"), this.#ft = window.setTimeout(() => {
1873
- this.#ft = 0, this.#m.classList.remove("is-time-animating");
1900
+ this.#Ne(), this.#c.classList.remove("is-time-animating"), this.#c.offsetWidth, this.#c.classList.add("is-time-animating"), this.#ft = window.setTimeout(() => {
1901
+ this.#ft = 0, this.#c.classList.remove("is-time-animating");
1874
1902
  }, 240);
1875
1903
  }
1876
1904
  #Xe = (t) => {
1877
- t.stopPropagation(), this.#ls = !this.#ls, this.#Ye(), this.#c() || this.#v ? this.#m && (this.#m.textContent = this.#ks(this.#f), this.#$t()) : this.#wt(this.#X());
1905
+ t.stopPropagation(), this.#ls = !this.#ls, this.#Ye(), this.#p() || this.#v ? this.#c && (this.#c.textContent = this.#ks(this.#f), this.#$t()) : this.#wt(this.#X());
1878
1906
  };
1879
1907
  #_e = async () => {
1880
1908
  if (performance.now() < this.#Cs)
@@ -1893,7 +1921,7 @@ class A extends HTMLElement {
1893
1921
  t.stopPropagation();
1894
1922
  };
1895
1923
  #Ct() {
1896
- this.#pt && (window.clearTimeout(this.#pt), this.#pt = 0);
1924
+ this.#ut && (window.clearTimeout(this.#ut), this.#ut = 0);
1897
1925
  }
1898
1926
  #Qs() {
1899
1927
  if (!this.#T() || !this.volumeSliderEnabled) {
@@ -1903,13 +1931,13 @@ class A extends HTMLElement {
1903
1931
  this.#Ct(), this.#o.classList.add("is-volume-open");
1904
1932
  }
1905
1933
  #Ps = () => {
1906
- this.#pt = 0, !(this.#N || this.#F) && this.#o.classList.remove("is-volume-open");
1934
+ this.#ut = 0, !(this.#N || this.#F) && this.#o.classList.remove("is-volume-open");
1907
1935
  };
1908
1936
  #te(t = 150) {
1909
- this.#Ct(), this.#pt = window.setTimeout(this.#Ps, t);
1937
+ this.#Ct(), this.#ut = window.setTimeout(this.#Ps, t);
1910
1938
  }
1911
1939
  #se = () => {
1912
- if (!this.#d()) {
1940
+ if (!this.#m()) {
1913
1941
  if (!this.#T() || !this.volumeSliderEnabled) {
1914
1942
  this.#S();
1915
1943
  return;
@@ -1918,7 +1946,7 @@ class A extends HTMLElement {
1918
1946
  }
1919
1947
  };
1920
1948
  #ee = () => {
1921
- if (!this.#d()) {
1949
+ if (!this.#m()) {
1922
1950
  if (!this.#T() || !this.volumeSliderEnabled) {
1923
1951
  this.#S();
1924
1952
  return;
@@ -1926,24 +1954,24 @@ class A extends HTMLElement {
1926
1954
  this.#N = !1, this.#te();
1927
1955
  }
1928
1956
  };
1929
- #Oe = (t) => {
1957
+ #Ze = (t) => {
1930
1958
  if (t.preventDefault(), t.stopPropagation(), !this.#T()) {
1931
1959
  this.#S();
1932
1960
  return;
1933
1961
  }
1934
1962
  !this.#gt() || this.#Xt() || (this.#D(), this.#Ps(), this.#t.muted || this.#t.volume <= 0 ? (this.#t.volume <= 0 && (this.#t.volume = 0.7), this.#t.muted = !1) : this.#t.muted = !0, this.#y(), this.#R());
1935
1963
  };
1936
- #Ze = (t) => {
1964
+ #Oe = (t) => {
1937
1965
  if (t instanceof PointerEvent) {
1938
- if (t.preventDefault(), t.stopPropagation(), !this.#T() || !this.volumeSliderEnabled || this.#d()) {
1966
+ if (t.preventDefault(), t.stopPropagation(), !this.#T() || !this.volumeSliderEnabled || this.#m()) {
1939
1967
  this.#S();
1940
1968
  return;
1941
1969
  }
1942
- this.#D(), this.#P(), this.#Qs(), this.#F = !0, this.#n = t.pointerId, this.#z.classList.add("is-scrubbing-volume"), this.#p.setPointerCapture(t.pointerId), this.#Zs(t.clientY);
1970
+ this.#D(), this.#P(), this.#Qs(), this.#F = !0, this.#n = t.pointerId, this.#z.classList.add("is-scrubbing-volume"), this.#d.setPointerCapture(t.pointerId), this.#Os(t.clientY);
1943
1971
  }
1944
1972
  };
1945
1973
  #Ke = (t) => {
1946
- t instanceof PointerEvent && this.#F && (this.#n !== null && t.pointerId !== this.#n || (t.preventDefault(), t.stopPropagation(), this.#Zs(t.clientY)));
1974
+ t instanceof PointerEvent && this.#F && (this.#n !== null && t.pointerId !== this.#n || (t.preventDefault(), t.stopPropagation(), this.#Os(t.clientY)));
1947
1975
  };
1948
1976
  #Ge = (t) => {
1949
1977
  t instanceof PointerEvent && (this.#n !== null && t.pointerId !== this.#n || (t.stopPropagation(), this.#Pt(t.pointerId), this.#R()));
@@ -1987,15 +2015,15 @@ class A extends HTMLElement {
1987
2015
  }
1988
2016
  };
1989
2017
  #ie = (t) => {
1990
- this.#d() || this.#c() || !(t instanceof PointerEvent) && !(t instanceof MouseEvent) || (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#W(t.clientX, !1, !1));
2018
+ this.#m() || this.#p() || !(t instanceof PointerEvent) && !(t instanceof MouseEvent) || (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#W(t.clientX, !1, !1));
1991
2019
  };
1992
2020
  #re = () => {
1993
- this.#c() || this.#zs();
2021
+ this.#p() || this.#zs();
1994
2022
  };
1995
2023
  #ei = (t) => {
1996
2024
  if (t instanceof PointerEvent) {
1997
2025
  if (t.preventDefault(), !this.#gt() || this.#Xt()) {
1998
- this.#D(), this.#d() && (this.#rs = performance.now() + 260);
2026
+ this.#D(), this.#m() && (this.#rs = performance.now() + 260);
1999
2027
  return;
2000
2028
  }
2001
2029
  this.#D(), this.#P(), this.#Ns(), this.#I = !1, this.#nt = !1, this.#ze(this.#X()), this.#x = !0, this.#h = t.pointerId, this.#es = t.clientX, this.#G = !this.#t.paused && !this.#t.ended, this.#i.setPointerCapture(t.pointerId), this.#f = this.#W(t.clientX, !1), this.#rt(), this.#St = window.setTimeout(this.#Gs, this.#he);
@@ -2010,7 +2038,7 @@ class A extends HTMLElement {
2010
2038
  #ri = (t) => {
2011
2039
  if (t instanceof PointerEvent) {
2012
2040
  if (!this.#x) {
2013
- this.#d() || (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#W(t.clientX, !1, !1));
2041
+ this.#m() || (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#W(t.clientX, !1, !1));
2014
2042
  return;
2015
2043
  }
2016
2044
  this.#h !== null && t.pointerId !== this.#h || (!this.#a && Math.abs(t.clientX - this.#es) >= this.#ne && this.#Gs(), this.#a && (this.#f = this.#W(t.clientX)));
@@ -2046,14 +2074,14 @@ class A extends HTMLElement {
2046
2074
  #ci = () => {
2047
2075
  this.#ys() || this.#Yt();
2048
2076
  };
2049
- #ui = () => {
2050
- this.#b = null, this.#H(), this.#c() || this.#l(), this.#u();
2051
- };
2052
2077
  #pi = () => {
2053
- this.#b = null, this.#c() || this.#Os(), this.#w(), this.#u();
2078
+ this.#b = null, this.#H(), this.#p() || this.#l(), this.#u();
2079
+ };
2080
+ #ui = () => {
2081
+ this.#b = null, this.#p() || this.#Zs(), this.#w(), this.#u();
2054
2082
  };
2055
2083
  #di = () => {
2056
- this.#b = null, this.#H(), this.#c() || this.#l(), this.#u();
2084
+ this.#b = null, this.#H(), this.#p() || this.#l(), this.#u();
2057
2085
  };
2058
2086
  #mi = () => {
2059
2087
  this.#yt(!0, !0);
@@ -2062,18 +2090,18 @@ class A extends HTMLElement {
2062
2090
  this.#yt(!0);
2063
2091
  };
2064
2092
  #fi = () => {
2065
- this.#H(), this.#y(), this.#c() || this.#l(), this.#w(), this.#g();
2093
+ this.#H(), this.#y(), this.#p() || this.#l(), this.#w(), this.#g();
2066
2094
  };
2067
2095
  #bi = () => {
2068
2096
  const t = this.#Kt();
2069
- this.#y(), t && !this.#c() && this.#l(), this.#u();
2097
+ this.#y(), t && !this.#p() && this.#l(), this.#u();
2070
2098
  };
2071
2099
  #vi = () => {
2072
2100
  if (this.#H(), this.#w(), this.#I && (!this.#nt || this.#t.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA)) {
2073
2101
  this.#_s(), this.#u();
2074
2102
  return;
2075
2103
  }
2076
- this.#c() || this.#l(), this.#g();
2104
+ this.#p() || this.#l(), this.#g();
2077
2105
  };
2078
2106
  #gi = () => {
2079
2107
  this.#b = null, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#yt(!0, !0), this.#u(), this.#Ae();
@@ -2084,11 +2112,11 @@ class A extends HTMLElement {
2084
2112
  #wi = () => {
2085
2113
  this.#y();
2086
2114
  };
2087
- #d() {
2115
+ #m() {
2088
2116
  return window.matchMedia("(max-width: 768px)").matches && window.matchMedia("(hover: none), (pointer: coarse)").matches;
2089
2117
  }
2090
2118
  #xi() {
2091
- this.#t && (this.#E?.disconnect(), this.#E = null, this.#Ot(), this.#gs(), this.#C = !1, this.#is = 0, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#ht = !1, this.#ct = 0, this.#H(), this.#Rt = !1, this.#ut = !1, this.#S(), this.#I = !1, this.#nt = !1, this.#b = null, this.#s.classList.remove("has-loaded-once", "has-visible-frame", "is-progress-settling"), this.#t.dataset.src = this.src, this.#t.pause(), this.#t.removeAttribute("src"), this.#t.preload = "none", this.#Bt(), this.#t.load(), this.#_(0), this.#y(), this.#w(), this.#u());
2119
+ this.#t && (this.#E?.disconnect(), this.#E = null, this.#Zt(), this.#gs(), this.#C = !1, this.#is = 0, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#ht = !1, this.#ct = 0, this.#H(), this.#Rt = !1, this.#pt = !1, this.#S(), this.#I = !1, this.#nt = !1, this.#b = null, this.#s.classList.remove("has-loaded-once", "has-visible-frame", "is-progress-settling"), this.#t.dataset.src = this.src, this.#t.pause(), this.#t.removeAttribute("src"), this.#t.preload = "none", this.#Bt(), this.#t.load(), this.#_(0), this.#y(), this.#w(), this.#u());
2092
2120
  }
2093
2121
  }
2094
2122
  customElements.get("simple-player") || customElements.define("simple-player", A);