softbuilders-react-video-player 1.2.18 → 1.2.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/dist/components/BigPlayButton/index.d.ts +2 -1
  2. package/dist/components/BigPlayButton/index.js +4 -4
  3. package/dist/components/BigPlayButton/index.js.map +1 -1
  4. package/dist/components/BigPlayButton/index.tsx +13 -5
  5. package/dist/components/ControlBar/index.js +8 -8
  6. package/dist/components/ControlBar/index.js.map +1 -1
  7. package/dist/components/ControlBar/index.tsx +41 -41
  8. package/dist/components/Slider/index.d.ts +4 -1
  9. package/dist/components/Slider/index.js +11 -3
  10. package/dist/components/Slider/index.js.map +1 -1
  11. package/dist/components/Slider/index.tsx +17 -2
  12. package/dist/components/SoftBuildersVideoPlayer/index.js +2 -1
  13. package/dist/components/SoftBuildersVideoPlayer/index.js.map +1 -1
  14. package/dist/components/SoftBuildersVideoPlayer/index.tsx +2 -1
  15. package/dist/components/TimeSlider/index.js +25 -10
  16. package/dist/components/TimeSlider/index.js.map +1 -1
  17. package/dist/components/TimeSlider/index.tsx +27 -11
  18. package/dist/components/VideoPlayerComponent/index.js +30 -9
  19. package/dist/components/VideoPlayerComponent/index.js.map +1 -1
  20. package/dist/components/VideoPlayerComponent/index.tsx +38 -9
  21. package/dist/components/VideoPlayerComponent/style/style.css +17 -1
  22. package/dist/components/VolumeSlider/index.d.ts +2 -1
  23. package/dist/components/VolumeSlider/index.js +37 -2
  24. package/dist/components/VolumeSlider/index.js.map +1 -1
  25. package/dist/components/VolumeSlider/index.tsx +41 -1
  26. package/dist/components/icons/SkillamiIcon.d.ts +3 -0
  27. package/dist/components/icons/SkillamiIcon.js +4 -0
  28. package/dist/components/icons/SkillamiIcon.js.map +1 -0
  29. package/dist/components/icons/SkillamiIcon.tsx +25 -0
  30. package/dist/components/icons/index.d.ts +1 -0
  31. package/dist/components/icons/index.js +1 -0
  32. package/dist/components/icons/index.js.map +1 -1
  33. package/dist/components/icons/index.ts +1 -0
  34. package/dist/images/index.d.ts +1 -0
  35. package/dist/images/index.js +1 -0
  36. package/dist/images/index.js.map +1 -1
  37. package/dist/index.css +30 -0
  38. package/dist/index.mjs +330 -208
  39. package/dist/styles/tailwind.css +15 -0
  40. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -166,26 +166,41 @@ var Slider = (_a) => {
166
166
  max = 100,
167
167
  className,
168
168
  handleSliderClick = () => {
169
- }
169
+ },
170
+ setClicked,
171
+ onMouseMove,
172
+ setNoteOpen
170
173
  } = _b, rest = __objRest(_b, [
171
174
  "value",
172
175
  "handleValueChange",
173
176
  "min",
174
177
  "max",
175
178
  "className",
176
- "handleSliderClick"
179
+ "handleSliderClick",
180
+ "setClicked",
181
+ "onMouseMove",
182
+ "setNoteOpen"
177
183
  ]);
