softbuilders-react-video-player 1.2.16 → 1.2.18

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,8 +29,16 @@ const VolumeSlider = ({ width = 0, setIsSeeking, handleControlDisplayTimer, volu
29
29
  e.stopPropagation();
30
30
  const slider = e.currentTarget;
31
31
  const rect = slider.getBoundingClientRect();
32
- const offsetX = e.clientY - rect.top;
33
- const newVolume = (offsetX / rect.height) * 100;
32
+ let offsetX;
33
+ let newVolume;
34
+ if (!isTrailer && width > 400) {
35
+ offsetX = e.clientY - rect.bottom;
36
+ newVolume = (offsetX / rect.height) * -100;
37
+ }
38
+ else {
39
+ offsetX = e.clientY - rect.top;
40
+ newVolume = (offsetX / rect.height) * 100;
41
+ }
34
42
  setVolume(newVolume);
35
43
  player === null || player === void 0 ? void 0 : player.volume(newVolume / 100);
36
44
  if (newVolume === 0) {
@@ -81,7 +89,7 @@ const VolumeSlider = ({ width = 0, setIsSeeking, handleControlDisplayTimer, volu
81
89
  };
82
90
  return (_jsxs("div", { className: `sb-flex ${isVisible ? "" : ""} ${width > 400 && !isTrailer
83
91
  ? "sb-flex-col-reverse"
84
- : `sb-flex-col ${isTrailer ? "sb-justify-start" : ""}`} sb-items-center sb-gap-1 sb-h-full`, children: [_jsx("div", { className: `sb-flex sb-relative ${width < 400 || isTrailer ? "-sb-top-1" : "sb-top-1"}`, onClick: toggleVisibility, onDoubleClick: handleDoubleClick, children: volume == 0 || (player === null || player === void 0 ? void 0 : player.muted()) ? (_jsx(VolumeMute, { className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5` })) : volume < 25 ? (_jsx(VolumeVLow, { className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5` })) : volume < 50 ? (_jsx(VolumeLow, { className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5` })) : (_jsx(VolumeHigh, { className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5` })) }), _jsx("div", { className: "sb-flex sb-w-fit sb-h-fit sb-items-center sb-justify-center", children: _jsx("div", { className: `sb-p-1 !sb-h-fit sb-transition-all sb-ease-in-out sb-duration-500 ${isVisible
92
+ : `sb-flex-col ${isTrailer ? "sb-justify-start" : ""}`} sb-items-center sb-gap-1 sb-h-full`, children: [_jsx("div", { className: `sb-flex sb-relative ${width < 400 || isTrailer ? "-sb-top-1" : "sb-top-1"}`, onClick: toggleVisibility, onDoubleClick: handleDoubleClick, children: volume == 0 || (player === null || player === void 0 ? void 0 : player.muted()) ? (_jsx(VolumeMute, { className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5` })) : volume < 25 ? (_jsx(VolumeVLow, { className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5` })) : volume < 50 ? (_jsx(VolumeLow, { className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5` })) : (_jsx(VolumeHigh, { className: `sb-w-3 sb-h-3 ${width < 400 || isTrailer ? "" : ""} sb-h-5 sb-w-5` })) }), _jsx("div", { className: "sb-flex sb-items-center sb-justify-center", children: _jsx("div", { className: ` sb-transition-all sb-ease-in-out sb-duration-500 ${isVisible
85
93
  ? "sb-w-[22px] sb-opacity-100 sb-visible"
86
94
  : "sb-w-[22px] sb-opacity-0 sb-invisible"} ${width > 400 && !isTrailer
87
95
  ? "-sb-rotate-90 -sb-translate-y-1"
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/VolumeSlider/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,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AuB,GAC1C,GACE,GACF,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -51,8 +51,15 @@ const VolumeSlider = ({
51
51
  e.stopPropagation();
52
52
  const slider = e.currentTarget;
53
53
  const rect = slider.getBoundingClientRect();
54
- const offsetX = e.clientY - rect.top;
55
- const newVolume = (offsetX / rect.height) * 100;
54
+ let offsetX;
55
+ let newVolume;
56
+ if (!isTrailer && width > 400) {
57
+ offsetX = e.clientY - rect.bottom;
58
+ newVolume = (offsetX / rect.height) * -100;
59
+ } else {
60
+ offsetX = e.clientY - rect.top;
61
+ newVolume = (offsetX / rect.height) * 100;
62
+ }
56
63
 
57
64
  setVolume(newVolume);
58
65
  player?.volume(newVolume / 100);
@@ -149,10 +156,10 @@ const VolumeSlider = ({
149
156
  </div>
150
157
 
151
158
  {/* Slider Wrapper */}
152
- <div className="sb-flex sb-w-fit sb-h-fit sb-items-center sb-justify-center">
159
+ <div className="sb-flex sb-items-center sb-justify-center">
153
160
  {/* Rotated Slider */}
154
161
  <div
155
- className={`sb-p-1 !sb-h-fit sb-transition-all sb-ease-in-out sb-duration-500 ${
162
+ className={` sb-transition-all sb-ease-in-out sb-duration-500 ${
156
163
  isVisible
157
164
  ? "sb-w-[22px] sb-opacity-100 sb-visible"
158
165
  : "sb-w-[22px] sb-opacity-0 sb-invisible"
package/dist/index.css CHANGED
@@ -515,10 +515,6 @@ video {
515
515
  .sb-grid {
516
516
  display: grid;
517
517
  }
518
- .\!sb-h-fit {
519
- height: -moz-fit-content !important;
520
- height: fit-content !important;
521
- }
522
518
  .sb-h-1 {
523
519
  height: 0.25rem;
524
520
  }
@@ -543,10 +539,6 @@ video {
543
539
  .sb-h-\[3px\] {
544
540
  height: 3px;
545
541
  }
546
- .sb-h-fit {
547
- height: -moz-fit-content;
548
- height: fit-content;
549
- }
550
542
  .sb-h-full {
551
543
  height: 100%;
552
544
  }
@@ -580,10 +572,6 @@ video {
580
572
  .sb-w-\[90px\] {
581
573
  width: 90px;
582
574
  }
583
- .sb-w-fit {
584
- width: -moz-fit-content;
585
- width: fit-content;
586
- }
587
575
  .sb-w-full {
588
576
  width: 100%;
589
577
  }
@@ -729,9 +717,6 @@ video {
729
717
  .sb-bg-opacity-70 {
730
718
  --tw-bg-opacity: 0.7;
731
719
  }
732
- .sb-p-1 {
733
- padding: 0.25rem;
734
- }
735
720
  .sb-p-2 {
736
721
  padding: 0.5rem;
737
722
  }
package/dist/index.mjs CHANGED
@@ -577,8 +577,15 @@ var VolumeSlider = ({
577
577
  e.stopPropagation();
578
578
  const slider = e.currentTarget;
579
579
  const rect = slider.getBoundingClientRect();
580
- const offsetX = e.clientY - rect.top;
581
- const newVolume = offsetX / rect.height * 100;
580
+ let offsetX;
581
+ let newVolume;
582
+ if (!isTrailer && width > 400) {
583
+ offsetX = e.clientY - rect.bottom;
584
+ newVolume = offsetX / rect.height * -100;
585
+ } else {
586
+ offsetX = e.clientY - rect.top;
587
+ newVolume = offsetX / rect.height * 100;
588
+ }
582
589
  setVolume(newVolume);
583
590
  player == null ? void 0 : player.volume(newVolume / 100);
584
591
  if (newVolume === 0) {
@@ -659,10 +666,10 @@ var VolumeSlider = ({
659
666
  )
660
667
  }
661
668
  ),
662
- /* @__PURE__ */ jsx23("div", { className: "sb-flex sb-w-fit sb-h-fit sb-items-center sb-justify-center", children: /* @__PURE__ */ jsx23(
669
+ /* @__PURE__ */ jsx23("div", { className: "sb-flex sb-items-center sb-justify-center", children: /* @__PURE__ */ jsx23(
663
670
  "div",
664
671
  {
665
- className: `sb-p-1 !sb-h-fit 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`,
672
+ 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`,
666
673
  children: /* @__PURE__ */ jsx23(
667
674
  Slider_default,
668
675
  {
@@ -602,10 +602,6 @@ video {
602
602
  .sb-grid {
603
603
  display: grid;
604
604
  }
605
- .\!sb-h-fit {
606
- height: -moz-fit-content !important;
607
- height: fit-content !important;
608
- }
609
605
  .sb-h-1 {
610
606
  height: 0.25rem;
611
607
  }
@@ -630,10 +626,6 @@ video {
630
626
  .sb-h-\[3px\] {
631
627
  height: 3px;
632
628
  }
633
- .sb-h-fit {
634
- height: -moz-fit-content;
635
- height: fit-content;
636
- }
637
629
  .sb-h-full {
638
630
  height: 100%;
639
631
  }
@@ -667,10 +659,6 @@ video {
667
659
  .sb-w-\[90px\] {
668
660
  width: 90px;
669
661
  }
670
- .sb-w-fit {
671
- width: -moz-fit-content;
672
- width: fit-content;
673
- }
674
662
  .sb-w-full {
675
663
  width: 100%;
676
664
  }
@@ -816,9 +804,6 @@ video {
816
804
  .sb-bg-opacity-70 {
817
805
  --tw-bg-opacity: 0.7;
818
806
  }
819
- .sb-p-1 {
820
- padding: 0.25rem;
821
- }
822
807
  .sb-p-2 {
823
808
  padding: 0.5rem;
824
809
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "softbuilders-react-video-player",
3
3
  "description": "Standalone video player component",
4
- "version": "1.2.16",
4
+ "version": "1.2.18",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [