softbuilders-react-video-player 1.1.69 → 1.1.71
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/ControlBar/index.js +23 -34
- package/dist/components/ControlBar/index.js.map +1 -1
- package/dist/components/ControlBar/index.tsx +70 -68
- package/dist/components/CreateNoteMenu/index.d.ts +3 -1
- package/dist/components/CreateNoteMenu/index.js +2 -2
- package/dist/components/CreateNoteMenu/index.js.map +1 -1
- package/dist/components/CreateNoteMenu/index.tsx +6 -0
- package/dist/components/MenuButton/index.d.ts +3 -1
- package/dist/components/MenuButton/index.js +2 -2
- package/dist/components/MenuButton/index.js.map +1 -1
- package/dist/components/MenuButton/index.tsx +9 -1
- package/dist/components/QualityMenu/index.js +1 -1
- package/dist/components/QualityMenu/index.js.map +1 -1
- package/dist/components/QualityMenu/index.tsx +1 -1
- package/dist/components/SoftBuildersVideoPlayer/index.js +1 -1
- package/dist/components/SoftBuildersVideoPlayer/index.js.map +1 -1
- package/dist/components/SoftBuildersVideoPlayer/index.tsx +17 -14
- package/dist/components/SubtitleMenu/index.d.ts +3 -1
- package/dist/components/SubtitleMenu/index.js +2 -2
- package/dist/components/SubtitleMenu/index.js.map +1 -1
- package/dist/components/SubtitleMenu/index.tsx +10 -1
- package/dist/components/Tooltip/GlobalTooltip.d.ts +2 -0
- package/dist/components/Tooltip/GlobalTooltip.js +20 -0
- package/dist/components/Tooltip/GlobalTooltip.js.map +1 -0
- package/dist/components/Tooltip/GlobalTooltip.tsx +53 -0
- package/dist/components/VideoPlayerComponent/index.js +2 -1
- package/dist/components/VideoPlayerComponent/index.js.map +1 -1
- package/dist/components/VideoPlayerComponent/index.tsx +19 -15
- package/dist/components/VolumeSlider/index.js +25 -6
- package/dist/components/VolumeSlider/index.js.map +1 -1
- package/dist/components/VolumeSlider/index.tsx +45 -17
- package/dist/index.css +14 -17
- package/dist/index.mjs +206 -108
- package/dist/styles/tailwind.css +14 -17
- package/package.json +1 -1
@@ -35,9 +35,16 @@ const SubtitleOption = ({
|
|
35
35
|
type SubtitleMenuProps = {
|
36
36
|
width: number;
|
37
37
|
onClick: (e: any, isOpen: boolean) => void;
|
38
|
+
onMouseEnter?: () => void;
|
39
|
+
onMouseLeave?: () => void;
|
38
40
|
};
|
39
41
|
|
40
|
-
const SubtitleMenu = ({
|
42
|
+
const SubtitleMenu = ({
|
43
|
+
width,
|
44
|
+
onClick,
|
45
|
+
onMouseEnter,
|
46
|
+
onMouseLeave,
|
47
|
+
}: SubtitleMenuProps) => {
|
41
48
|
const { player } = useSoftBuildersVideoPlayerContext();
|
42
49
|
|
43
50
|
const [closeMenuFunction, setCloseMenuFunction] = useState<
|
@@ -69,6 +76,8 @@ const SubtitleMenu = ({ width, onClick }: SubtitleMenuProps) => {
|
|
69
76
|
|
70
77
|
return (
|
71
78
|
<MenuButton
|
79
|
+
onMouseEnter={onMouseEnter}
|
80
|
+
onMouseLeave={onMouseLeave}
|
72
81
|
onClick={(e: any, isOpen: boolean) => {
|
73
82
|
onClick && onClick(e, isOpen);
|
74
83
|
}}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useState } from "react";
|
3
|
+
const TooltipModal = ({ content, children, isLeft = false, width = 0, }) => {
|
4
|
+
const [isOpen, setIsOpen] = useState(false);
|
5
|
+
const showTooltip = () => setIsOpen(true);
|
6
|
+
const hideTooltip = () => setIsOpen(false);
|
7
|
+
return (_jsxs("div", { className: "tooltip-container", style: { position: "relative", display: "inline-block" }, children: [_jsx("div", { onMouseEnter: showTooltip, onMouseLeave: hideTooltip, style: { cursor: "pointer" }, children: children }), isOpen && (_jsx("div", { className: `sb-tooltip-modal sb-text-orange-900 sb-my-2 ${width > 400 ? "sb-bottom-[105]" : "sb-top-[105%]"}`, style: {
|
8
|
+
position: "absolute",
|
9
|
+
left: !isLeft ? "-100%" : "100%",
|
10
|
+
transform: !isLeft ? "translateX(-50%)" : "translateX(0%)",
|
11
|
+
backgroundColor: "white",
|
12
|
+
padding: "8px",
|
13
|
+
borderRadius: "4px",
|
14
|
+
whiteSpace: "nowrap",
|
15
|
+
boxShadow: "0px 0px 5px grey",
|
16
|
+
zIndex: 1000,
|
17
|
+
}, children: content }))] }));
|
18
|
+
};
|
19
|
+
export default TooltipModal;
|
20
|
+
//# sourceMappingURL=GlobalTooltip.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GlobalTooltip.js","sourceRoot":"","sources":["../../../src/components/Tooltip/GlobalTooltip.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,MAAM,YAAY,GAAG,CAAC,EACpB,OAAO,EACP,QAAQ,EACR,MAAM,GAAG,KAAK,EACd,KAAK,GAAG,CAAC,GACL,EAAE,EAAE;IACR,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAE3C,OAAO,CACL,eACE,SAAS,EAAC,mBAAmB,EAC7B,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,aAGxD,cACE,YAAY,EAAE,WAAW,EACzB,YAAY,EAAE,WAAW,EACzB,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,YAE3B,QAAQ,GACL,EAGL,MAAM,IAAI,CACT,cACE,SAAS,EAAE,+CACT,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eACpC,EAAE,EACF,KAAK,EAAE;oBACL,QAAQ,EAAE,UAAU;oBACpB,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;oBAChC,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,gBAAgB;oBAC1D,eAAe,EAAE,OAAO;oBACxB,OAAO,EAAE,KAAK;oBACd,YAAY,EAAE,KAAK;oBACnB,UAAU,EAAE,QAAQ;oBACpB,SAAS,EAAE,kBAAkB;oBAC7B,MAAM,EAAE,IAAI;iBACb,YAEA,OAAO,GACJ,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import React, { useState } from "react";
|
2
|
+
|
3
|
+
const TooltipModal = ({
|
4
|
+
content,
|
5
|
+
children,
|
6
|
+
isLeft = false,
|
7
|
+
width = 0,
|
8
|
+
}: any) => {
|
9
|
+
const [isOpen, setIsOpen] = useState(false);
|
10
|
+
|
11
|
+
const showTooltip = () => setIsOpen(true);
|
12
|
+
const hideTooltip = () => setIsOpen(false);
|
13
|
+
|
14
|
+
return (
|
15
|
+
<div
|
16
|
+
className="tooltip-container"
|
17
|
+
style={{ position: "relative", display: "inline-block" }}
|
18
|
+
>
|
19
|
+
{/* Element that triggers the tooltip */}
|
20
|
+
<div
|
21
|
+
onMouseEnter={showTooltip}
|
22
|
+
onMouseLeave={hideTooltip}
|
23
|
+
style={{ cursor: "pointer" }}
|
24
|
+
>
|
25
|
+
{children}
|
26
|
+
</div>
|
27
|
+
|
28
|
+
{/* Tooltip content (modal) */}
|
29
|
+
{isOpen && (
|
30
|
+
<div
|
31
|
+
className={`sb-tooltip-modal sb-text-orange-900 sb-my-2 ${
|
32
|
+
width > 400 ? "sb-bottom-[105]" : "sb-top-[105%]"
|
33
|
+
}`}
|
34
|
+
style={{
|
35
|
+
position: "absolute",
|
36
|
+
left: !isLeft ? "-100%" : "100%",
|
37
|
+
transform: !isLeft ? "translateX(-50%)" : "translateX(0%)",
|
38
|
+
backgroundColor: "white",
|
39
|
+
padding: "8px",
|
40
|
+
borderRadius: "4px",
|
41
|
+
whiteSpace: "nowrap",
|
42
|
+
boxShadow: "0px 0px 5px grey",
|
43
|
+
zIndex: 1000,
|
44
|
+
}}
|
45
|
+
>
|
46
|
+
{content}
|
47
|
+
</div>
|
48
|
+
)}
|
49
|
+
</div>
|
50
|
+
);
|
51
|
+
};
|
52
|
+
|
53
|
+
export default TooltipModal;
|
@@ -43,7 +43,7 @@ const renderControlBar = (id, player, isPaused, setIsPaused, duration, notes, ch
|
|
43
43
|
}
|
44
44
|
}
|
45
45
|
};
|
46
|
-
const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTime = 0, handleSaveNoteAction, poster, onPlay, onPause, disableNote, childRef, bottomRedBar = true, noteButtonClick, }) => {
|
46
|
+
const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTime = 0, handleSaveNoteAction, poster, onPlay, onPause, disableNote, childRef, bottomRedBar = true, noteButtonClick, }, ref) => {
|
47
47
|
var _a;
|
48
48
|
const videoRef = useRef(undefined);
|
49
49
|
const playerRef = useRef(undefined);
|
@@ -232,6 +232,7 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
|
|
232
232
|
if (playerRef.current) {
|
233
233
|
if (playerRef.current.paused()) {
|
234
234
|
try {
|
235
|
+
startTime && playerRef.current.currentTime(startTime);
|
235
236
|
await playerRef.current.play();
|
236
237
|
setIsPaused(false);
|
237
238
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/VideoPlayerComponent/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,OAAO,MAAM,UAAU,CAAC;AAE/B,OAAO,4BAA4B,CAAC;AACpC,OAAO,UAAU,MAAM,eAAe,CAAC;AAMvC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,+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ACvB,CAAC;qBAAM,CAAC;oBACN,aAAa,CAAC,GAAG,CAAC,CAAC;gBACrB,CAAC;YACH,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,EAAE,CAAC;IACrB,CAAC,EAAE,CAAC,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,0CAAE,WAAW,EAAE,CAAC,CAAC,CAAC;IAExC,OAAO,CACL,eACE,GAAG,EAAE,SAAS,EACd,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAC3B,WAAW,EAAE,GAAG,EAAE;YAChB,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACpD,CAAC,EACD,SAAS,EAAC,gFAAgF,EAC1F,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EACtC,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,aAEtC,YAAY,IAAI,CACf,cACE,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,+IACT,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,gBACtC,EAAE,EACF,KAAK,EAAE;oBACL,KAAK,EAAE,UAAU;iBAClB,GACI,CACR,EACD,cACE,SAAS,EAAC,6CAA6C,qCAIvD,cACE,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAE,QAAQ,EACb,SAAS,EAAC,iCAAiC,GACtC,GACH,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,eAAe,oBAAoB,CAAC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/VideoPlayerComponent/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,QAAQ,MAAM,kBAA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ACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,eAAe,oBAAoB,CAAC"}
|
@@ -120,21 +120,24 @@ export type Props<T = any> = {
|
|
120
120
|
noteButtonClick?: (e: any) => void;
|
121
121
|
};
|
122
122
|
const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
123
|
-
(
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
123
|
+
(
|
124
|
+
{
|
125
|
+
id,
|
126
|
+
options,
|
127
|
+
notes,
|
128
|
+
chapters,
|
129
|
+
startTime = 0,
|
130
|
+
handleSaveNoteAction,
|
131
|
+
poster,
|
132
|
+
onPlay,
|
133
|
+
onPause,
|
134
|
+
disableNote,
|
135
|
+
childRef,
|
136
|
+
bottomRedBar = true,
|
137
|
+
noteButtonClick,
|
138
|
+
}: Props,
|
139
|
+
ref?: any
|
140
|
+
) => {
|
138
141
|
const videoRef = useRef<any>(undefined);
|
139
142
|
const playerRef = useRef<Player | undefined>(undefined);
|
140
143
|
const [isReady, setIsReady] = useState(false);
|
@@ -347,6 +350,7 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
|
347
350
|
if (playerRef.current) {
|
348
351
|
if (playerRef.current.paused()) {
|
349
352
|
try {
|
353
|
+
startTime && playerRef.current.currentTime(startTime);
|
350
354
|
await playerRef.current.play();
|
351
355
|
setIsPaused(false);
|
352
356
|
} catch (error) {
|
@@ -8,14 +8,28 @@ const VolumeSlider = ({ width = 0, setIsSeeking, handleControlDisplayTimer, volu
|
|
8
8
|
const { player } = useSoftBuildersVideoPlayerContext();
|
9
9
|
const [isVisible, setVisible] = useState(false);
|
10
10
|
const [volume, setVolume] = useState(0);
|
11
|
+
// Sync volume state with player's volume and mute states
|
11
12
|
useEffect(() => {
|
12
|
-
|
13
|
+
const updateVolumeState = () => {
|
14
|
+
const currentVolume = (player === null || player === void 0 ? void 0 : player.muted())
|
15
|
+
? 0
|
16
|
+
: Number(player === null || player === void 0 ? void 0 : player.volume()) * 100;
|
17
|
+
setVolume(currentVolume);
|
18
|
+
};
|
19
|
+
// Initial volume setup
|
20
|
+
updateVolumeState();
|
21
|
+
// Listen for volume changes
|
22
|
+
player === null || player === void 0 ? void 0 : player.on("volumechange", updateVolumeState);
|
23
|
+
// Cleanup event listener on unmount
|
24
|
+
return () => {
|
25
|
+
player === null || player === void 0 ? void 0 : player.off("volumechange", updateVolumeState);
|
26
|
+
};
|
13
27
|
}, [player]);
|
14
28
|
const timeoutRef = React.useRef(null);
|
15
29
|
useEffect(() => {
|
16
30
|
setVisible(false);
|
17
31
|
}, [volumeSliderToggler]);
|
18
|
-
const
|
32
|
+
const toggleVisibility = (e) => {
|
19
33
|
e.preventDefault();
|
20
34
|
e.stopPropagation();
|
21
35
|
handleControlDisplayTimer(e);
|
@@ -23,6 +37,11 @@ const VolumeSlider = ({ width = 0, setIsSeeking, handleControlDisplayTimer, volu
|
|
23
37
|
if (timeoutRef.current) {
|
24
38
|
clearTimeout(timeoutRef.current);
|
25
39
|
}
|
40
|
+
if (volume == 0 && !isVisible) {
|
41
|
+
setVolume(60);
|
42
|
+
player === null || player === void 0 ? void 0 : player.volume(0.6);
|
43
|
+
player === null || player === void 0 ? void 0 : player.muted(false);
|
44
|
+
}
|
26
45
|
setVisible((prev) => !prev);
|
27
46
|
timeoutRef.current = setTimeout(() => {
|
28
47
|
setVisible(false);
|
@@ -33,7 +52,7 @@ const VolumeSlider = ({ width = 0, setIsSeeking, handleControlDisplayTimer, volu
|
|
33
52
|
e.stopPropagation();
|
34
53
|
const newVolume = Number(e.target.value);
|
35
54
|
setVolume(newVolume);
|
36
|
-
player === null || player === void 0 ? void 0 : player.volume(newVolume / 100);
|
55
|
+
player === null || player === void 0 ? void 0 : player.volume(newVolume / 100); // Normalize volume between 0 and 1
|
37
56
|
if (newVolume === 0) {
|
38
57
|
player === null || player === void 0 ? void 0 : player.muted(true);
|
39
58
|
}
|
@@ -41,11 +60,11 @@ const VolumeSlider = ({ width = 0, setIsSeeking, handleControlDisplayTimer, volu
|
|
41
60
|
player === null || player === void 0 ? void 0 : player.muted(false);
|
42
61
|
}
|
43
62
|
};
|
44
|
-
return (_jsxs("div", { className: `sb-flex ${isVisible ? "" : ""} ${width > 400 ? "sb-flex-col-reverse
|
63
|
+
return (_jsxs("div", { className: `sb-flex ${isVisible ? "" : ""} ${width > 400 ? "sb-flex-col-reverse" : "sb-flex-col !sb-justify-start"} sb-items-center sb-gap-1 sb-h-full`, children: [_jsx("div", { className: `sb-flex sb-relative ${width < 400 ? "-sb-top-1" : "sb-top-1"}`, onClick: toggleVisibility, children: volume == 0 || (player === null || player === void 0 ? void 0 : player.muted()) ? (_jsx(MuteIcon, { className: `sb-w-3 sb-h-3 ${width < 400 ? "" : ""} sb-h-5 sb-w-5` })) : (_jsx(UnmuteIcon, { className: `sb-w-3 sb-h-3 ${width < 400 ? "" : ""} 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
|
45
64
|
? "sb-w-[22px] sb-opacity-100 sb-visible"
|
46
|
-
: "
|
65
|
+
: "sb-w-[22px] sb-opacity-0 sb-invisible"} ${width > 400
|
47
66
|
? "-sb-rotate-90 -sb-translate-y-1"
|
48
|
-
: "sb-rotate-90 sb-translate-y-1"} sb-relative
|
67
|
+
: "sb-rotate-90 sb-translate-y-1"} sb-relative`, children: _jsx(Slider, { value: volume, handleValueChange: handleValueChange, min: MIN, max: MAX, className: "!sb-w-16" }) }) })] }));
|
49
68
|
};
|
50
69
|
export default VolumeSlider;
|
51
70
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/VolumeSlider/index.tsx"],"names":[],"mappings":";AAAA,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AC,CAAC,EAAE,gBAAgB,GACjE,CACH,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IACT,SAAS,EAAE,iBAAiB,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,gBAAgB,GACjE,CACH,GACG,EAGN,cAAK,SAAS,EAAC,2CAA2C,YAExD,cACE,SAAS,EAAE,oDACT,SAAS;wBACP,CAAC,CAAC,uCAAuC;wBACzC,CAAC,CAAC,uCACN,IACE,KAAK,GAAG,GAAG;wBACT,CAAC,CAAC,iCAAiC;wBACnC,CAAC,CAAC,+BACN,cAAc,YAEd,KAAC,MAAM,IACL,KAAK,EAAE,MAAM,EACb,iBAAiB,EAAE,iBAAiB,EACpC,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,UAAU,GACpB,GACE,GACF,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -2,15 +2,17 @@ import React, { useEffect, useState } from "react";
|
|
2
2
|
import Slider from "../Slider";
|
3
3
|
import { useSoftBuildersVideoPlayerContext } from "../VideoPlayerComponent/provider";
|
4
4
|
import { MuteIcon, UnmuteIcon } from "../../images";
|
5
|
-
|
5
|
+
|
6
6
|
const MIN = 0,
|
7
7
|
MAX = 100;
|
8
|
+
|
8
9
|
type Props = {
|
9
10
|
width?: number;
|
10
11
|
setIsSeeking: (val: boolean) => void;
|
11
12
|
handleControlDisplayTimer: (e: any) => void;
|
12
13
|
volumeSliderToggler: boolean;
|
13
14
|
};
|
15
|
+
|
14
16
|
const VolumeSlider = ({
|
15
17
|
width = 0,
|
16
18
|
setIsSeeking,
|
@@ -20,57 +22,83 @@ const VolumeSlider = ({
|
|
20
22
|
const { player } = useSoftBuildersVideoPlayerContext();
|
21
23
|
const [isVisible, setVisible] = useState(false);
|
22
24
|
const [volume, setVolume] = useState(0);
|
25
|
+
|
26
|
+
// Sync volume state with player's volume and mute states
|
23
27
|
useEffect(() => {
|
24
|
-
|
28
|
+
const updateVolumeState = () => {
|
29
|
+
const currentVolume = player?.muted()
|
30
|
+
? 0
|
31
|
+
: Number(player?.volume()) * 100;
|
32
|
+
setVolume(currentVolume);
|
33
|
+
};
|
34
|
+
|
35
|
+
// Initial volume setup
|
36
|
+
updateVolumeState();
|
37
|
+
|
38
|
+
// Listen for volume changes
|
39
|
+
player?.on("volumechange", updateVolumeState);
|
40
|
+
|
41
|
+
// Cleanup event listener on unmount
|
42
|
+
return () => {
|
43
|
+
player?.off("volumechange", updateVolumeState);
|
44
|
+
};
|
25
45
|
}, [player]);
|
46
|
+
|
26
47
|
const timeoutRef = React.useRef<any>(null);
|
27
48
|
useEffect(() => {
|
28
49
|
setVisible(false);
|
29
50
|
}, [volumeSliderToggler]);
|
30
51
|
|
31
|
-
const
|
52
|
+
const toggleVisibility = (e: any) => {
|
32
53
|
e.preventDefault();
|
33
54
|
e.stopPropagation();
|
34
55
|
handleControlDisplayTimer(e);
|
56
|
+
|
35
57
|
setIsSeeking(isVisible);
|
36
58
|
if (timeoutRef.current) {
|
37
59
|
clearTimeout(timeoutRef.current);
|
38
60
|
}
|
61
|
+
if (volume == 0 && !isVisible) {
|
62
|
+
setVolume(60);
|
63
|
+
player?.volume(0.6);
|
64
|
+
player?.muted(false);
|
65
|
+
}
|
39
66
|
setVisible((prev) => !prev);
|
40
67
|
timeoutRef.current = setTimeout(() => {
|
41
68
|
setVisible(false);
|
42
69
|
}, 5000);
|
43
70
|
};
|
71
|
+
|
44
72
|
const handleValueChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
45
73
|
e.preventDefault();
|
46
74
|
e.stopPropagation();
|
47
75
|
const newVolume = Number(e.target.value);
|
48
76
|
setVolume(newVolume);
|
49
|
-
player?.volume(newVolume / 100);
|
77
|
+
player?.volume(newVolume / 100); // Normalize volume between 0 and 1
|
78
|
+
|
50
79
|
if (newVolume === 0) {
|
51
80
|
player?.muted(true);
|
52
81
|
} else {
|
53
82
|
player?.muted(false);
|
54
83
|
}
|
55
84
|
};
|
85
|
+
|
56
86
|
return (
|
57
87
|
<div
|
58
88
|
className={`sb-flex ${isVisible ? "" : ""} ${
|
59
|
-
width > 400 ? "sb-flex-col-reverse
|
60
|
-
} ${
|
61
|
-
false ? "!sb-flex-row !sb-items-start " : ""
|
89
|
+
width > 400 ? "sb-flex-col-reverse" : "sb-flex-col !sb-justify-start"
|
62
90
|
} sb-items-center sb-gap-1 sb-h-full`}
|
63
91
|
>
|
64
92
|
{/* Mute/Unmute Icon */}
|
65
93
|
<div
|
66
94
|
className={`sb-flex sb-relative ${
|
67
95
|
width < 400 ? "-sb-top-1" : "sb-top-1"
|
68
|
-
}
|
69
|
-
onClick={
|
96
|
+
}`}
|
97
|
+
onClick={toggleVisibility}
|
70
98
|
>
|
71
|
-
{volume
|
99
|
+
{volume == 0 || player?.muted() ? (
|
72
100
|
<MuteIcon
|
73
|
-
className={`sb-w-3 sb-h-3 ${width < 400 ? "
|
101
|
+
className={`sb-w-3 sb-h-3 ${width < 400 ? "" : ""} sb-h-5 sb-w-5`}
|
74
102
|
/>
|
75
103
|
) : (
|
76
104
|
<UnmuteIcon
|
@@ -78,21 +106,20 @@ const VolumeSlider = ({
|
|
78
106
|
/>
|
79
107
|
)}
|
80
108
|
</div>
|
109
|
+
|
81
110
|
{/* Slider Wrapper */}
|
82
|
-
<div className="sb-flex
|
111
|
+
<div className="sb-flex sb-items-center sb-justify-center">
|
83
112
|
{/* Rotated Slider */}
|
84
113
|
<div
|
85
114
|
className={`sb-transition-all sb-ease-in-out sb-duration-500 ${
|
86
115
|
isVisible
|
87
116
|
? "sb-w-[22px] sb-opacity-100 sb-visible"
|
88
|
-
: "
|
89
|
-
}
|
117
|
+
: "sb-w-[22px] sb-opacity-0 sb-invisible"
|
118
|
+
} ${
|
90
119
|
width > 400
|
91
120
|
? "-sb-rotate-90 -sb-translate-y-1"
|
92
121
|
: "sb-rotate-90 sb-translate-y-1"
|
93
|
-
} sb-relative
|
94
|
-
false ? "sb-static sb-w-16 sb-rotate-0 sb-translate-y-0 " : ""
|
95
|
-
}`}
|
122
|
+
} sb-relative`}
|
96
123
|
>
|
97
124
|
<Slider
|
98
125
|
value={volume}
|
@@ -106,4 +133,5 @@ const VolumeSlider = ({
|
|
106
133
|
</div>
|
107
134
|
);
|
108
135
|
};
|
136
|
+
|
109
137
|
export default VolumeSlider;
|
package/dist/index.css
CHANGED
@@ -418,9 +418,6 @@ video {
|
|
418
418
|
.sb-invisible {
|
419
419
|
visibility: hidden;
|
420
420
|
}
|
421
|
-
.sb-static {
|
422
|
-
position: static;
|
423
|
-
}
|
424
421
|
.sb-absolute {
|
425
422
|
position: absolute;
|
426
423
|
}
|
@@ -451,6 +448,9 @@ video {
|
|
451
448
|
.sb-bottom-2 {
|
452
449
|
bottom: 0.5rem;
|
453
450
|
}
|
451
|
+
.sb-bottom-\[105\] {
|
452
|
+
bottom: 105;
|
453
|
+
}
|
454
454
|
.sb-bottom-full {
|
455
455
|
bottom: 100%;
|
456
456
|
}
|
@@ -472,6 +472,9 @@ video {
|
|
472
472
|
.sb-top-2 {
|
473
473
|
top: 0.5rem;
|
474
474
|
}
|
475
|
+
.sb-top-\[105\%\] {
|
476
|
+
top: 105%;
|
477
|
+
}
|
475
478
|
.sb-top-\[27\%\] {
|
476
479
|
top: 27%;
|
477
480
|
}
|
@@ -490,6 +493,10 @@ video {
|
|
490
493
|
.sb-col-span-9 {
|
491
494
|
grid-column: span 9 / span 9;
|
492
495
|
}
|
496
|
+
.sb-my-2 {
|
497
|
+
margin-top: 0.5rem;
|
498
|
+
margin-bottom: 0.5rem;
|
499
|
+
}
|
493
500
|
.sb-mb-1 {
|
494
501
|
margin-bottom: 0.25rem;
|
495
502
|
}
|
@@ -587,10 +594,6 @@ video {
|
|
587
594
|
--tw-translate-x: -50%;
|
588
595
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
589
596
|
}
|
590
|
-
.sb-translate-y-0 {
|
591
|
-
--tw-translate-y: 0px;
|
592
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
593
|
-
}
|
594
597
|
.sb-translate-y-1 {
|
595
598
|
--tw-translate-y: 0.25rem;
|
596
599
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
@@ -599,10 +602,6 @@ video {
|
|
599
602
|
--tw-rotate: -90deg;
|
600
603
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
601
604
|
}
|
602
|
-
.sb-rotate-0 {
|
603
|
-
--tw-rotate: 0deg;
|
604
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
605
|
-
}
|
606
605
|
.sb-rotate-90 {
|
607
606
|
--tw-rotate: 90deg;
|
608
607
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
@@ -621,9 +620,6 @@ video {
|
|
621
620
|
.sb-grid-cols-12 {
|
622
621
|
grid-template-columns: repeat(12, minmax(0, 1fr));
|
623
622
|
}
|
624
|
-
.\!sb-flex-row {
|
625
|
-
flex-direction: row !important;
|
626
|
-
}
|
627
623
|
.sb-flex-row {
|
628
624
|
flex-direction: row;
|
629
625
|
}
|
@@ -633,9 +629,6 @@ video {
|
|
633
629
|
.sb-flex-col-reverse {
|
634
630
|
flex-direction: column-reverse;
|
635
631
|
}
|
636
|
-
.\!sb-items-start {
|
637
|
-
align-items: flex-start !important;
|
638
|
-
}
|
639
632
|
.sb-items-start {
|
640
633
|
align-items: flex-start;
|
641
634
|
}
|
@@ -766,6 +759,10 @@ video {
|
|
766
759
|
.sb-font-bold {
|
767
760
|
font-weight: 700;
|
768
761
|
}
|
762
|
+
.sb-text-orange-900 {
|
763
|
+
--tw-text-opacity: 1;
|
764
|
+
color: rgb(124 45 18 / var(--tw-text-opacity));
|
765
|
+
}
|
769
766
|
.sb-text-white {
|
770
767
|
--tw-text-opacity: 1;
|
771
768
|
color: rgb(255 255 255 / var(--tw-text-opacity));
|