178
184
  return /* @__PURE__ */ jsx3(
179
185
  "input",
180
186
  __spreadValues({
181
187
  type: "range",
182
188
  min,
183
- onMouseDown: (e) => e.stopPropagation(),
189
+ onMouseMove: (e) => onMouseMove && onMouseMove(e),
190
+ onMouseDown: (e) => {
191
+ e.stopPropagation();
192
+ setNoteOpen && setNoteOpen(true);
193
+ setClicked && setClicked(true);
194
+ },
184
195
  onClick: (e) => {
185
196
  e.stopPropagation();
186
197
  handleSliderClick(e);
187
198
  },
188
- onMouseUp: (e) => e.stopPropagation(),
199
+ onMouseUp: (e) => {
200
+ e.stopPropagation();
201
+ setNoteOpen && setNoteOpen(false);
202
+ setClicked && setClicked(false);
203
+ },
189
204
  max,
190
205
  value,
191
206
  onChange: (e) => {
@@ -422,9 +437,47 @@ var SvgSettingsIcon = (props) => /* @__PURE__ */ jsx15(
422
437
  );
423
438
  var SettingsIcon_default = SvgSettingsIcon;
424
439
 
425
- // src/components/icons/SubIcon.tsx
440
+ // src/components/icons/SkillamiIcon.tsx
426
441
  import { jsx as jsx16, jsxs as jsxs2 } from "react/jsx-runtime";
427
- var SvgSubIcon = (props) => /* @__PURE__ */ jsxs2(
442
+ var SvgSkillamiIcon = (props) => /* @__PURE__ */ jsxs2(
443
+ "svg",
444
+ __spreadProps(__spreadValues({
445
+ xmlns: "http://www.w3.org/2000/svg",
446
+ fill: "none",
447
+ viewBox: "0 0 45 46",
448
+ width: "1em",
449
+ height: "1em"
450
+ }, props), {
451
+ children: [
452
+ /* @__PURE__ */ jsx16(
453
+ "path",
454
+ {
455
+ fill: "#fff",
456
+ d: "m22.736 37.857-11.924-3.255-3.194-12.153a.99.99 0 0 0-1.213-.714c-.53.145-.843.7-.7 1.236l3.343 12.715a.991.991 0 0 0 .7.714l12.476 3.406a.985.985 0 0 0 1.213-.713 1.01 1.01 0 0 0-.7-1.236M44.733 25.943 39.51 6.074a1 1 0 0 0-.7-.714L19.308.033a.98.98 0 0 0-.957.26L9.389 9.428a1.02 1.02 0 0 0 0 1.428.976.976 0 0 0 1.402 0l8.56-8.717 18.39 5.024 4.93 18.741-8.56 8.724a1.02 1.02 0 0 0 0 1.428.977.977 0 0 0 1.4 0l8.963-9.133c.249-.254.348-.627.256-.975z"
457
+ }
458
+ ),
459
+ /* @__PURE__ */ jsx16(
460
+ "path",
461
+ {
462
+ fill: "#fff",
463
+ d: "m24.323 30.829-7.735-2.113-2.074-7.883a.99.99 0 0 0-1.213-.714c-.53.145-.842.7-.7 1.236l2.223 8.445a.991.991 0 0 0 .7.714l8.287 2.265a.985.985 0 0 0 1.212-.714 1.01 1.01 0 0 0-.7-1.236M15.887 15.86l5.573-5.68 4.278 1.168a.985.985 0 0 0 1.213-.714 1.01 1.01 0 0 0-.7-1.236l-4.83-1.32a.98.98 0 0 0-.957.262l-5.979 6.092a1.02 1.02 0 0 0 0 1.428.977.977 0 0 0 1.402 0M29.206 30.858a.976.976 0 0 0 1.4 0l5.98-6.093c.248-.253.348-.627.255-.975l-1.294-4.921a.99.99 0 0 0-1.213-.715c-.53.145-.843.7-.7 1.236l1.145 4.36-5.574 5.68a1.02 1.02 0 0 0 0 1.428"
464
+ }
465
+ ),
466
+ /* @__PURE__ */ jsx16(
467
+ "path",
468
+ {
469
+ fill: "#F26C21",
470
+ d: "m29.383 36.008-2.99-11 2.745-2.798-1.007-3.83 2.45-2.498 3.76 1.026 3.56-3.628L36.6 8.322l-4.865-1.327-3.56 3.628 1.007 3.831-2.45 2.497-3.76-1.026-2.745 2.799-10.794-3.049-1.007-3.834-4.865-1.327L0 14.142l1.302 4.959 4.865 1.326 2.745-2.798 10.794 3.048 1.007 3.835 3.762 1.025 2.991 11-2.745 2.798 1.302 4.959 4.865 1.326 3.56-3.628-1.302-4.958-3.763-1.03zM32.328 9.25l2.653.725.712 2.704-1.942 1.979-2.653-.725-.712-2.704zM5.573 18.173l-2.653-.725-.711-2.704 1.941-1.979 2.653.725.712 2.704zm16.761 4.686-.71-2.704 1.941-1.979 2.653.725.711 2.704-1.941 1.979zm7.963 20.507-2.653-.725-.711-2.704 1.942-1.979 2.653.725.711 2.704z"
471
+ }
472
+ )
473
+ ]
474
+ })
475
+ );
476
+ var SkillamiIcon_default = SvgSkillamiIcon;
477
+
478
+ // src/components/icons/SubIcon.tsx
479
+ import { jsx as jsx17, jsxs as jsxs3 } from "react/jsx-runtime";
480
+ var SvgSubIcon = (props) => /* @__PURE__ */ jsxs3(
428
481
  "svg",
429
482
  __spreadProps(__spreadValues({
430
483
  xmlns: "http://www.w3.org/2000/svg",
@@ -434,7 +487,7 @@ var SvgSubIcon = (props) => /* @__PURE__ */ jsxs2(
434
487
  viewBox: "0 0 15 15"
435
488
  }, props), {
436
489
  children: [
437
- /* @__PURE__ */ jsx16(
490
+ /* @__PURE__ */ jsx17(
438
491
  "path",
439
492
  {
440
493
  stroke: "#D1D5DB",
@@ -444,7 +497,7 @@ var SvgSubIcon = (props) => /* @__PURE__ */ jsxs2(
444
497
  d: "M1.25 7.5c0-2.487 0-3.731.658-4.561q.159-.2.346-.367c.785-.697 1.96-.697 4.309-.697h1.875c2.349 0 3.523 0 4.307.697q.19.168.347.367c.658.83.658 2.074.658 4.561s0 3.731-.658 4.561q-.157.2-.347.367c-.784.697-1.957.697-4.307.697H6.562c-2.349 0-3.523 0-4.308-.697a3 3 0 0 1-.346-.367c-.658-.83-.658-2.073-.658-4.561"
445
498
  }
446
499
  ),
447
- /* @__PURE__ */ jsx16(
500
+ /* @__PURE__ */ jsx17(
448
501
  "path",
449
502
  {
450
503
  stroke: "#D1D5DB",
@@ -460,14 +513,14 @@ var SvgSubIcon = (props) => /* @__PURE__ */ jsxs2(
460
513
  var SubIcon_default = SvgSubIcon;
461
514
 
462
515
  // src/components/icons/SubtitlesIcon.tsx
463
- import { jsx as jsx17, jsxs as jsxs3 } from "react/jsx-runtime";
516
+ import { jsx as jsx18, jsxs as jsxs4 } from "react/jsx-runtime";
464
517
 
465
518
  // src/components/icons/UnmuteIcon.tsx
466
- import { jsx as jsx18 } from "react/jsx-runtime";
519
+ import { jsx as jsx19 } from "react/jsx-runtime";
467
520
 
468
521
  // src/components/icons/VolumeHigh.tsx
469
- import { jsx as jsx19, jsxs as jsxs4 } from "react/jsx-runtime";
470
- var SvgVolumeHigh = (props) => /* @__PURE__ */ jsxs4(
522
+ import { jsx as jsx20, jsxs as jsxs5 } from "react/jsx-runtime";
523
+ var SvgVolumeHigh = (props) => /* @__PURE__ */ jsxs5(
471
524
  "svg",
472
525
  __spreadProps(__spreadValues({
473
526
  xmlns: "http://www.w3.org/2000/svg",
@@ -477,16 +530,16 @@ var SvgVolumeHigh = (props) => /* @__PURE__ */ jsxs4(
477
530
  viewBox: "0 0 512 512"
478
531
  }, props), {
479
532
  children: [
480
- /* @__PURE__ */ jsx19("path", { d: "M264 416.19a23.92 23.92 0 0 1-14.21-4.69l-.66-.51-91.46-75H88a24 24 0 0 1-24-24V200a24 24 0 0 1 24-24h69.65l91.46-75 .66-.51A24 24 0 0 1 288 119.83v272.34a24 24 0 0 1-24 24ZM352 336a16 16 0 0 1-14.29-23.18c9.49-18.9 14.3-38 14.3-56.82 0-19.36-4.66-37.92-14.25-56.73a16 16 0 0 1 28.5-14.54C378.2 208.16 384 231.47 384 256c0 23.83-6 47.78-17.7 71.18A16 16 0 0 1 352 336" }),
481
- /* @__PURE__ */ jsx19("path", { d: "M400 384a16 16 0 0 1-13.87-24C405 327.05 416 299.45 416 256c0-44.12-10.94-71.52-29.83-103.95A16 16 0 0 1 413.83 136C434.92 172.16 448 204.88 448 256c0 50.36-13.06 83.24-34.12 120a16 16 0 0 1-13.88 8" })
533
+ /* @__PURE__ */ jsx20("path", { d: "M264 416.19a23.92 23.92 0 0 1-14.21-4.69l-.66-.51-91.46-75H88a24 24 0 0 1-24-24V200a24 24 0 0 1 24-24h69.65l91.46-75 .66-.51A24 24 0 0 1 288 119.83v272.34a24 24 0 0 1-24 24ZM352 336a16 16 0 0 1-14.29-23.18c9.49-18.9 14.3-38 14.3-56.82 0-19.36-4.66-37.92-14.25-56.73a16 16 0 0 1 28.5-14.54C378.2 208.16 384 231.47 384 256c0 23.83-6 47.78-17.7 71.18A16 16 0 0 1 352 336" }),
534
+ /* @__PURE__ */ jsx20("path", { d: "M400 384a16 16 0 0 1-13.87-24C405 327.05 416 299.45 416 256c0-44.12-10.94-71.52-29.83-103.95A16 16 0 0 1 413.83 136C434.92 172.16 448 204.88 448 256c0 50.36-13.06 83.24-34.12 120a16 16 0 0 1-13.88 8" })
482
535
  ]
483
536
  })
484
537
  );
485
538
  var VolumeHigh_default = SvgVolumeHigh;
486
539
 
487
540
  // src/components/icons/VolumeLow.tsx
488
- import { jsx as jsx20 } from "react/jsx-runtime";
489
- var SvgVolumeLow = (props) => /* @__PURE__ */ jsx20(
541
+ import { jsx as jsx21 } from "react/jsx-runtime";
542
+ var SvgVolumeLow = (props) => /* @__PURE__ */ jsx21(
490
543
  "svg",
491
544
  __spreadProps(__spreadValues({
492
545
  xmlns: "http://www.w3.org/2000/svg",
@@ -495,14 +548,14 @@ var SvgVolumeLow = (props) => /* @__PURE__ */ jsx20(
495
548
  fill: "#fff",
496
549
  viewBox: "0 0 512 512"
497
550
  }, props), {
498
- children: /* @__PURE__ */ jsx20("path", { d: "M296 416.19a23.92 23.92 0 0 1-14.21-4.69l-.66-.51-91.46-75H120a24 24 0 0 1-24-24V200a24 24 0 0 1 24-24h69.65l91.46-75 .66-.51A24 24 0 0 1 320 119.83v272.34a24 24 0 0 1-24 24ZM384 336a16 16 0 0 1-14.29-23.18c9.49-18.9 14.3-38 14.3-56.82 0-19.36-4.66-37.92-14.25-56.73a16 16 0 0 1 28.5-14.54C410.2 208.16 416 231.47 416 256c0 23.83-6 47.78-17.7 71.18A16 16 0 0 1 384 336" })
551
+ children: /* @__PURE__ */ jsx21("path", { d: "M296 416.19a23.92 23.92 0 0 1-14.21-4.69l-.66-.51-91.46-75H120a24 24 0 0 1-24-24V200a24 24 0 0 1 24-24h69.65l91.46-75 .66-.51A24 24 0 0 1 320 119.83v272.34a24 24 0 0 1-24 24ZM384 336a16 16 0 0 1-14.29-23.18c9.49-18.9 14.3-38 14.3-56.82 0-19.36-4.66-37.92-14.25-56.73a16 16 0 0 1 28.5-14.54C410.2 208.16 416 231.47 416 256c0 23.83-6 47.78-17.7 71.18A16 16 0 0 1 384 336" })
499
552
  })
500
553
  );
501
554
  var VolumeLow_default = SvgVolumeLow;
502
555
 
503
556
  // src/components/icons/VolumeMute.tsx
504
- import { jsx as jsx21, jsxs as jsxs5 } from "react/jsx-runtime";
505
- var SvgVolumeMute = (props) => /* @__PURE__ */ jsxs5(
557
+ import { jsx as jsx22, jsxs as jsxs6 } from "react/jsx-runtime";
558
+ var SvgVolumeMute = (props) => /* @__PURE__ */ jsxs6(
506
559
  "svg",
507
560
  __spreadProps(__spreadValues({
508
561
  xmlns: "http://www.w3.org/2000/svg",
@@ -512,7 +565,7 @@ var SvgVolumeMute = (props) => /* @__PURE__ */ jsxs5(
512
565
  viewBox: "0 0 512 512"
513
566
  }, props), {
514
567
  children: [
515
- /* @__PURE__ */ jsx21(
568
+ /* @__PURE__ */ jsx22(
516
569
  "path",
517
570
  {
518
571
  d: "M416 432 64 80",
@@ -525,16 +578,16 @@ var SvgVolumeMute = (props) => /* @__PURE__ */ jsxs5(
525
578
  }
526
579
  }
527
580
  ),
528
- /* @__PURE__ */ jsx21("path", { d: "M243.33 98.86a23.89 23.89 0 0 0-25.55 1.82l-.66.51-28.52 23.35a8 8 0 0 0-.59 11.85l54.33 54.33a8 8 0 0 0 13.66-5.66v-64.49a24.51 24.51 0 0 0-12.67-21.71M251.33 335.29 96.69 180.69A16 16 0 0 0 85.38 176H56a24 24 0 0 0-24 24v112a24 24 0 0 0 24 24h69.76l92 75.31a23.9 23.9 0 0 0 25.87 1.69A24.51 24.51 0 0 0 256 391.45v-44.86a16 16 0 0 0-4.67-11.3M352 256c0-24.56-5.81-47.87-17.75-71.27a16 16 0 1 0-28.5 14.55C315.34 218.06 320 236.62 320 256q0 4-.31 8.13a8 8 0 0 0 2.32 6.25l14.36 14.36a8 8 0 0 0 13.55-4.31A146 146 0 0 0 352 256M416 256c0-51.18-13.08-83.89-34.18-120.06a16 16 0 0 0-27.64 16.12C373.07 184.44 384 211.83 384 256c0 23.83-3.29 42.88-9.37 60.65a8 8 0 0 0 1.9 8.26L389 337.4a8 8 0 0 0 13.13-2.79C411 311.76 416 287.26 416 256" }),
529
- /* @__PURE__ */ jsx21("path", { d: "M480 256c0-74.25-20.19-121.11-50.51-168.61a16 16 0 1 0-27 17.22C429.82 147.38 448 189.5 448 256c0 46.19-8.43 80.27-22.43 110.53a8 8 0 0 0 1.59 9l11.92 11.92a8 8 0 0 0 12.92-2.16C471.6 344.9 480 305 480 256" })
581
+ /* @__PURE__ */ jsx22("path", { d: "M243.33 98.86a23.89 23.89 0 0 0-25.55 1.82l-.66.51-28.52 23.35a8 8 0 0 0-.59 11.85l54.33 54.33a8 8 0 0 0 13.66-5.66v-64.49a24.51 24.51 0 0 0-12.67-21.71M251.33 335.29 96.69 180.69A16 16 0 0 0 85.38 176H56a24 24 0 0 0-24 24v112a24 24 0 0 0 24 24h69.76l92 75.31a23.9 23.9 0 0 0 25.87 1.69A24.51 24.51 0 0 0 256 391.45v-44.86a16 16 0 0 0-4.67-11.3M352 256c0-24.56-5.81-47.87-17.75-71.27a16 16 0 1 0-28.5 14.55C315.34 218.06 320 236.62 320 256q0 4-.31 8.13a8 8 0 0 0 2.32 6.25l14.36 14.36a8 8 0 0 0 13.55-4.31A146 146 0 0 0 352 256M416 256c0-51.18-13.08-83.89-34.18-120.06a16 16 0 0 0-27.64 16.12C373.07 184.44 384 211.83 384 256c0 23.83-3.29 42.88-9.37 60.65a8 8 0 0 0 1.9 8.26L389 337.4a8 8 0 0 0 13.13-2.79C411 311.76 416 287.26 416 256" }),
582
+ /* @__PURE__ */ jsx22("path", { d: "M480 256c0-74.25-20.19-121.11-50.51-168.61a16 16 0 1 0-27 17.22C429.82 147.38 448 189.5 448 256c0 46.19-8.43 80.27-22.43 110.53a8 8 0 0 0 1.59 9l11.92 11.92a8 8 0 0 0 12.92-2.16C471.6 344.9 480 305 480 256" })
530
583
  ]
531
584
  })
532
585
  );
533
586
  var VolumeMute_default = SvgVolumeMute;
534
587
 
535
588
  // src/components/icons/VolumeVLow.tsx
536
- import { jsx as jsx22 } from "react/jsx-runtime";
537
- var SvgVolumeVLow = (props) => /* @__PURE__ */ jsx22(
589
+ import { jsx as jsx23 } from "react/jsx-runtime";
590
+ var SvgVolumeVLow = (props) => /* @__PURE__ */ jsx23(
538
591
  "svg",
539
592
  __spreadProps(__spreadValues({
540
593
  xmlns: "http://www.w3.org/2000/svg",
@@ -543,13 +596,13 @@ var SvgVolumeVLow = (props) => /* @__PURE__ */ jsx22(
543
596
  fill: "#fff",
544
597
  viewBox: "0 0 512 512"
545
598
  }, props), {
546
- children: /* @__PURE__ */ jsx22("path", { d: "M344 416a23.92 23.92 0 0 1-14.21-4.69c-.23-.16-.44-.33-.66-.51l-91.46-74.9H168a24 24 0 0 1-24-24V200.07a24 24 0 0 1 24-24h69.65l91.46-74.9c.22-.18.43-.35.66-.51A24 24 0 0 1 368 120v272a24 24 0 0 1-24 24" })
599
+ children: /* @__PURE__ */ jsx23("path", { d: "M344 416a23.92 23.92 0 0 1-14.21-4.69c-.23-.16-.44-.33-.66-.51l-91.46-74.9H168a24 24 0 0 1-24-24V200.07a24 24 0 0 1 24-24h69.65l91.46-74.9c.22-.18.43-.35.66-.51A24 24 0 0 1 368 120v272a24 24 0 0 1-24 24" })
547
600
  })
548
601
  );
549
602
  var VolumeVLow_default = SvgVolumeVLow;
550
603
 
551
604
  // src/components/VolumeSlider/index.tsx
552
- import { jsx as jsx23, jsxs as jsxs6 } from "react/jsx-runtime";
605
+ import { jsx as jsx24, jsxs as jsxs7 } from "react/jsx-runtime";
553
606
  var MIN = 0;
554
607
  var MAX = 100;
555
608
  var VolumeSlider = ({
@@ -557,11 +610,13 @@ var VolumeSlider = ({
557
610
  setIsSeeking,
558
611
  handleControlDisplayTimer,
559
612
  volumeSliderToggler,
560
- isTrailer
613
+ isTrailer,
614
+ setNoteOpen
561
615
  }) => {
562
616
  const { player } = useSoftBuildersVideoPlayerContext();
563
617
  const [isVisible, setVisible] = useState2(false);
564
618
  const [volume, setVolume] = useState2(0);
619
+ const [isClicked, setClicked] = useState2(false);
565
620
  useEffect2(() => {
566
621
  const updateVolumeState = () => {
567
622
  const currentVolume = (player == null ? void 0 : player.muted()) ? 0 : Number((player == null ? void 0 : player.volume()) || 0) * 100;
@@ -594,6 +649,28 @@ var VolumeSlider = ({
594
649
  player == null ? void 0 : player.muted(false);
595
650
  }
596
651
  };
652
+ const onMouseMove = (e) => {
653
+ if (isClicked) {
654
+ const slider = e.currentTarget;
655
+ const rect = slider.getBoundingClientRect();
656
+ let offsetX;
657
+ let newVolume;
658
+ if (!isTrailer && width > 400) {
659
+ offsetX = e.clientY - rect.bottom;
660
+ newVolume = offsetX / rect.height * -100;
661
+ } else {
662
+ offsetX = e.clientY - rect.top;
663
+ newVolume = offsetX / rect.height * 100;
664
+ }
665
+ setVolume(newVolume);
666
+ player == null ? void 0 : player.volume(newVolume / 100);
667
+ if (newVolume === 0) {
668
+ player == null ? void 0 : player.muted(true);
669
+ } else {
670
+ player == null ? void 0 : player.muted(false);
671
+ }
672
+ }
673
+ };
597
674
  const timeoutRef = React2.useRef(null);
598
675
  useEffect2(() => {
599
676
  setVisible(false);
@@ -616,6 +693,15 @@ var VolumeSlider = ({
616
693
  setVisible(false);
617
694
  }, 5e3);
618
695
  };
696
+ useEffect2(() => {
697
+ if (isClicked) {
698
+ clearTimeout(timeoutRef.current);
699
+ } else {
700
+ timeoutRef.current = setTimeout(() => {
701
+ setVisible(false);
702
+ }, 5e3);
703
+ }
704
+ }, [isClicked]);
619
705
  const handleValueChange = (e) => {
620
706
  e.preventDefault();
621
707
  e.stopPropagation();
@@ -632,33 +718,33 @@ var VolumeSlider = ({
632
718
  setVolume(0);
633
719
  player == null ? void 0 : player.muted(true);
634
720
  };
635
- return /* @__PURE__ */ jsxs6(
721
+ return /* @__PURE__ */ jsxs7(
636
722
  "div",
637
723
  {
638
724
  className: `sb-flex ${isVisible ? "" : ""} ${width > 400 && !isTrailer ? "sb-flex-col-reverse" : `sb-flex-col ${isTrailer ? "sb-justify-start" : ""}`} sb-items-center sb-gap-1 sb-h-full`,
639
725
  children: [
640
- /* @__PURE__ */ jsx23(
726
+ /* @__PURE__ */ jsx24(
641
727
  "div",
642
728
  {
643
729
  className: `sb-flex sb-relative ${width < 400 || isTrailer ? "-sb-top-1" : "sb-top-1"}`,
644
730
  onClick: toggleVisibility,
645
731
  onDoubleClick: handleDoubleClick,
646
- children: volume == 0 || (player == null ? void 0 : player.muted()) ? /* @__PURE__ */ jsx23(
732
+ children: volume == 0 || (player == null ? void 0 : player.muted()) ? /* @__PURE__ */ jsx24(
647
733
  VolumeMute_default,
648
734
  {
649
735
  className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5`
650
736
  }
651
- ) : volume < 25 ? /* @__PURE__ */ jsx23(
737
+ ) : volume < 25 ? /* @__PURE__ */ jsx24(
652
738
  VolumeVLow_default,
653
739
  {
654
740
  className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5`
655
741
  }
656
- ) : volume < 50 ? /* @__PURE__ */ jsx23(
742
+ ) : volume < 50 ? /* @__PURE__ */ jsx24(
657
743
  VolumeLow_default,
658
744
  {
659
745
  className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5`
660
746
  }
661
- ) : /* @__PURE__ */ jsx23(
747
+ ) : /* @__PURE__ */ jsx24(
662
748
  VolumeHigh_default,
663
749
  {
664
750
  className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5`
@@ -666,19 +752,22 @@ var VolumeSlider = ({
666
752
  )
667
753
  }
668
754
  ),
669
- /* @__PURE__ */ jsx23("div", { className: "sb-flex sb-items-center sb-justify-center", children: /* @__PURE__ */ jsx23(
755
+ /* @__PURE__ */ jsx24("div", { className: "sb-flex sb-items-center sb-justify-center", children: /* @__PURE__ */ jsx24(
670
756
  "div",
671
757
  {
672
758
  className: ` sb-transition-all sb-ease-in-out sb-duration-500 ${isVisible ? "sb-w-[22px] sb-opacity-100 sb-visible" : "sb-w-[22px] sb-opacity-0 sb-invisible"} ${width > 400 && !isTrailer ? "-sb-rotate-90 -sb-translate-y-1" : "sb-rotate-90 sb-translate-y-1"} sb-relative`,
673
- children: /* @__PURE__ */ jsx23(
759
+ children: /* @__PURE__ */ jsx24(
674
760
  Slider_default,
675
761
  {
762
+ onMouseMove: (e) => onMouseMove(e),
763
+ setNoteOpen,
676
764
  value: volume,
677
765
  handleValueChange,
678
766
  min: MIN,
679
767
  max: MAX,
680
768
  className: "!sb-w-16 ",
681
- handleSliderClick: handleVolumeSliderClick
769
+ handleSliderClick: handleVolumeSliderClick,
770
+ setClicked
682
771
  }
683
772
  )
684
773
  }
@@ -694,7 +783,7 @@ import { useEffect as useEffect4, useState as useState4 } from "react";
694
783
 
695
784
  // src/components/MenuButton/index.tsx
696
785
  import { useCallback, useEffect as useEffect3, useRef, useState as useState3 } from "react";
697
- import { jsx as jsx24, jsxs as jsxs7 } from "react/jsx-runtime";
786
+ import { jsx as jsx25, jsxs as jsxs8 } from "react/jsx-runtime";
698
787
  var MenuButton = ({
699
788
  buttonContent,
700
789
  menuContent,
@@ -729,14 +818,14 @@ var MenuButton = ({
729
818
  useEffect3(() => {
730
819
  setNoteOpen && setNoteOpen(isOpen);
731
820
  }, [isOpen]);
732
- return /* @__PURE__ */ jsxs7(
821
+ return /* @__PURE__ */ jsxs8(
733
822
  "div",
734
823
  {
735
824
  onMouseEnter,
736
825
  onMouseLeave,
737
826
  className: "sb-relative sb-flex sb-items-end",
738
827
  children: [
739
- /* @__PURE__ */ jsx24(
828
+ /* @__PURE__ */ jsx25(
740
829
  "button",
741
830
  {
742
831
  ref: buttonRef,
@@ -752,7 +841,7 @@ var MenuButton = ({
752
841
  children: buttonContent
753
842
  }
754
843
  ),
755
- !disablePopUp && isOpen && /* @__PURE__ */ jsx24(
844
+ !disablePopUp && isOpen && /* @__PURE__ */ jsx25(
756
845
  "div",
757
846
  {
758
847
  ref: menuRef,
@@ -770,7 +859,7 @@ var MenuButton = ({
770
859
  var MenuButton_default = MenuButton;
771
860
 
772
861
  // src/components/QualityMenu/index.tsx
773
- import { jsx as jsx25, jsxs as jsxs8 } from "react/jsx-runtime";
862
+ import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
774
863
  var QualityOption = ({
775
864
  isSelected,
776
865
  quality,
@@ -778,19 +867,19 @@ var QualityOption = ({
778
867
  width,
779
868
  isTrailer
780
869
  }) => {
781
- return /* @__PURE__ */ jsx25(
870
+ return /* @__PURE__ */ jsx26(
782
871
  "button",
783
872
  {
784
873
  className: `hover:sb-text-orange-500 ${width > 400 && !isTrailer ? "sb-p-2" : "sp-pb-1"}`,
785
874
  onClick,
786
- children: /* @__PURE__ */ jsxs8("div", { className: "sb-grid sb-grid-cols-12 sb-items-center sb-gap-2", children: [
787
- /* @__PURE__ */ jsx25("div", { className: "sb-col-span-3", children: isSelected ? /* @__PURE__ */ jsx25(
875
+ children: /* @__PURE__ */ jsxs9("div", { className: "sb-grid sb-grid-cols-12 sb-items-center sb-gap-2", children: [
876
+ /* @__PURE__ */ jsx26("div", { className: "sb-col-span-3", children: isSelected ? /* @__PURE__ */ jsx26(
788
877
  CheckedIcon_default,
789
878
  {
790
879
  className: `${width > 400 && !isTrailer ? "sb-w-5 sb-h-5" : "sb-w-3 sb-h-3"}`
791
880
  }
792
- ) : /* @__PURE__ */ jsx25("div", {}) }),
793
- /* @__PURE__ */ jsx25("p", { className: "sb-text-left sb-col-span-9", children: quality == null ? void 0 : quality.label })
881
+ ) : /* @__PURE__ */ jsx26("div", {}) }),
882
+ /* @__PURE__ */ jsx26("p", { className: "sb-text-left sb-col-span-9", children: quality == null ? void 0 : quality.label })
794
883
  ] })
795
884
  }
796
885
  );
@@ -819,25 +908,25 @@ var QualityMenu = ({ width, onClick, isTrailer }) => {
819
908
  }
820
909
  }
821
910
  }, [player]);
822
- return /* @__PURE__ */ jsx25(
911
+ return /* @__PURE__ */ jsx26(
823
912
  MenuButton_default,
824
913
  {
825
914
  classContainer: `${width < 400 || isTrailer ? "!sb-top-8 -sb-left-9" : ""}`,
826
915
  onClick: (e, isOpen) => {
827
916
  onClick && onClick(e, isOpen);
828
917
  },
829
- buttonContent: /* @__PURE__ */ jsx25(SettingsIcon_default, { className: "sb-w-3 sb-h-3" }),
830
- menuContent: /* @__PURE__ */ jsx25(
918
+ buttonContent: /* @__PURE__ */ jsx26(SettingsIcon_default, { className: "sb-w-3 sb-h-3" }),
919
+ menuContent: /* @__PURE__ */ jsx26(
831
920
  "div",
832
921
  {
833
922
  className: `sb-rounded-md sb-bg-[#303030] sb-bg-opacity-50 ${width > 400 && !isTrailer ? "sb-w-[150px] sb-py-5" : "sb-w-[90px] sb-items-center sb-justify-center sb-py-1"}`,
834
- children: /* @__PURE__ */ jsxs8("div", { className: "sb-flex sb-flex-col sb-gap-3", children: [
835
- /* @__PURE__ */ jsxs8(
923
+ children: /* @__PURE__ */ jsxs9("div", { className: "sb-flex sb-flex-col sb-gap-3", children: [
924
+ /* @__PURE__ */ jsxs9(
836
925
  "div",
837
926
  {
838
927
  className: `sb-px-5 sb-flex sb-flex-row sb-gap-3 sb-items-start sb-relative sb-top-2`,
839
928
  children: [
840
- /* @__PURE__ */ jsx25(
929
+ /* @__PURE__ */ jsx26(
841
930
  "button",
842
931
  {
843
932
  onClick: () => {
@@ -846,16 +935,16 @@ var QualityMenu = ({ width, onClick, isTrailer }) => {
846
935
  }
847
936
  },
848
937
  className: "hover:sb-scale-150",
849
- children: /* @__PURE__ */ jsx25(LeftArrowIcon_default, { className: "sb-w-3 sb-h-3" })
938
+ children: /* @__PURE__ */ jsx26(LeftArrowIcon_default, { className: "sb-w-3 sb-h-3" })
850
939
  }
851
940
  ),
852
- /* @__PURE__ */ jsx25("h3", { children: "Quality" })
941
+ /* @__PURE__ */ jsx26("h3", { children: "Quality" })
853
942
  ]
854
943
  }
855
944
  ),
856
- /* @__PURE__ */ jsx25("div", { className: "sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" }),
857
- /* @__PURE__ */ jsx25("div", { className: "sb-px-5 sb-flex sb-flex-col sb-gap-3 sb-items-start ", children: qualities == null ? void 0 : qualities.map((q, i) => {
858
- return /* @__PURE__ */ jsx25(
945
+ /* @__PURE__ */ jsx26("div", { className: "sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" }),
946
+ /* @__PURE__ */ jsx26("div", { className: "sb-px-5 sb-flex sb-flex-col sb-gap-3 sb-items-start ", children: qualities == null ? void 0 : qualities.map((q, i) => {
947
+ return /* @__PURE__ */ jsx26(
859
948
  QualityOption,
860
949
  {
861
950
  width,
@@ -891,7 +980,7 @@ var QualityMenu_default = QualityMenu;
891
980
 
892
981
  // src/components/CreateNoteMenu/index.tsx
893
982
  import React5, { useState as useState5 } from "react";
894
- import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
983
+ import { jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
895
984
  var CreateNoteMenu = ({
896
985
  handleSaveNoteAction,
897
986
  width,
@@ -914,7 +1003,7 @@ var CreateNoteMenu = ({
914
1003
  );
915
1004
  }
916
1005
  };
917
- return /* @__PURE__ */ jsx26(
1006
+ return /* @__PURE__ */ jsx27(
918
1007
  MenuButton_default,
919
1008
  {
920
1009
  onMouseEnter,
@@ -923,21 +1012,21 @@ var CreateNoteMenu = ({
923
1012
  noteButtonClick,
924
1013
  setNoteOpen,
925
1014
  classContainer: `${width < 400 ? "!sb-top-8 -sb-left-[9.75rem]" : ""}`,
926
- buttonContent: /* @__PURE__ */ jsx26(ClosedNoteIcon_default, { className: "sb-w-3 sb-h-3" }),
927
- menuContent: /* @__PURE__ */ jsx26(
1015
+ buttonContent: /* @__PURE__ */ jsx27(ClosedNoteIcon_default, { className: "sb-w-3 sb-h-3" }),
1016
+ menuContent: /* @__PURE__ */ jsx27(
928
1017
  "div",
929
1018
  {
930
1019
  className: `sb-rounded-md sb-bg-[#303030] sb-bg-opacity-50 ${width > 400 ? " sb-py-5 sb-w-[220px]" : "sb-py-1 sb-w-[150px]"}`,
931
- children: /* @__PURE__ */ jsxs9(
1020
+ children: /* @__PURE__ */ jsxs10(
932
1021
  "div",
933
1022
  {
934
1023
  className: "sb-flex sb-flex-col sb-gap-3 sb-items-center sb-justify-center",
935
1024
  onClick: (e) => e.stopPropagation(),
936
1025
  children: [
937
- /* @__PURE__ */ jsx26("h3", { className: "sb-px-5", children: "Add Note" }),
938
- /* @__PURE__ */ jsx26("div", { className: "sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" }),
939
- /* @__PURE__ */ jsxs9("div", { className: "sb-px-5 sb-flex sb-flex-col sb-gap-4 sb-items-start", children: [
940
- /* @__PURE__ */ jsx26(
1026
+ /* @__PURE__ */ jsx27("h3", { className: "sb-px-5", children: "Add Note" }),
1027
+ /* @__PURE__ */ jsx27("div", { className: "sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" }),
1028
+ /* @__PURE__ */ jsxs10("div", { className: "sb-px-5 sb-flex sb-flex-col sb-gap-4 sb-items-start", children: [
1029
+ /* @__PURE__ */ jsx27(
941
1030
  "input",
942
1031
  {
943
1032
  onClick: (e) => e.stopPropagation(),
@@ -950,7 +1039,7 @@ var CreateNoteMenu = ({
950
1039
  className: "sb-text-white placeholder:sb-text-white sb-w-full sb-bg-transparent sb-px-4 sb-py-3 sb-border sb-border-[#AAAAAA] sb-rounded-md"
951
1040
  }
952
1041
  ),
953
- /* @__PURE__ */ jsx26("button", { className: "sb-w-full", onClick: handleSaveNote, children: /* @__PURE__ */ jsx26("div", { className: "sb-px-4 sb-py-3 sb-text-center sb-font-bold sb-bg-orange-500 sb-rounded-md", children: "Save" }) })
1042
+ /* @__PURE__ */ jsx27("button", { className: "sb-w-full", onClick: handleSaveNote, children: /* @__PURE__ */ jsx27("div", { className: "sb-px-4 sb-py-3 sb-text-center sb-font-bold sb-bg-orange-500 sb-rounded-md", children: "Save" }) })
954
1043
  ] })
955
1044
  ]
956
1045
  }
@@ -969,10 +1058,10 @@ import { useEffect as useEffect6, useState as useState7 } from "react";
969
1058
  import { useState as useState6 } from "react";
970
1059
 
971
1060
  // src/components/Tooltip/index.tsx
972
- import { jsx as jsx27 } from "react/jsx-runtime";
1061
+ import { jsx as jsx28 } from "react/jsx-runtime";
973
1062
  var Tooltip = ({ open, children }) => {
974
1063
  if (!open) return null;
975
- return /* @__PURE__ */ jsx27(
1064
+ return /* @__PURE__ */ jsx28(
976
1065
  "div",
977
1066
  {
978
1067
  className: "sb-absolute sb-bottom-full sb-mb-2 sb-left-1/2 sb-transform sb--translate-x-1/2 sb-z-10 sb-whitespace-nowrap",
@@ -983,14 +1072,14 @@ var Tooltip = ({ open, children }) => {
983
1072
  var Tooltip_default = Tooltip;
984
1073
 
985
1074
  // src/components/NoteTooltip/index.tsx
986
- import { jsx as jsx28, jsxs as jsxs10 } from "react/jsx-runtime";
1075
+ import { jsx as jsx29, jsxs as jsxs11 } from "react/jsx-runtime";
987
1076
  var NoteTooltip = ({ note }) => {
988
1077
  const [open, setOpen] = useState6(false);
989
1078
  const { currentTime, player } = useSoftBuildersVideoPlayerContext();
990
1079
  const handleValueChange = () => {
991
1080
  player == null ? void 0 : player.currentTime(note.time);
992
1081
  };
993
- return /* @__PURE__ */ jsx28(
1082
+ return /* @__PURE__ */ jsx29(
994
1083
  "div",
995
1084
  {
996
1085
  onClick: handleValueChange,
@@ -998,9 +1087,9 @@ var NoteTooltip = ({ note }) => {
998
1087
  style: { left: `${note == null ? void 0 : note.percentage}%` },
999
1088
  onMouseEnter: () => setOpen(true),
1000
1089
  onMouseLeave: () => setOpen(false),
1001
- children: /* @__PURE__ */ jsx28("div", { className: "sb-relative", children: /* @__PURE__ */ jsx28(Tooltip_default, { open, children: /* @__PURE__ */ jsxs10("div", { className: "sb-flex sb-flex-col sb-gap-2 sb-items-center", children: [
1002
- /* @__PURE__ */ jsx28("p", { children: note == null ? void 0 : note.label }),
1003
- /* @__PURE__ */ jsx28("p", { className: "sb-p-2 sb-bg-[#303030] sb-bg-opacity-50 sb-rounded-md", children: durationFormater(note.time) })
1090
+ children: /* @__PURE__ */ jsx29("div", { className: "sb-relative", children: /* @__PURE__ */ jsx29(Tooltip_default, { open, children: /* @__PURE__ */ jsxs11("div", { className: "sb-flex sb-flex-col sb-gap-2 sb-items-center", children: [
1091
+ /* @__PURE__ */ jsx29("p", { children: note == null ? void 0 : note.label }),
1092
+ /* @__PURE__ */ jsx29("p", { className: "sb-p-2 sb-bg-[#303030] sb-bg-opacity-50 sb-rounded-md", children: durationFormater(note.time) })
1004
1093
  ] }) }) })
1005
1094
  }
1006
1095
  );
@@ -1008,7 +1097,7 @@ var NoteTooltip = ({ note }) => {
1008
1097
  var NoteTooltip_default = NoteTooltip;
1009
1098
 
1010
1099
  // src/components/NotesPanal/index.tsx
1011
- import { jsx as jsx29 } from "react/jsx-runtime";
1100
+ import { jsx as jsx30 } from "react/jsx-runtime";
1012
1101
  var NotesPanal = ({ notes }) => {
1013
1102
  const [ns, setNs] = useState7([]);
1014
1103
  const { duration } = useSoftBuildersVideoPlayerContext();
@@ -1021,7 +1110,7 @@ var NotesPanal = ({ notes }) => {
1021
1110
  });
1022
1111
  newNs && setNs(newNs);
1023
1112
  }, [notes, duration]);
1024
- return /* @__PURE__ */ jsx29("div", { id: "notes-panal", className: "sb-w-full sb-h-full sb-relative ", children: ns.map((n, i) => /* @__PURE__ */ jsx29(NoteTooltip_default, { note: n }, `note-${i}-${n.time}`)) });
1113
+ return /* @__PURE__ */ jsx30("div", { id: "notes-panal", className: "sb-w-full sb-h-full sb-relative ", children: ns.map((n, i) => /* @__PURE__ */ jsx30(NoteTooltip_default, { note: n }, `note-${i}-${n.time}`)) });
1025
1114
  };
1026
1115
  var NotesPanal_default = NotesPanal;
1027
1116
 
@@ -1030,7 +1119,7 @@ import { useEffect as useEffect8, useState as useState9 } from "react";
1030
1119
 
1031
1120
  // src/components/ChapterTooltip/index.tsx
1032
1121
  import { useEffect as useEffect7, useState as useState8 } from "react";
1033
- import { jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
1122
+ import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
1034
1123
  var ChapterTooltip = ({ chapter }) => {
1035
1124
  const { player } = useSoftBuildersVideoPlayerContext();
1036
1125
  const [open, setOpen] = useState8(false);
@@ -1052,7 +1141,7 @@ var ChapterTooltip = ({ chapter }) => {
1052
1141
  const clickedTime = chapter.startTime + clickPercentage * (chapter.endTime - chapter.startTime);
1053
1142
  player == null ? void 0 : player.currentTime(clickedTime);
1054
1143
  };
1055
- return /* @__PURE__ */ jsx30(
1144
+ return /* @__PURE__ */ jsx31(
1056
1145
  "div",
1057
1146
  {
1058
1147
  id: `ii-section-${chapter.title}`,
@@ -1063,15 +1152,15 @@ var ChapterTooltip = ({ chapter }) => {
1063
1152
  },
1064
1153
  onMouseEnter: () => setOpen(true),
1065
1154
  onMouseLeave: () => setOpen(false),
1066
- children: /* @__PURE__ */ jsx30(
1155
+ children: /* @__PURE__ */ jsx31(
1067
1156
  "button",
1068
1157
  {
1069
1158
  id: `section-${chapter.title}`,
1070
1159
  className: "sb-h-full sb-w-full",
1071
1160
  onClick: handleClickChapter,
1072
- children: /* @__PURE__ */ jsx30("div", { className: "sb-relative sb-flex sb-h-full sb-w-full sb-justify-between sb-items-center", children: /* @__PURE__ */ jsx30(Tooltip_default, { open, children: /* @__PURE__ */ jsxs11("div", { className: "sb-flex sb-flex-col sb-gap-2 sb-items-center", children: [
1073
- /* @__PURE__ */ jsx30("p", { children: chapter.title }),
1074
- /* @__PURE__ */ jsxs11("p", { className: "sb-p-2 sb-bg-[#303030] sb-bg-opacity-50 sb-rounded-md", children: [
1161
+ children: /* @__PURE__ */ jsx31("div", { className: "sb-relative sb-flex sb-h-full sb-w-full sb-justify-between sb-items-center", children: /* @__PURE__ */ jsx31(Tooltip_default, { open, children: /* @__PURE__ */ jsxs12("div", { className: "sb-flex sb-flex-col sb-gap-2 sb-items-center", children: [
1162
+ /* @__PURE__ */ jsx31("p", { children: chapter.title }),
1163
+ /* @__PURE__ */ jsxs12("p", { className: "sb-p-2 sb-bg-[#303030] sb-bg-opacity-50 sb-rounded-md", children: [
1075
1164
  durationFormater(chapter.startTime),
1076
1165
  " -",
1077
1166
  " ",
@@ -1086,7 +1175,7 @@ var ChapterTooltip = ({ chapter }) => {
1086
1175
  var ChapterTooltip_default = ChapterTooltip;
1087
1176
 
1088
1177
  // src/components/ChaptersPanal/index.tsx
1089
- import { jsx as jsx31 } from "react/jsx-runtime";
1178
+ import { jsx as jsx32 } from "react/jsx-runtime";
1090
1179
  var ChaptersPanal = ({ chapters }) => {
1091
1180
  const [cs, setCs] = useState9([]);
1092
1181
  const { duration } = useSoftBuildersVideoPlayerContext();
@@ -1101,19 +1190,20 @@ var ChaptersPanal = ({ chapters }) => {
1101
1190
  });
1102
1191
  newCs && setCs(newCs);
1103
1192
  }, [chapters, duration]);
1104
- return /* @__PURE__ */ jsx31("div", { id: "chapters-panal", className: "sb-w-full sb-h-full sb-relative ", children: cs.map((c, i) => /* @__PURE__ */ jsx31(ChapterTooltip_default, { chapter: c }, `chapter-${i}-${c.startTime}`)) });
1193
+ return /* @__PURE__ */ jsx32("div", { id: "chapters-panal", className: "sb-w-full sb-h-full sb-relative ", children: cs.map((c, i) => /* @__PURE__ */ jsx32(ChapterTooltip_default, { chapter: c }, `chapter-${i}-${c.startTime}`)) });
1105
1194
  };
1106
1195
  var ChaptersPanal_default = ChaptersPanal;
1107
1196
 
1108
1197
  // src/components/TimeSlider/index.tsx
1109
1198
  import { useEffect as useEffect9, useState as useState10 } from "react";
1110
- import { jsx as jsx32, jsxs as jsxs12 } from "react/jsx-runtime";
1199
+ import { jsx as jsx33, jsxs as jsxs13 } from "react/jsx-runtime";
1111
1200
  var MIN2 = 0;
1112
1201
  var MAX2 = 100;
1113
1202
  var DEFERENCE = Math.abs(MAX2 - MIN2);
1114
1203
  var BAR_PERCENTAGE_WIDTH = 0.5;
1115
1204
  var TimeSlider = ({ chapters }) => {
1116
1205
  const [timeSlider, setTimeSlider] = useState10(0);
1206
+ const [isClicked, setClicked] = useState10(false);
1117
1207
  const { player, duration, downloadedBufferPercentage } = useSoftBuildersVideoPlayerContext();
1118
1208
  const handleValueChange = (e) => {
1119
1209
  const newTimeSlider = Number(e.target.value);
@@ -1121,14 +1211,16 @@ var TimeSlider = ({ chapters }) => {
1121
1211
  const time = newTimeSlider * duration / DEFERENCE;
1122
1212
  player == null ? void 0 : player.currentTime(time);
1123
1213
  };
1124
- const handleSliderClick = (e) => {
1125
- const slider = e.currentTarget;
1126
- const rect = slider.getBoundingClientRect();
1127
- const offsetX = e.clientX - rect.left;
1128
- const newTimeSlider = offsetX / rect.width * DEFERENCE;
1129
- const time = newTimeSlider * duration / DEFERENCE;
1130
- player == null ? void 0 : player.currentTime(time);
1131
- setTimeSlider(newTimeSlider);
1214
+ const onMouseMove = (e) => {
1215
+ if (isClicked) {
1216
+ const slider = e.currentTarget;
1217
+ const rect = slider.getBoundingClientRect();
1218
+ const offsetX = e.clientX - rect.left;
1219
+ const newTimeSlider = offsetX / rect.width * DEFERENCE;
1220
+ const time = newTimeSlider * duration / DEFERENCE;
1221
+ player == null ? void 0 : player.currentTime(time);
1222
+ setTimeSlider(newTimeSlider);
1223
+ }
1132
1224
  };
1133
1225
  useEffect9(() => {
1134
1226
  const intervalId = setInterval(() => {
@@ -1156,13 +1248,14 @@ var TimeSlider = ({ chapters }) => {
1156
1248
  arr.push(`black 100%`);
1157
1249
  setMaskCuttes(arr.toString());
1158
1250
  }, [chapters, duration]);
1159
- return /* @__PURE__ */ jsxs12("div", { className: " sb-w-full sb-h-2 sb-flex sb-items-center sb-justify-center", children: [
1160
- /* @__PURE__ */ jsx32("div", { className: "sb-absolute sb-top-0 sb-left-0 sb-w-full sb-z-10", children: /* @__PURE__ */ jsx32(
1251
+ return /* @__PURE__ */ jsxs13("div", { className: " sb-w-full sb-h-2 sb-flex sb-items-center sb-justify-center", children: [
1252
+ /* @__PURE__ */ jsx33("div", { className: "sb-absolute sb-top-0 sb-left-0 sb-w-full sb-z-10", children: /* @__PURE__ */ jsx33(
1161
1253
  Slider_default,
1162
1254
  {
1255
+ onMouseMove: (e) => onMouseMove(e),
1256
+ setClicked,
1163
1257
  value: timeSlider,
1164
1258
  handleValueChange,
1165
- handleSliderClick,
1166
1259
  min: MIN2,
1167
1260
  max: MAX2,
1168
1261
  style: {
@@ -1170,7 +1263,7 @@ var TimeSlider = ({ chapters }) => {
1170
1263
  }
1171
1264
  }
1172
1265
  ) }),
1173
- /* @__PURE__ */ jsx32(
1266
+ /* @__PURE__ */ jsx33(
1174
1267
  "div",
1175
1268
  {
1176
1269
  className: "sb-absolute sb-top-0 sb-left-0 sb-w-full sb-h-2 sb-bg-slate-400 sb-rounded-md",
@@ -1200,24 +1293,24 @@ var TimeSlider = ({ chapters }) => {
1200
1293
  var TimeSlider_default = TimeSlider;
1201
1294
 
1202
1295
  // src/components/TimeSliderContainer/index.tsx
1203
- import { jsx as jsx33, jsxs as jsxs13 } from "react/jsx-runtime";
1296
+ import { jsx as jsx34, jsxs as jsxs14 } from "react/jsx-runtime";
1204
1297
  var TimeSliderContainer = ({ notes, chapters }) => {
1205
- return /* @__PURE__ */ jsxs13(
1298
+ return /* @__PURE__ */ jsxs14(
1206
1299
  "div",
1207
1300
  {
1208
1301
  id: "time-slider-container",
1209
1302
  className: "sb-w-full sb-relative sb-flex sb-items-center sb-justify-center",
1210
1303
  children: [
1211
- /* @__PURE__ */ jsx33(
1304
+ /* @__PURE__ */ jsx34(
1212
1305
  "div",
1213
1306
  {
1214
1307
  id: "notes-panal",
1215
1308
  className: "sb-absolute sb-w-full sb-h-full sb-top-[27%] sb-left-0",
1216
- children: /* @__PURE__ */ jsx33(NotesPanal_default, { notes })
1309
+ children: /* @__PURE__ */ jsx34(NotesPanal_default, { notes })
1217
1310
  }
1218
1311
  ),
1219
- /* @__PURE__ */ jsx33("div", { className: "sb-absolute sb-w-full sb-h-full sb-top-0 sb-left-0", children: /* @__PURE__ */ jsx33(ChaptersPanal_default, { chapters }) }),
1220
- /* @__PURE__ */ jsx33(TimeSlider_default, { chapters })
1312
+ /* @__PURE__ */ jsx34("div", { className: "sb-absolute sb-w-full sb-h-full sb-top-0 sb-left-0", children: /* @__PURE__ */ jsx34(ChaptersPanal_default, { chapters }) }),
1313
+ /* @__PURE__ */ jsx34(TimeSlider_default, { chapters })
1221
1314
  ]
1222
1315
  }
1223
1316
  );
@@ -1226,7 +1319,7 @@ var TimeSliderContainer_default = TimeSliderContainer;
1226
1319
 
1227
1320
  // src/components/BufferTracker/index.tsx
1228
1321
  import { useEffect as useEffect10 } from "react";
1229
- import { Fragment, jsx as jsx34 } from "react/jsx-runtime";
1322
+ import { Fragment, jsx as jsx35 } from "react/jsx-runtime";
1230
1323
  var BufferTracker = () => {
1231
1324
  const { player, setDownloadedBufferTimeufferTime } = useSoftBuildersVideoPlayerContext();
1232
1325
  useEffect10(() => {
@@ -1235,13 +1328,13 @@ var BufferTracker = () => {
1235
1328
  }, 1e3);
1236
1329
  return () => clearInterval(intervalId);
1237
1330
  }, [player]);
1238
- return /* @__PURE__ */ jsx34(Fragment, {});
1331
+ return /* @__PURE__ */ jsx35(Fragment, {});
1239
1332
  };
1240
1333
  var BufferTracker_default = BufferTracker;
1241
1334
 
1242
1335
  // src/components/CurrentTimeTracker/index.tsx
1243
1336
  import { useEffect as useEffect11 } from "react";
1244
- import { Fragment as Fragment2, jsx as jsx35 } from "react/jsx-runtime";
1337
+ import { Fragment as Fragment2, jsx as jsx36 } from "react/jsx-runtime";
1245
1338
  var CurrentTimeTracker = () => {
1246
1339
  const { setCurrentTime, player } = useSoftBuildersVideoPlayerContext();
1247
1340
  useEffect11(() => {
@@ -1250,19 +1343,19 @@ var CurrentTimeTracker = () => {
1250
1343
  }, 500);
1251
1344
  return () => clearInterval(intervalId);
1252
1345
  }, [player]);
1253
- return /* @__PURE__ */ jsx35(Fragment2, {});
1346
+ return /* @__PURE__ */ jsx36(Fragment2, {});
1254
1347
  };
1255
1348
  var CurrentTimeTracker_default = CurrentTimeTracker;
1256
1349
 
1257
1350
  // src/components/SubtitleMenu/index.tsx
1258
1351
  import { useEffect as useEffect12, useState as useState11 } from "react";
1259
- import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
1352
+ import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
1260
1353
  var SubtitleOption = ({
1261
1354
  isSelected,
1262
1355
  subtitle,
1263
1356
  onClick
1264
1357
  }) => {
1265
- return /* @__PURE__ */ jsx36(
1358
+ return /* @__PURE__ */ jsx37(
1266
1359
  "button",
1267
1360
  {
1268
1361
  className: "hover:sb-text-orange-500 sb-p-2",
@@ -1270,9 +1363,9 @@ var SubtitleOption = ({
1270
1363
  e.stopPropagation();
1271
1364
  onClick(e);
1272
1365
  },
1273
- children: /* @__PURE__ */ jsxs14("div", { className: "sb-grid sb-grid-cols-12 sb-items-center sb-gap-2", children: [
1274
- /* @__PURE__ */ jsx36("div", { className: "sb-col-span-3", children: isSelected ? /* @__PURE__ */ jsx36(CheckedIcon_default, { className: "sb-w-5 sb-h-5" }) : /* @__PURE__ */ jsx36("div", {}) }),
1275
- /* @__PURE__ */ jsx36("p", { className: "sb-text-left sb-col-span-9", children: subtitle.label })
1366
+ children: /* @__PURE__ */ jsxs15("div", { className: "sb-grid sb-grid-cols-12 sb-items-center sb-gap-2", children: [
1367
+ /* @__PURE__ */ jsx37("div", { className: "sb-col-span-3", children: isSelected ? /* @__PURE__ */ jsx37(CheckedIcon_default, { className: "sb-w-5 sb-h-5" }) : /* @__PURE__ */ jsx37("div", {}) }),
1368
+ /* @__PURE__ */ jsx37("p", { className: "sb-text-left sb-col-span-9", children: subtitle.label })
1276
1369
  ] })
1277
1370
  }
1278
1371
  );
@@ -1305,7 +1398,7 @@ var SubtitleMenu = ({
1305
1398
  setSubtitles(textTracks);
1306
1399
  }
1307
1400
  }, [player]);
1308
- return /* @__PURE__ */ jsx36(
1401
+ return /* @__PURE__ */ jsx37(
1309
1402
  MenuButton_default,
1310
1403
  {
1311
1404
  onMouseEnter,
@@ -1314,14 +1407,14 @@ var SubtitleMenu = ({
1314
1407
  onClick && onClick(e, isOpen);
1315
1408
  },
1316
1409
  classContainer: `${width < 400 || isTrailer ? "!sb-top-8 -sb-left-9" : ""}`,
1317
- buttonContent: /* @__PURE__ */ jsx36(SubIcon_default, { className: "sb-w-4 sb-h-4 sb-text-white " }),
1318
- menuContent: /* @__PURE__ */ jsx36(
1410
+ buttonContent: /* @__PURE__ */ jsx37(SubIcon_default, { className: "sb-w-4 sb-h-4 sb-text-white " }),
1411
+ menuContent: /* @__PURE__ */ jsx37(
1319
1412
  "div",
1320
1413
  {
1321
1414
  className: `sb-rounded-md sb-bg-[#303030] sb-bg-opacity-50 ${width > 400 && !isTrailer ? "sb-w-[150px] sb-py-5" : "sb-w-[90px] sb-items-center sb-justify-center sb-py-1"}`,
1322
- children: /* @__PURE__ */ jsxs14("div", { className: "sb-flex sb-flex-col sb-gap-3", children: [
1323
- /* @__PURE__ */ jsxs14("div", { className: "sb-px-5 sb-flex sb-flex-row sb-gap-3 sb-items-center sb-justify-center", children: [
1324
- /* @__PURE__ */ jsx36(
1415
+ children: /* @__PURE__ */ jsxs15("div", { className: "sb-flex sb-flex-col sb-gap-3", children: [
1416
+ /* @__PURE__ */ jsxs15("div", { className: "sb-px-5 sb-flex sb-flex-row sb-gap-3 sb-items-center sb-justify-center", children: [
1417
+ /* @__PURE__ */ jsx37(
1325
1418
  "button",
1326
1419
  {
1327
1420
  onClick: () => {
@@ -1330,14 +1423,14 @@ var SubtitleMenu = ({
1330
1423
  }
1331
1424
  },
1332
1425
  className: "hover:sb-scale-150",
1333
- children: /* @__PURE__ */ jsx36(LeftArrowIcon_default, { className: "sb-w-3 sb-h-3" })
1426
+ children: /* @__PURE__ */ jsx37(LeftArrowIcon_default, { className: "sb-w-3 sb-h-3" })
1334
1427
  }
1335
1428
  ),
1336
- /* @__PURE__ */ jsx36("h3", { children: "Subtitle" })
1429
+ /* @__PURE__ */ jsx37("h3", { children: "Subtitle" })
1337
1430
  ] }),
1338
- /* @__PURE__ */ jsx36("div", { className: "sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" }),
1339
- /* @__PURE__ */ jsx36("div", { className: "sb-px-5 sb-flex sb-flex-col sb-gap-3 sb-items-start", children: subtitles.map((q, i) => {
1340
- return /* @__PURE__ */ jsx36(
1431
+ /* @__PURE__ */ jsx37("div", { className: "sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" }),
1432
+ /* @__PURE__ */ jsx37("div", { className: "sb-px-5 sb-flex sb-flex-col sb-gap-3 sb-items-start", children: subtitles.map((q, i) => {
1433
+ return /* @__PURE__ */ jsx37(
1341
1434
  SubtitleOption,
1342
1435
  {
1343
1436
  isSelected: q.mode === "showing",
@@ -1362,7 +1455,7 @@ var SubtitleMenu_default = SubtitleMenu;
1362
1455
 
1363
1456
  // src/components/Tooltip/GlobalTooltip.tsx
1364
1457
  import { useState as useState12 } from "react";
1365
- import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
1458
+ import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
1366
1459
  var TooltipModal = ({
1367
1460
  content,
1368
1461
  children,
@@ -1372,13 +1465,13 @@ var TooltipModal = ({
1372
1465
  const [isOpen, setIsOpen] = useState12(false);
1373
1466
  const showTooltip = () => setIsOpen(true);
1374
1467
  const hideTooltip = () => setIsOpen(false);
1375
- return /* @__PURE__ */ jsxs15(
1468
+ return /* @__PURE__ */ jsxs16(
1376
1469
  "div",
1377
1470
  {
1378
1471
  className: "tooltip-container",
1379
1472
  style: { position: "relative", display: "inline-block" },
1380
1473
  children: [
1381
- /* @__PURE__ */ jsx37(
1474
+ /* @__PURE__ */ jsx38(
1382
1475
  "div",
1383
1476
  {
1384
1477
  onMouseEnter: showTooltip,
@@ -1387,7 +1480,7 @@ var TooltipModal = ({
1387
1480
  children
1388
1481
  }
1389
1482
  ),
1390
- isOpen && /* @__PURE__ */ jsx37(
1483
+ isOpen && /* @__PURE__ */ jsx38(
1391
1484
  "div",
1392
1485
  {
1393
1486
  className: `sb-tooltip-modal sb-text-orange-900 sb-my-2 ${width > 400 ? "!sb-bottom-[105%]" : "!sb-top-[105%]"}`,
@@ -1412,7 +1505,7 @@ var TooltipModal = ({
1412
1505
  var GlobalTooltip_default = TooltipModal;
1413
1506
 
1414
1507
  // src/components/ControlBar/index.tsx
1415
- import { Fragment as Fragment3, jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
1508
+ import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
1416
1509
  var ControlBar = ({
1417
1510
  player,
1418
1511
  isPaused,
@@ -1463,67 +1556,64 @@ var ControlBar = ({
1463
1556
  useEffect13(() => {
1464
1557
  setDuration(duration);
1465
1558
  }, [duration]);
1466
- return /* @__PURE__ */ jsxs16(
1559
+ return /* @__PURE__ */ jsxs17(
1467
1560
  "div",
1468
1561
  {
1469
1562
  className: ` !sb-px-4 sb-flex sb-pt-2 sb-justify-center sb-gap-3 sb-w-full sb-h-full ${width > 400 && !isTrailer ? "sb-absolute sb-bottom-1 sb-items-end sb-mb-1 sb-pb-2 " : "sb-items-start"} sb-pb-2`,
1470
1563
  children: [
1471
- /* @__PURE__ */ jsx38(BufferTracker_default, {}),
1472
- /* @__PURE__ */ jsx38(CurrentTimeTracker_default, {}),
1473
- !isTrailer && /* @__PURE__ */ jsxs16(Fragment3, { children: [
1474
- " ",
1475
- /* @__PURE__ */ jsx38(
1476
- "button",
1477
- {
1478
- onClick: () => {
1479
- seek(-seekStep);
1480
- },
1481
- children: /* @__PURE__ */ jsx38(
1482
- GlobalTooltip_default,
1483
- {
1484
- width,
1485
- content: /* @__PURE__ */ jsx38("p", { children: "Backward 5 sec" }),
1486
- isLeft: true,
1487
- children: /* @__PURE__ */ jsx38(BackwardIcon_default, { className: "sb-w-3 sb-h-3" })
1488
- }
1489
- )
1490
- }
1491
- ),
1492
- /* @__PURE__ */ jsx38("button", { onClick: togglePlay, children: /* @__PURE__ */ jsx38(
1493
- GlobalTooltip_default,
1494
- {
1495
- width,
1496
- content: /* @__PURE__ */ jsx38("p", { children: isPaused ? "Play" : "pause" }),
1497
- isLeft: true,
1498
- children: isPaused ? /* @__PURE__ */ jsx38(PlayIcon_default, { className: "sb-w-3 sb-h-3" }) : /* @__PURE__ */ jsx38(PauseIcon_default, { className: "sb-w-3 sb-h-3" })
1499
- }
1500
- ) }),
1501
- /* @__PURE__ */ jsx38(
1502
- "button",
1503
- {
1504
- onClick: (e) => {
1505
- e.preventDefault();
1506
- seek(seekStep);
1507
- },
1508
- children: /* @__PURE__ */ jsx38(
1509
- GlobalTooltip_default,
1510
- {
1511
- width,
1512
- content: /* @__PURE__ */ jsx38("p", { children: "Forward 5 sec" }),
1513
- isLeft: true,
1514
- children: /* @__PURE__ */ jsx38(ForwardIcon_default, { className: "sb-w-3 sb-h-3" })
1515
- }
1516
- )
1517
- }
1518
- )
1519
- ] }),
1564
+ /* @__PURE__ */ jsx39(BufferTracker_default, {}),
1565
+ /* @__PURE__ */ jsx39(CurrentTimeTracker_default, {}),
1566
+ !isTrailer && /* @__PURE__ */ jsx39(
1567
+ "button",
1568
+ {
1569
+ onClick: () => {
1570
+ seek(-seekStep);
1571
+ },
1572
+ children: /* @__PURE__ */ jsx39(
1573
+ GlobalTooltip_default,
1574
+ {
1575
+ width,
1576
+ content: /* @__PURE__ */ jsx39("p", { children: "Backward 5 sec" }),
1577
+ isLeft: true,
1578
+ children: /* @__PURE__ */ jsx39(BackwardIcon_default, { className: "sb-w-3 sb-h-3" })
1579
+ }
1580
+ )
1581
+ }
1582
+ ),
1583
+ /* @__PURE__ */ jsx39("button", { onClick: togglePlay, children: /* @__PURE__ */ jsx39(
1584
+ GlobalTooltip_default,
1585
+ {
1586
+ width,
1587
+ content: /* @__PURE__ */ jsx39("p", { children: isPaused ? "Play" : "pause" }),
1588
+ isLeft: true,
1589
+ children: isPaused ? /* @__PURE__ */ jsx39(PlayIcon_default, { className: "sb-w-3 sb-h-3" }) : /* @__PURE__ */ jsx39(PauseIcon_default, { className: "sb-w-3 sb-h-3" })
1590
+ }
1591
+ ) }),
1592
+ !isTrailer && /* @__PURE__ */ jsx39(
1593
+ "button",
1594
+ {
1595
+ onClick: (e) => {
1596
+ e.preventDefault();
1597
+ seek(seekStep);
1598
+ },
1599
+ children: /* @__PURE__ */ jsx39(
1600
+ GlobalTooltip_default,
1601
+ {
1602
+ width,
1603
+ content: /* @__PURE__ */ jsx39("p", { children: "Forward 5 sec" }),
1604
+ isLeft: true,
1605
+ children: /* @__PURE__ */ jsx39(ForwardIcon_default, { className: "sb-w-3 sb-h-3" })
1606
+ }
1607
+ )
1608
+ }
1609
+ ),
1520
1610
  // isSeeking ||
1521
1611
  // width > 400 &&
1522
- /* @__PURE__ */ jsx38(
1612
+ /* @__PURE__ */ jsx39(
1523
1613
  "div",
1524
1614
  {
1525
1615
  className: `${width < 400 && !isTrailer ? "sb-flex-1 sb-ml-0 sb-mr-0" : "sb-w-full"}`,
1526
- children: /* @__PURE__ */ jsxs16(
1616
+ children: /* @__PURE__ */ jsxs17(
1527
1617
  "div",
1528
1618
  {
1529
1619
  style: width < 400 && !isTrailer ? {
@@ -1533,17 +1623,18 @@ var ControlBar = ({
1533
1623
  } : { width: "98%" },
1534
1624
  className: `flex gap-2 ${width < 400 && !isTrailer ? "absolute sb-top-1" : "-sb-translate-y-0 sb-w-full"} hover:sb-w-[45%] `,
1535
1625
  children: [
1536
- /* @__PURE__ */ jsx38(CurrentTimeLabel_default, {}),
1537
- /* @__PURE__ */ jsx38(TimeSliderContainer_default, { chapters, notes }),
1538
- /* @__PURE__ */ jsx38("p", { children: durationFormater(duration) })
1626
+ /* @__PURE__ */ jsx39(CurrentTimeLabel_default, {}),
1627
+ /* @__PURE__ */ jsx39(TimeSliderContainer_default, { chapters, notes }),
1628
+ /* @__PURE__ */ jsx39("p", { children: durationFormater(duration) })
1539
1629
  ]
1540
1630
  }
1541
1631
  )
1542
1632
  }
1543
1633
  ),
1544
- /* @__PURE__ */ jsx38("div", { className: "sb-h-full", children: /* @__PURE__ */ jsx38(
1634
+ /* @__PURE__ */ jsx39("div", { className: "sb-h-full", children: /* @__PURE__ */ jsx39(
1545
1635
  VolumeSlider_default,
1546
1636
  {
1637
+ setNoteOpen,
1547
1638
  isTrailer,
1548
1639
  volumeSliderToggler,
1549
1640
  width,
@@ -1551,7 +1642,7 @@ var ControlBar = ({
1551
1642
  handleControlDisplayTimer
1552
1643
  }
1553
1644
  ) }),
1554
- /* @__PURE__ */ jsx38(GlobalTooltip_default, { width, content: /* @__PURE__ */ jsx38("p", { children: "Quality" }), children: /* @__PURE__ */ jsx38(
1645
+ /* @__PURE__ */ jsx39(GlobalTooltip_default, { width, content: /* @__PURE__ */ jsx39("p", { children: "Quality" }), children: /* @__PURE__ */ jsx39(
1555
1646
  QualityMenu_default,
1556
1647
  {
1557
1648
  isTrailer,
@@ -1562,7 +1653,7 @@ var ControlBar = ({
1562
1653
  }
1563
1654
  }
1564
1655
  ) }),
1565
- disableNote && /* @__PURE__ */ jsx38(GlobalTooltip_default, { width, content: /* @__PURE__ */ jsx38("p", { children: "Create note" }), children: /* @__PURE__ */ jsx38(
1656
+ disableNote && /* @__PURE__ */ jsx39(GlobalTooltip_default, { width, content: /* @__PURE__ */ jsx39("p", { children: "Create note" }), children: /* @__PURE__ */ jsx39(
1566
1657
  CreateNoteMenu_default,
1567
1658
  {
1568
1659
  handleSaveNoteAction,
@@ -1577,7 +1668,7 @@ var ControlBar = ({
1577
1668
  }
1578
1669
  }
1579
1670
  ) }),
1580
- /* @__PURE__ */ jsx38(GlobalTooltip_default, { width, content: /* @__PURE__ */ jsx38("p", { children: "Subtitle" }), children: /* @__PURE__ */ jsx38(
1671
+ /* @__PURE__ */ jsx39(GlobalTooltip_default, { width, content: /* @__PURE__ */ jsx39("p", { children: "Subtitle" }), children: /* @__PURE__ */ jsx39(
1581
1672
  SubtitleMenu_default,
1582
1673
  {
1583
1674
  isTrailer,
@@ -1588,7 +1679,7 @@ var ControlBar = ({
1588
1679
  }
1589
1680
  }
1590
1681
  ) }),
1591
- /* @__PURE__ */ jsx38(GlobalTooltip_default, { width, content: /* @__PURE__ */ jsx38("p", { children: "Full screen" }), children: /* @__PURE__ */ jsx38(
1682
+ /* @__PURE__ */ jsx39(GlobalTooltip_default, { width, content: /* @__PURE__ */ jsx39("p", { children: "Full screen" }), children: /* @__PURE__ */ jsx39(
1592
1683
  "button",
1593
1684
  {
1594
1685
  onClick: (e) => {
@@ -1600,7 +1691,7 @@ var ControlBar = ({
1600
1691
  player == null ? void 0 : player.requestFullscreen();
1601
1692
  }
1602
1693
  },
1603
- children: /* @__PURE__ */ jsx38(FullScreenIcon_default, { className: "sb-w-3 sb-h-3" })
1694
+ children: /* @__PURE__ */ jsx39(FullScreenIcon_default, { className: "sb-w-3 sb-h-3" })
1604
1695
  }
1605
1696
  ) })
1606
1697
  ]
@@ -1613,36 +1704,40 @@ var ControlBar_default = ControlBar;
1613
1704
  import { isEqual } from "lodash";
1614
1705
 
1615
1706
  // src/components/BigPlayButton/index.tsx
1616
- import { jsx as jsx39 } from "react/jsx-runtime";
1707
+ import { jsx as jsx40, jsxs as jsxs18 } from "react/jsx-runtime";
1617
1708
  var BigPlayButton = ({
1618
1709
  player,
1619
1710
  isPaused,
1620
1711
  setIsPaused,
1621
1712
  height,
1622
1713
  id,
1623
- heightValue
1714
+ heightValue,
1715
+ isLoading
1624
1716
  }) => {
1625
1717
  const togglePlay = () => {
1626
1718
  if (isPaused) player == null ? void 0 : player.play();
1627
1719
  else player == null ? void 0 : player.pause();
1628
1720
  setIsPaused(!isPaused);
1629
1721
  };
1630
- return /* @__PURE__ */ jsx39(
1722
+ return /* @__PURE__ */ jsx40(
1631
1723
  "div",
1632
1724
  {
1633
1725
  style: __spreadValues({}, height && heightValue ? { position: "absolute", top: `-${(heightValue - height) / 2}px` } : {}),
1634
1726
  onClick: togglePlay,
1635
- className: ` sb-w-16 sb-h-16 sb-rounded-full sb-bg-white/30 sb-backdrop-blur-lg sb-flex sb-items-center sb-justify-center`,
1636
- children: isPaused ? /* @__PURE__ */ jsx39(PlayIcon_default, { className: "sb-w-4 sb-h-4" }) : /* @__PURE__ */ jsx39(PauseIcon_default, { className: "sb-w-4 sb-h-4" })
1727
+ className: ` sb-w-16 sb-h-16 sb-rounded-full ${!isLoading ? "sb-bg-white/30 sb-backdrop-blur-lg" : ""} sb-flex sb-items-center sb-justify-center`,
1728
+ children: isPaused || isLoading ? /* @__PURE__ */ jsxs18("div", { children: [
1729
+ !isLoading && /* @__PURE__ */ jsx40(PlayIcon_default, { className: "sb-w-4 sb-h-4" }),
1730
+ isLoading && /* @__PURE__ */ jsx40(SkillamiIcon_default, { className: " sb-w-16 sb-h-16 sb-animate-spin sb-absolute -sb-top-2 -sb-right-2 " })
1731
+ ] }) : /* @__PURE__ */ jsx40(PauseIcon_default, { className: "sb-w-4 sb-h-4" })
1637
1732
  }
1638
1733
  );
1639
1734
  };
1640
1735
  var BigPlayButton_default = BigPlayButton;
1641
1736
 
1642
1737
  // src/components/VideoPlayerComponent/index.tsx
1643
- import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs17 } from "react/jsx-runtime";
1738
+ import { Fragment as Fragment3, jsx as jsx41, jsxs as jsxs19 } from "react/jsx-runtime";
1644
1739
  var bigPlayButtonRoot = {};
1645
- var renderBigPlayButton = (id, player, isPaused, setIsPaused, opacity = "100", height, heightValue) => {
1740
+ var renderBigPlayButton = (id, player, isPaused, setIsPaused, opacity = "100", height, heightValue, isLoading) => {
1646
1741
  const container = document.getElementById(`video-container-${id}`);
1647
1742
  if (container) {
1648
1743
  container.style.height = "100%";
@@ -1653,14 +1748,15 @@ var renderBigPlayButton = (id, player, isPaused, setIsPaused, opacity = "100", h
1653
1748
  bigPlayButtonRoot[id] = ReactDOM.createRoot(element);
1654
1749
  }
1655
1750
  bigPlayButtonRoot[id].render(
1656
- /* @__PURE__ */ jsx40(
1751
+ /* @__PURE__ */ jsx41(
1657
1752
  BigPlayButton_default,
1658
1753
  {
1659
1754
  player,
1660
1755
  isPaused,
1661
1756
  setIsPaused,
1662
1757
  height,
1663
- heightValue
1758
+ heightValue,
1759
+ isLoading
1664
1760
  }
1665
1761
  )
1666
1762
  );
@@ -1685,7 +1781,7 @@ var renderControlBar = (id, player, isPaused, setIsPaused, duration, notes, chap
1685
1781
  element.style.height = "100%";
1686
1782
  element.style.alignItems = "flex-end";
1687
1783
  controlBarRoot[id].render(
1688
- /* @__PURE__ */ jsx40(SoftBuildersVideoPlayerProvider, { children: /* @__PURE__ */ jsx40(
1784
+ /* @__PURE__ */ jsx41(SoftBuildersVideoPlayerProvider, { children: /* @__PURE__ */ jsx41(
1689
1785
  ControlBar_default,
1690
1786
  {
1691
1787
  id,
@@ -1743,6 +1839,7 @@ var VideoPlayerComponent = forwardRef(
1743
1839
  const [isHovered, setIsHovered] = useState14(false);
1744
1840
  const [isNoteOpen, setNoteOpen] = useState14(false);
1745
1841
  const [heightValue, setHeightValue] = useState14(0);
1842
+ const [isLoading, setIsloading] = useState14(false);
1746
1843
  const onReady = (player) => {
1747
1844
  if (playerRef) {
1748
1845
  playerRef.current = player;
@@ -1892,12 +1989,13 @@ var VideoPlayerComponent = forwardRef(
1892
1989
  setIsPaused,
1893
1990
  opacity,
1894
1991
  height,
1895
- heightValue
1992
+ heightValue,
1993
+ isLoading
1896
1994
  );
1897
1995
  }, 500);
1898
1996
  return () => clearTimeout(playButtonTimeout);
1899
1997
  }
1900
- }, [isPaused, opacity, isReady, id, height, heightValue]);
1998
+ }, [isPaused, opacity, isReady, id, height, heightValue, isLoading]);
1901
1999
  useEffect14(() => {
1902
2000
  if (playerRef.current) {
1903
2001
  const intervalId = setInterval(() => {
@@ -1944,6 +2042,11 @@ var VideoPlayerComponent = forwardRef(
1944
2042
  }
1945
2043
  setOpacity("100");
1946
2044
  setIsControlBarPresent(true);
2045
+ timeoutRef.current = setTimeout(() => {
2046
+ setOpacity("0");
2047
+ setBgColor("transparent");
2048
+ setIsControlBarPresent(false);
2049
+ }, 3e3);
1947
2050
  if (isTimerOnly) {
1948
2051
  return;
1949
2052
  }
@@ -2027,7 +2130,26 @@ var VideoPlayerComponent = forwardRef(
2027
2130
  if (controlBar) {
2028
2131
  resizeObserver.observe(controlBar);
2029
2132
  }
2030
- return /* @__PURE__ */ jsx40(Fragment4, { children: /* @__PURE__ */ jsxs17(
2133
+ function debounce(func, delay) {
2134
+ let timeoutId;
2135
+ return function(arg) {
2136
+ if (timeoutId) {
2137
+ clearTimeout(timeoutId);
2138
+ }
2139
+ timeoutId = setTimeout(() => {
2140
+ func(arg);
2141
+ }, delay);
2142
+ };
2143
+ }
2144
+ if (playerRef.current) {
2145
+ playerRef.current.on("waiting", function() {
2146
+ debounce((arg) => setIsloading(arg), 300)(true);
2147
+ });
2148
+ playerRef.current.on("playing", function() {
2149
+ debounce((arg) => setIsloading(arg), 300)(false);
2150
+ });
2151
+ }
2152
+ return /* @__PURE__ */ jsx41(Fragment3, { children: /* @__PURE__ */ jsxs19(
2031
2153
  "div",
2032
2154
  {
2033
2155
  ref: videoRefs,
@@ -2039,7 +2161,7 @@ var VideoPlayerComponent = forwardRef(
2039
2161
  onMouseEnter: () => setIsHovered(true),
2040
2162
  onMouseLeave: () => setIsHovered(false),
2041
2163
  children: [
2042
- bottomRedBar && /* @__PURE__ */ jsx40(
2164
+ bottomRedBar && /* @__PURE__ */ jsx41(
2043
2165
  "div",
2044
2166
  {
2045
2167
  ref: childRef,
@@ -2050,12 +2172,12 @@ var VideoPlayerComponent = forwardRef(
2050
2172
  }
2051
2173
  }
2052
2174
  ),
2053
- /* @__PURE__ */ jsx40(
2175
+ /* @__PURE__ */ jsx41(
2054
2176
  "div",
2055
2177
  {
2056
2178
  className: "hover:sb-cursor-pointer sb-w-full sb-h-full",
2057
2179
  "data-vjs-player": true,
2058
- children: /* @__PURE__ */ jsx40(
2180
+ children: /* @__PURE__ */ jsx41(
2059
2181
  "div",
2060
2182
  {
2061
2183
  onClick: handlePlayerClick,
@@ -2075,7 +2197,7 @@ var VideoPlayerComponent_default = VideoPlayerComponent;
2075
2197
  // src/components/SoftBuildersVideoPlayer/index.tsx
2076
2198
  import { isEqual as isEqual2 } from "lodash";
2077
2199
  import { v4 as uuidv4 } from "uuid";
2078
- import { jsx as jsx41 } from "react/jsx-runtime";
2200
+ import { jsx as jsx42 } from "react/jsx-runtime";
2079
2201
  var DEFAULT_OPTIONS = {
2080
2202
  autoplay: false,
2081
2203
  controls: true,
@@ -2144,7 +2266,7 @@ var Component = forwardRef2(
2144
2266
  useEffect15(() => {
2145
2267
  setUuid(uuidv4());
2146
2268
  }, []);
2147
- return /* @__PURE__ */ jsx41(
2269
+ return /* @__PURE__ */ jsx42(
2148
2270
  VideoPlayerComponent_default,
2149
2271
  {
2150
2272
  id: uuid,
@@ -2167,7 +2289,7 @@ var Component = forwardRef2(
2167
2289
  }
2168
2290
  );
2169
2291
  var SoftBuildersVideoPlayer = memo(Component, (prevProps, nextProps) => {
2170
- return isEqual2(prevProps.options, nextProps.options) && prevProps.notes === nextProps.notes && prevProps.chapters === nextProps.chapters && prevProps.startTime === nextProps.startTime;
2292
+ return isEqual2(prevProps.options, nextProps.options) && prevProps.notes === nextProps.notes && prevProps.chapters === nextProps.chapters && prevProps.startTime === nextProps.startTime && prevProps.height === nextProps.height;
2171
2293
  });
2172
2294
  var SoftBuildersVideoPlayer_default = SoftBuildersVideoPlayer;
2173
2295