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.
Files changed (35) hide show
  1. package/dist/components/ControlBar/index.js +23 -34
  2. package/dist/components/ControlBar/index.js.map +1 -1
  3. package/dist/components/ControlBar/index.tsx +70 -68
  4. package/dist/components/CreateNoteMenu/index.d.ts +3 -1
  5. package/dist/components/CreateNoteMenu/index.js +2 -2
  6. package/dist/components/CreateNoteMenu/index.js.map +1 -1
  7. package/dist/components/CreateNoteMenu/index.tsx +6 -0
  8. package/dist/components/MenuButton/index.d.ts +3 -1
  9. package/dist/components/MenuButton/index.js +2 -2
  10. package/dist/components/MenuButton/index.js.map +1 -1
  11. package/dist/components/MenuButton/index.tsx +9 -1
  12. package/dist/components/QualityMenu/index.js +1 -1
  13. package/dist/components/QualityMenu/index.js.map +1 -1
  14. package/dist/components/QualityMenu/index.tsx +1 -1
  15. package/dist/components/SoftBuildersVideoPlayer/index.js +1 -1
  16. package/dist/components/SoftBuildersVideoPlayer/index.js.map +1 -1
  17. package/dist/components/SoftBuildersVideoPlayer/index.tsx +17 -14
  18. package/dist/components/SubtitleMenu/index.d.ts +3 -1
  19. package/dist/components/SubtitleMenu/index.js +2 -2
  20. package/dist/components/SubtitleMenu/index.js.map +1 -1
  21. package/dist/components/SubtitleMenu/index.tsx +10 -1
  22. package/dist/components/Tooltip/GlobalTooltip.d.ts +2 -0
  23. package/dist/components/Tooltip/GlobalTooltip.js +20 -0
  24. package/dist/components/Tooltip/GlobalTooltip.js.map +1 -0
  25. package/dist/components/Tooltip/GlobalTooltip.tsx +53 -0
  26. package/dist/components/VideoPlayerComponent/index.js +2 -1
  27. package/dist/components/VideoPlayerComponent/index.js.map +1 -1
  28. package/dist/components/VideoPlayerComponent/index.tsx +19 -15
  29. package/dist/components/VolumeSlider/index.js +25 -6
  30. package/dist/components/VolumeSlider/index.js.map +1 -1
  31. package/dist/components/VolumeSlider/index.tsx +45 -17
  32. package/dist/index.css +14 -17
  33. package/dist/index.mjs +206 -108
  34. package/dist/styles/tailwind.css +14 -17
  35. package/package.json +1 -1
@@ -11,9 +11,8 @@ import CurrentTimeTracker from "../CurrentTimeTracker";
11
11
  import { useSoftBuildersVideoPlayerContext } from "../VideoPlayerComponent/provider";
12
12
  import SubtitleMenu from "../SubtitleMenu";
13
13
  import { BackwardIcon, ForwardIcon, FullScreenIcon, PauseIcon, PlayIcon, } from "../../images";
14
- import Tooltip from "../Tooltip";
14
+ import TooltipModal from "../Tooltip/GlobalTooltip";
15
15
  const ControlBar = ({ player, isPaused, setIsPaused, duration, notes, chapters, seekStep = 5, id, handleSaveNoteAction, handleControlDisplayTimer, setIsQualityMenuOpen, setIsSubtitleMenuOpen, setNoteOpen, disableNote, noteButtonClick, }) => {
16
- console.log("432", notes);
17
16
  const { setPlayer, setDuration } = useSoftBuildersVideoPlayerContext();
18
17
  const [width, setWidth] = useState(0);
19
18
  const [isSeeking, setIsSeeking] = useState(true);
@@ -23,16 +22,6 @@ const ControlBar = ({ player, isPaused, setIsPaused, duration, notes, chapters,
23
22
  };
24
23
  const [volumeSliderToggler, setVolumeToggler] = useState(false);
25
24
  const container = document.getElementById(`video-container-${id}`);
26
- const [isToolTip, setIsToolTip] = useState({
27
- sub: false,
28
- seekForward: false,
29
- seekBackward: false,
30
- play: false,
31
- pause: false,
32
- volume: false,
33
- quality: false,
34
- fullScreen: false,
35
- });
36
25
  function handleWidthChange(width) {
37
26
  setWidth(width);
38
27
  }
@@ -63,10 +52,10 @@ const ControlBar = ({ player, isPaused, setIsPaused, duration, notes, chapters,
63
52
  ? "sb-absolute sb-bottom-1 sb-items-end sb-mb-1 sb-pb-2 "
64
53
  : "sb-items-start"} sb-pb-2`, children: [_jsx(BufferTracker, {}), _jsx(CurrentTimeTracker, {}), _jsx("button", { onClick: () => {
65
54
  seek(-seekStep);
66
- }, children: _jsx(BackwardIcon, { className: "sb-w-3 sb-h-3" }) }), _jsx("button", { onClick: togglePlay, children: isPaused ? (_jsx(PlayIcon, { className: "sb-w-3 sb-h-3" })) : (_jsx(PauseIcon, { className: "sb-w-3 sb-h-3" })) }), _jsx("button", { onClick: (e) => {
55
+ }, children: _jsx(TooltipModal, { width: width, content: _jsx("p", { children: "Backward 5 sec" }), isLeft: true, children: _jsx(BackwardIcon, { className: "sb-w-3 sb-h-3" }) }) }), _jsx(TooltipModal, { content: _jsx("p", { children: isPaused ? "Play" : "pause" }), isLeft: true, children: _jsx("button", { onClick: togglePlay, children: isPaused ? (_jsx(PlayIcon, { className: "sb-w-3 sb-h-3" })) : (_jsx(PauseIcon, { className: "sb-w-3 sb-h-3" })) }) }), _jsx("button", { onClick: (e) => {
67
56
  e.preventDefault();
68
57
  seek(seekStep);
69
- }, children: _jsx(ForwardIcon, { className: "sb-w-3 sb-h-3" }) }),
58
+ }, children: _jsx(TooltipModal, { width: width, content: _jsx("p", { children: "Forward 5 sec" }), isLeft: true, children: _jsx(ForwardIcon, { className: "sb-w-3 sb-h-3" }) }) }),
70
59
  // isSeeking ||
71
60
  // width > 400 &&
72
61
  _jsx("div", { className: `${width < 400 ? "sb-flex-1 sb-ml-0 sb-mr-0" : "sb-w-full"}`, children: _jsxs("div", { style: width < 400
@@ -75,28 +64,28 @@ const ControlBar = ({ player, isPaused, setIsPaused, duration, notes, chapters,
75
64
  left: "5%",
76
65
  top: "90%",
77
66
  }
78
- : { width: "98%" }, className: `flex gap-2 ${width < 400 ? "absolute sb-top-1" : "-sb-translate-y-0 sb-w-full"} hover:sb-w-[45%] `, children: [_jsx(CurrentTimeLabel, {}), _jsx(TimeSliderContainer, { chapters: chapters, notes: notes }), _jsx("p", { children: durationFormater(duration) })] }) }), _jsx("div", { className: "sb-h-full", children: _jsx(VolumeSlider, { volumeSliderToggler: volumeSliderToggler, width: width, setIsSeeking: (val) => setIsSeeking(val), handleControlDisplayTimer: handleControlDisplayTimer }) }), _jsx(QualityMenu, { width: width, onClick: (e, isOpen) => {
79
- setVolumeToggler(!volumeSliderToggler);
80
- setIsQualityMenuOpen && setIsQualityMenuOpen(isOpen);
81
- } }), disableNote && (_jsx(CreateNoteMenu, { handleSaveNoteAction: handleSaveNoteAction, width: width, setNoteOpen: setNoteOpen, noteButtonClick: (e) => {
82
- noteButtonClick &&
83
- noteButtonClick({
84
- time: Number((player === null || player === void 0 ? void 0 : player.currentTime()) || 0),
85
- isOpen: e,
86
- });
87
- } })), _jsx(Tooltip, { open: isToolTip.sub == true, children: _jsx(SubtitleMenu, { width: width, onClick: (e, isOpen) => {
67
+ : { width: "98%" }, className: `flex gap-2 ${width < 400 ? "absolute sb-top-1" : "-sb-translate-y-0 sb-w-full"} hover:sb-w-[45%] `, children: [_jsx(CurrentTimeLabel, {}), _jsx(TimeSliderContainer, { chapters: chapters, notes: notes }), _jsx("p", { children: durationFormater(duration) })] }) }), _jsx("div", { className: "sb-h-full", children: _jsx(VolumeSlider, { volumeSliderToggler: volumeSliderToggler, width: width, setIsSeeking: (val) => setIsSeeking(val), handleControlDisplayTimer: handleControlDisplayTimer }) }), _jsx(TooltipModal, { width: width, content: _jsx("p", { children: "Quality" }), children: _jsx(QualityMenu, { width: width, onClick: (e, isOpen) => {
68
+ setVolumeToggler(!volumeSliderToggler);
69
+ setIsQualityMenuOpen && setIsQualityMenuOpen(isOpen);
70
+ } }) }), disableNote && (_jsx(TooltipModal, { width: width, content: _jsx("p", { children: "Create note" }), children: _jsx(CreateNoteMenu, { handleSaveNoteAction: handleSaveNoteAction, width: width, setNoteOpen: setNoteOpen, noteButtonClick: (e) => {
71
+ noteButtonClick &&
72
+ noteButtonClick({
73
+ time: Number((player === null || player === void 0 ? void 0 : player.currentTime()) || 0),
74
+ isOpen: e,
75
+ });
76
+ } }) })), _jsx(TooltipModal, { width: width, content: _jsx("p", { children: "Subtitle" }), children: _jsx(SubtitleMenu, { width: width, onClick: (e, isOpen) => {
88
77
  setVolumeToggler(!volumeSliderToggler);
89
78
  setIsSubtitleMenuOpen && setIsSubtitleMenuOpen(isOpen);
90
- } }) }), _jsx("button", { onClick: (e) => {
91
- e.preventDefault();
92
- e.stopPropagation();
93
- if (player === null || player === void 0 ? void 0 : player.isFullscreen()) {
94
- player === null || player === void 0 ? void 0 : player.exitFullscreen();
95
- }
96
- else {
97
- player === null || player === void 0 ? void 0 : player.requestFullscreen();
98
- }
99
- }, children: _jsx(FullScreenIcon, { className: "sb-w-3 sb-h-3" }) })] }));
79
+ } }) }), _jsx(TooltipModal, { width: width, content: _jsx("p", { children: "Full screen" }), children: _jsx("button", { onClick: (e) => {
80
+ e.preventDefault();
81
+ e.stopPropagation();
82
+ if (player === null || player === void 0 ? void 0 : player.isFullscreen()) {
83
+ player === null || player === void 0 ? void 0 : player.exitFullscreen();
84
+ }
85
+ else {
86
+ player === null || player === void 0 ? void 0 : player.requestFullscreen();
87
+ }
88
+ }, children: _jsx(FullScreenIcon, { className: "sb-w-3 sb-h-3" }) }) })] }));
100
89
  };
101
90
  export default ControlBar;
102
91
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ControlBar/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAKvD,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,cAAc,EACd,SAAS,EACT,QAAQ,GACT,M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C;AAEF,eAAe,UAAU,CAAC"}
@@ -21,8 +21,7 @@ import {
21
21
  PauseIcon,
22
22
  PlayIcon,
23
23
  } from "../../images";
24
- import { set } from "video.js/dist/types/tech/middleware";
25
- import Tooltip from "../Tooltip";
24
+ import TooltipModal from "../Tooltip/GlobalTooltip";
26
25
 
27
26
  type Props<T> = {
28
27
  player: Player | undefined;
@@ -41,16 +40,6 @@ type Props<T> = {
41
40
  setNoteOpen?: (val: boolean) => void;
42
41
  noteButtonClick?: (e: any) => void;
43
42
  };
44
- type TTool = {
45
- sub: boolean;
46
- seekForward: boolean;
47
- seekBackward: boolean;
48
- play: boolean;
49
- pause: boolean;
50
- volume: boolean;
51
- quality: boolean;
52
- fullScreen: boolean;
53
- };
54
43
 
55
44
  const ControlBar = <T,>({
56
45
  player,
@@ -69,8 +58,6 @@ const ControlBar = <T,>({
69
58
  disableNote,
70
59
  noteButtonClick,
71
60
  }: Props<T>) => {
72
- console.log("432", notes);
73
-
74
61
  const { setPlayer, setDuration } = useSoftBuildersVideoPlayerContext();
75
62
  const [width, setWidth] = useState<number>(0);
76
63
  const [isSeeking, setIsSeeking] = useState(true);
@@ -80,16 +67,7 @@ const ControlBar = <T,>({
80
67
  };
81
68
  const [volumeSliderToggler, setVolumeToggler] = useState(false);
82
69
  const container = document.getElementById(`video-container-${id}`);
83
- const [isToolTip, setIsToolTip] = useState<TTool>({
84
- sub: false,
85
- seekForward: false,
86
- seekBackward: false,
87
- play: false,
88
- pause: false,
89
- volume: false,
90
- quality: false,
91
- fullScreen: false,
92
- });
70
+
93
71
  function handleWidthChange(width: any) {
94
72
  setWidth(width);
95
73
  }
@@ -140,22 +118,40 @@ const ControlBar = <T,>({
140
118
  seek(-seekStep);
141
119
  }}
142
120
  >
143
- <BackwardIcon className="sb-w-3 sb-h-3" />
144
- </button>
145
- <button onClick={togglePlay}>
146
- {isPaused ? (
147
- <PlayIcon className="sb-w-3 sb-h-3" />
148
- ) : (
149
- <PauseIcon className="sb-w-3 sb-h-3" />
150
- )}
121
+ <TooltipModal
122
+ width={width}
123
+ content={<p>Backward 5 sec</p>}
124
+ isLeft={true}
125
+ >
126
+ <BackwardIcon className="sb-w-3 sb-h-3" />
127
+ </TooltipModal>
151
128
  </button>
129
+ <TooltipModal
130
+ content={<p>{isPaused ? "Play" : "pause"}</p>}
131
+ isLeft={true}
132
+ >
133
+ <button onClick={togglePlay}>
134
+ {isPaused ? (
135
+ <PlayIcon className="sb-w-3 sb-h-3" />
136
+ ) : (
137
+ <PauseIcon className="sb-w-3 sb-h-3" />
138
+ )}
139
+ </button>
140
+ </TooltipModal>
141
+
152
142
  <button
153
143
  onClick={(e) => {
154
144
  e.preventDefault();
155
145
  seek(seekStep);
156
146
  }}
157
147
  >
158
- <ForwardIcon className="sb-w-3 sb-h-3" />
148
+ <TooltipModal
149
+ width={width}
150
+ content={<p>Forward 5 sec</p>}
151
+ isLeft={true}
152
+ >
153
+ <ForwardIcon className="sb-w-3 sb-h-3" />
154
+ </TooltipModal>
159
155
  </button>
160
156
 
161
157
  {
@@ -197,30 +193,34 @@ const ControlBar = <T,>({
197
193
  handleControlDisplayTimer={handleControlDisplayTimer}
198
194
  />
199
195
  </div>
200
-
201
- <QualityMenu
202
- width={width}
203
- onClick={(e: any, isOpen: boolean) => {
204
- setVolumeToggler(!volumeSliderToggler);
205
- setIsQualityMenuOpen && setIsQualityMenuOpen(isOpen);
206
- }}
207
- />
208
- {/* handleSaveNoteAction */}
209
- {disableNote && (
210
- <CreateNoteMenu
211
- handleSaveNoteAction={handleSaveNoteAction}
196
+ <TooltipModal width={width} content={<p>Quality</p>}>
197
+ <QualityMenu
212
198
  width={width}
213
- setNoteOpen={setNoteOpen}
214
- noteButtonClick={(e) => {
215
- noteButtonClick &&
216
- noteButtonClick({
217
- time: Number(player?.currentTime() || 0),
218
- isOpen: e,
219
- });
199
+ onClick={(e: any, isOpen: boolean) => {
200
+ setVolumeToggler(!volumeSliderToggler);
201
+ setIsQualityMenuOpen && setIsQualityMenuOpen(isOpen);
220
202
  }}
221
203
  />
204
+ </TooltipModal>
205
+
206
+ {/* handleSaveNoteAction */}
207
+ {disableNote && (
208
+ <TooltipModal width={width} content={<p>Create note</p>}>
209
+ <CreateNoteMenu
210
+ handleSaveNoteAction={handleSaveNoteAction}
211
+ width={width}
212
+ setNoteOpen={setNoteOpen}
213
+ noteButtonClick={(e) => {
214
+ noteButtonClick &&
215
+ noteButtonClick({
216
+ time: Number(player?.currentTime() || 0),
217
+ isOpen: e,
218
+ });
219
+ }}
220
+ />
221
+ </TooltipModal>
222
222
  )}
223
- <Tooltip open={isToolTip.sub == true}>
223
+ <TooltipModal width={width} content={<p>Subtitle</p>}>
224
224
  <SubtitleMenu
225
225
  width={width}
226
226
  onClick={(e: any, isOpen: boolean) => {
@@ -228,21 +228,23 @@ const ControlBar = <T,>({
228
228
  setIsSubtitleMenuOpen && setIsSubtitleMenuOpen(isOpen);
229
229
  }}
230
230
  />
231
- </Tooltip>
232
- <button
233
- onClick={(e) => {
234
- e.preventDefault();
235
- e.stopPropagation();
236
-
237
- if (player?.isFullscreen()) {
238
- player?.exitFullscreen();
239
- } else {
240
- player?.requestFullscreen();
241
- }
242
- }}
243
- >
244
- <FullScreenIcon className="sb-w-3 sb-h-3" />
245
- </button>
231
+ </TooltipModal>
232
+ <TooltipModal width={width} content={<p>Full screen</p>}>
233
+ <button
234
+ onClick={(e) => {
235
+ e.preventDefault();
236
+ e.stopPropagation();
237
+
238
+ if (player?.isFullscreen()) {
239
+ player?.exitFullscreen();
240
+ } else {
241
+ player?.requestFullscreen();
242
+ }
243
+ }}
244
+ >
245
+ <FullScreenIcon className="sb-w-3 sb-h-3" />
246
+ </button>
247
+ </TooltipModal>
246
248
  </div>
247
249
  );
248
250
  };
@@ -3,6 +3,8 @@ type Props<T> = {
3
3
  width: number;
4
4
  setNoteOpen?: (val: boolean) => void;
5
5
  noteButtonClick?: (e: any) => void;
6
+ onMouseEnter?: () => void;
7
+ onMouseLeave?: () => void;
6
8
  };
7
- declare const CreateNoteMenu: <T>({ handleSaveNoteAction, width, setNoteOpen, noteButtonClick, }: Props<T>) => import("react/jsx-runtime").JSX.Element;
9
+ declare const CreateNoteMenu: <T>({ handleSaveNoteAction, width, setNoteOpen, noteButtonClick, onMouseEnter, onMouseLeave, }: Props<T>) => import("react/jsx-runtime").JSX.Element;
8
10
  export default CreateNoteMenu;
@@ -3,7 +3,7 @@ import { useState } from "react";
3
3
  import MenuButton from "../MenuButton";
4
4
  import { useSoftBuildersVideoPlayerContext } from "../VideoPlayerComponent/provider";
5
5
  import { ClosedNoteIcon } from "../../images";
6
- const CreateNoteMenu = ({ handleSaveNoteAction, width, setNoteOpen, noteButtonClick, }) => {
6
+ const CreateNoteMenu = ({ handleSaveNoteAction, width, setNoteOpen, noteButtonClick, onMouseEnter, onMouseLeave, }) => {
7
7
  const { player } = useSoftBuildersVideoPlayerContext();
8
8
  const [note, setNote] = useState("");
9
9
  const handleSaveNote = () => {
@@ -17,7 +17,7 @@ const CreateNoteMenu = ({ handleSaveNoteAction, width, setNoteOpen, noteButtonCl
17
17
  window.alert("Video Player, there is no implementation for the handleSaveNoteAction function");
18
18
  }
19
19
  };
20
- return (_jsx(MenuButton, { disablePopUp: true, noteButtonClick: noteButtonClick, setNoteOpen: setNoteOpen, classContainer: `${width < 400 ? "!sb-top-8 -sb-left-[9.75rem]" : ""}`, buttonContent: _jsx(ClosedNoteIcon, { className: "sb-w-3 sb-h-3" }), menuContent: _jsx("div", { 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]"}`, children: _jsxs("div", { className: "sb-flex sb-flex-col sb-gap-3 sb-items-center sb-justify-center", onClick: (e) => e.stopPropagation(), children: [_jsx("h3", { className: "sb-px-5", children: "Add Note" }), _jsx("div", { className: "sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" }), _jsxs("div", { className: "sb-px-5 sb-flex sb-flex-col sb-gap-4 sb-items-start", children: [_jsx("input", { onClick: (e) => e.stopPropagation(), name: "note", type: "text", placeholder: "Add a note", value: note, onChange: (e) => setNote(e.target.value), required: true, 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" }), _jsx("button", { className: "sb-w-full", onClick: handleSaveNote, children: _jsx("div", { className: "sb-px-4 sb-py-3 sb-text-center sb-font-bold sb-bg-orange-500 sb-rounded-md", children: "Save" }) })] })] }) }) }));
20
+ return (_jsx(MenuButton, { onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, disablePopUp: true, noteButtonClick: noteButtonClick, setNoteOpen: setNoteOpen, classContainer: `${width < 400 ? "!sb-top-8 -sb-left-[9.75rem]" : ""}`, buttonContent: _jsx(ClosedNoteIcon, { className: "sb-w-3 sb-h-3" }), menuContent: _jsx("div", { 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]"}`, children: _jsxs("div", { className: "sb-flex sb-flex-col sb-gap-3 sb-items-center sb-justify-center", onClick: (e) => e.stopPropagation(), children: [_jsx("h3", { className: "sb-px-5", children: "Add Note" }), _jsx("div", { className: "sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" }), _jsxs("div", { className: "sb-px-5 sb-flex sb-flex-col sb-gap-4 sb-items-start", children: [_jsx("input", { onClick: (e) => e.stopPropagation(), name: "note", type: "text", placeholder: "Add a note", value: note, onChange: (e) => setNote(e.target.value), required: true, 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" }), _jsx("button", { className: "sb-w-full", onClick: handleSaveNote, children: _jsx("div", { className: "sb-px-4 sb-py-3 sb-text-center sb-font-bold sb-bg-orange-500 sb-rounded-md", children: "Save" }) })] })] }) }) }));
21
21
  };
22
22
  export default CreateNoteMenu;
23
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CreateNoteMenu/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAQ9C,MAAM,cAAc,GAAG,CAAK,EAC1B,oBAAoB,EACpB,KAAK,EACL,WAAW,EACX,eAAe,GACN,EAAE,EAAE;IACb,MAAM,EAAE,MAAM,EAAE,GAAG,iCAAiC,EAAE,CAAC;IAEvD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAErC,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,IAAI,oBAAoB,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,EAAE,KAAI,CAAC,CAAC;YACxC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACjD,OAAO,CAAC,EAAE,CAAC,CAAC;YACd,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CACV,gFAAgF,CACjF,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,YAAY,EAAE,IAAI,EAClB,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,GAAG,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE,EAAE,EACtE,aAAa,EAAE,KAAC,cAAc,IAAC,SAAS,EAAC,eAAe,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AAC,CAAC,eAAe,EAAE,EACnC,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,YAAY,EACxB,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACxC,QAAQ,QACR,SAAS,EAAC,iIAAiI,GAC3I,EAEF,iBAAQ,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,cAAc,YACnD,cAAK,SAAS,EAAC,4EAA4E,qBAErF,GACC,IACL,IACF,GACF,GAER,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -8,12 +8,16 @@ type Props<T> = {
8
8
  width: number;
9
9
  setNoteOpen?: (val: boolean) => void;
10
10
  noteButtonClick?: (e: any) => void;
11
+ onMouseEnter?: () => void;
12
+ onMouseLeave?: () => void;
11
13
  };
12
14
  const CreateNoteMenu = <T,>({
13
15
  handleSaveNoteAction,
14
16
  width,
15
17
  setNoteOpen,
16
18
  noteButtonClick,
19
+ onMouseEnter,
20
+ onMouseLeave,
17
21
  }: Props<T>) => {
18
22
  const { player } = useSoftBuildersVideoPlayerContext();
19
23
 
@@ -34,6 +38,8 @@ const CreateNoteMenu = <T,>({
34
38
 
35
39
  return (
36
40
  <MenuButton
41
+ onMouseEnter={onMouseEnter}
42
+ onMouseLeave={onMouseLeave}
37
43
  disablePopUp={true}
38
44
  noteButtonClick={noteButtonClick}
39
45
  setNoteOpen={setNoteOpen}
@@ -8,6 +8,8 @@ type Props = {
8
8
  setNoteOpen?: (val: boolean) => void;
9
9
  noteButtonClick?: (e: any) => void;
10
10
  disablePopUp?: boolean;
11
+ onMouseEnter?: () => void;
12
+ onMouseLeave?: () => void;
11
13
  };
12
- declare const MenuButton: ({ buttonContent, menuContent, close, classContainer, onClick, setNoteOpen, noteButtonClick, disablePopUp, }: Props) => import("react/jsx-runtime").JSX.Element;
14
+ declare const MenuButton: ({ buttonContent, menuContent, close, classContainer, onClick, setNoteOpen, noteButtonClick, disablePopUp, onMouseEnter, onMouseLeave, }: Props) => import("react/jsx-runtime").JSX.Element;
13
15
  export default MenuButton;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useRef, useState } from "react";
3
- const MenuButton = ({ buttonContent, menuContent, close, classContainer, onClick, setNoteOpen, noteButtonClick, disablePopUp = false, }) => {
3
+ const MenuButton = ({ buttonContent, menuContent, close, classContainer, onClick, setNoteOpen, noteButtonClick, disablePopUp = false, onMouseEnter, onMouseLeave, }) => {
4
4
  const [isOpen, setIsOpen] = useState(false);
5
5
  const buttonRef = useRef(null);
6
6
  const menuRef = useRef(null);
@@ -27,7 +27,7 @@ const MenuButton = ({ buttonContent, menuContent, close, classContainer, onClick
27
27
  useEffect(() => {
28
28
  setNoteOpen && setNoteOpen(isOpen);
29
29
  }, [isOpen]);
30
- return (_jsxs("div", { className: "sb-relative sb-flex sb-items-end", children: [_jsx("button", { ref: buttonRef, onClick: (e) => {
30
+ return (_jsxs("div", { onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, className: "sb-relative sb-flex sb-items-end", children: [_jsx("button", { ref: buttonRef, onClick: (e) => {
31
31
  isOpen && e.stopPropagation();
32
32
  // if (!disablePopUp) {
33
33
  toggleMenu();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MenuButton/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAcxE,MAAM,UAAU,GAAG,CAAC,EAClB,aAAa,EACb,WAAW,EACX,KAAK,EACL,cAAc,EACd,OAAO,EACP,WAAW,EACX,eAAe,EACf,YAAY,GAAG,KAAK,GACd,EAAE,EAAE;IACV,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAA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IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;oBAC/B,IAAI;oBAEJ,eAAe,IAAI,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;gBAC9C,CAAC,mBACa,MAAM,mBACL,MAAM,gBACV,WAAW,YAErB,aAAa,GACP,EAER,CAAC,YAAY,IAAI,MAAM,IAAI,CAC1B,cACE,GAAG,EAAE,OAAO,EACZ,IAAI,EAAC,MAAM,sBACM,UAAU,qBACX,WAAW,EAC3B,SAAS,EAAE,oDAAoD,cAAc,EAAE,YAE9E,WAAW,GACR,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -10,6 +10,8 @@ type Props = {
10
10
  setNoteOpen?: (val: boolean) => void;
11
11
  noteButtonClick?: (e: any) => void;
12
12
  disablePopUp?: boolean;
13
+ onMouseEnter?: () => void;
14
+ onMouseLeave?: () => void;
13
15
  };
14
16
 
15
17
  const MenuButton = ({
@@ -21,6 +23,8 @@ const MenuButton = ({
21
23
  setNoteOpen,
22
24
  noteButtonClick,
23
25
  disablePopUp = false,
26
+ onMouseEnter,
27
+ onMouseLeave,
24
28
  }: Props) => {
25
29
  const [isOpen, setIsOpen] = useState(false);
26
30
  const buttonRef = useRef<HTMLButtonElement | null>(null);
@@ -55,7 +59,11 @@ const MenuButton = ({
55
59
  setNoteOpen && setNoteOpen(isOpen);
56
60
  }, [isOpen]);
57
61
  return (
58
- <div className="sb-relative sb-flex sb-items-end">
62
+ <div
63
+ onMouseEnter={onMouseEnter}
64
+ onMouseLeave={onMouseLeave}
65
+ className="sb-relative sb-flex sb-items-end"
66
+ >
59
67
  <button
60
68
  ref={buttonRef}
61
69
  onClick={(e: any) => {
@@ -33,7 +33,7 @@ const QualityMenu = ({ width, onClick }) => {
33
33
  if (closeMenuFunction) {
34
34
  closeMenuFunction();
35
35
  }
36
- }, className: "hover:sb-scale-150", children: _jsx(LeftArrowIcon, { className: "sb-w-3 sb-h-3" }) }), _jsx("h3", { children: "Quality" })] }), _jsx("div", { className: "sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" }), _jsx("div", { className: "sb-px-5 sb-flex sb-flex-col sb-gap-3 sb-items-start ", children: qualities.map((q, i) => {
36
+ }, className: "hover:sb-scale-150", children: _jsx(LeftArrowIcon, { className: "sb-w-3 sb-h-3" }) }), _jsx("h3", { children: "Quality" })] }), _jsx("div", { className: "sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" }), _jsx("div", { className: "sb-px-5 sb-flex sb-flex-col sb-gap-3 sb-items-start ", children: qualities === null || qualities === void 0 ? void 0 : qualities.map((q, i) => {
37
37
  return (_jsx(_Fragment, { children: _jsx(QualityOption, { width: width, isSelected: currentQualitySrc === q.label, quality: q, onClick: () => {
38
38
  const source = qualities.find((_q) => q.label == _q.label);
39
39
  if (source && source.src != currentQualitySrc) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/QualityMenu/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAe,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAGrF,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AASxE,MAAM,aAAa,GAAG,CAAC,EACrB,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,GACc,EAAE,EAAE;IACvB,OAAO,CACL,iBACE,SAAS,EAAE,4BACT,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAC3B,EAAE,EACF,OAAO,EAAE,OAAO,YAEhB,eAAK,SAAS,EAAC,kDAAkD,aAC/D,cAAK,SAAS,EAAC,eAAe,YAC3B,UAAU,CAAC,CAAC,CAAC,CACZ,KAAC,WAAW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
@@ -120,7 +120,7 @@ const QualityMenu = ({ width, onClick }: QualityMenuProps) => {
120
120
  <div className="sb-w-full sb-h-[.1px] sb-bg-[#AAAAAA] sb-bg-opacity-70" />
121
121
 
122
122
  <div className="sb-px-5 sb-flex sb-flex-col sb-gap-3 sb-items-start ">
123
- {qualities.map((q, i) => {
123
+ {qualities?.map((q, i) => {
124
124
  return (
125
125
  <>
126
126
  <QualityOption
@@ -12,7 +12,7 @@ const DEFAULT_OPTIONS = {
12
12
  sources: [],
13
13
  tracks: [],
14
14
  };
15
- const Component = forwardRef(({ options, notes, chapters, startTime = 0, handleSaveNoteAction, onPlay, onPause, isFocused = true, disableNote, childRef, bottomRedBar, noteButtonClick, }) => {
15
+ const Component = forwardRef(({ options, notes, chapters, startTime = 0, handleSaveNoteAction, onPlay, onPause, isFocused = true, disableNote, childRef, bottomRedBar, noteButtonClick, }, ref) => {
16
16
  options = Object.assign(Object.assign({}, options), { responsive: true, inactivityTimeout: 0, fullscreen: {
17
17
  navigationUI: "hide",
18
18
  } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SoftBuildersVideoPlayer/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAO3D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,eAAe,GAAmC;IACtD,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,EAAE;CACX,CAAC;AAiBF,MAAM,SAAS,GAAG,UAAU,CAC1B,CAAC,EACC,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,GA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,GAAG,IACH,CAAC;gBACL,CAAC;YAEH,SAAS,CAAC,SAAS,CAAC,CAAC;QACvB,CAAC,CAAC;QAEF,SAAS,EAAE,CAAC;IACd,CAAC,EAAE,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,CAAC,CAAC;IAEtB,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IAEzD,OAAO,CACL,KAAC,oBAAoB,IACnB,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,EAClB,OAAO,kCAAO,OAAO,KAAE,MAAM,KAC7B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAC,EAAE,EACT,SAAS,EAAE,SAAS,EACpB,oBAAoB,EAAE,oBAAoB,EAC1C,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,GAChC,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,uBAAuB,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE;IACvE,OAAO,CACL,SAAS,CAAC,OAAO,KAAK,SAAS,CAAC,OAAO;QACvC,SAAS,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK;QACnC,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;QACzC,SAAS,CAAC,SAAS,KAAK,SAAS,CAAC,SAAS,CAC5C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC"}
@@ -35,20 +35,23 @@ export type Props<T = any> = {
35
35
  };
36
36
 
37
37
  const Component = forwardRef<HTMLDivElement, Props<any>>(
38
- ({
39
- options,
40
- notes,
41
- chapters,
42
- startTime = 0,
43
- handleSaveNoteAction,
44
- onPlay,
45
- onPause,
46
- isFocused = true,
47
- disableNote,
48
- childRef,
49
- bottomRedBar,
50
- noteButtonClick,
51
- }: Props<any>) => {
38
+ (
39
+ {
40
+ options,
41
+ notes,
42
+ chapters,
43
+ startTime = 0,
44
+ handleSaveNoteAction,
45
+ onPlay,
46
+ onPause,
47
+ isFocused = true,
48
+ disableNote,
49
+ childRef,
50
+ bottomRedBar,
51
+ noteButtonClick,
52
+ }: Props<any>,
53
+ ref?: any
54
+ ) => {
52
55
  options = {
53
56
  ...options,
54
57
  responsive: true,
@@ -1,6 +1,8 @@
1
1
  type SubtitleMenuProps = {
2
2
  width: number;
3
3
  onClick: (e: any, isOpen: boolean) => void;
4
+ onMouseEnter?: () => void;
5
+ onMouseLeave?: () => void;
4
6
  };
5
- declare const SubtitleMenu: ({ width, onClick }: SubtitleMenuProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const SubtitleMenu: ({ width, onClick, onMouseEnter, onMouseLeave, }: SubtitleMenuProps) => import("react/jsx-runtime").JSX.Element;
6
8
  export default SubtitleMenu;
@@ -9,7 +9,7 @@ const SubtitleOption = ({ isSelected, subtitle, onClick, }) => {
9
9
  onClick(e);
10
10
  }, children: _jsxs("div", { className: "sb-grid sb-grid-cols-12 sb-items-center sb-gap-2", children: [_jsx("div", { className: "sb-col-span-3", children: isSelected ? _jsx(CheckedIcon, { className: "sb-w-5 sb-h-5" }) : _jsx("div", {}) }), _jsx("p", { className: "sb-text-left sb-col-span-9", children: subtitle.label })] }) }));
11
11
  };
12
- const SubtitleMenu = ({ width, onClick }) => {
12
+ const SubtitleMenu = ({ width, onClick, onMouseEnter, onMouseLeave, }) => {
13
13
  const { player } = useSoftBuildersVideoPlayerContext();
14
14
  const [closeMenuFunction, setCloseMenuFunction] = useState(undefined);
15
15
  const [subtitles, setSubtitles] = useState([]);
@@ -32,7 +32,7 @@ const SubtitleMenu = ({ width, onClick }) => {
32
32
  setSubtitles(textTracks);
33
33
  }
34
34
  }, [player]);
35
- return (_jsx(MenuButton, { onClick: (e, isOpen) => {
35
+ return (_jsx(MenuButton, { onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onClick: (e, isOpen) => {
36
36
  onClick && onClick(e, isOpen);
37
37
  }, classContainer: `${width < 400 ? "!sb-top-8 -sb-left-9" : ""}`, buttonContent: _jsx(SubIcon, { className: "sb-w-4 sb-h-4 sb-text-white " }), menuContent: _jsx("div", { className: `sb-rounded-md sb-bg-[#303030] sb-bg-opacity-50 ${width > 400
38
38
  ? "sb-w-[150px] sb-py-5"
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SubtitleMenu/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAe,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAOnE,MAAM,cAAc,GAAG,CAAC,EACtB,UAAU,EACV,QAAQ,EACR,OAAO,GACa,EAAE,EAAE;IACxB,OAAO,CACL,iBACE,SAAS,EAAC,iCAAiC,EAC3C,OAAO,EAAE,CAAC,CAAM,EAAE,EAAE;YAClB,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,OAAO,CAAC,CAAC,CAAC,CAAC;QACb,CAAC,YAED,eAAK,SAAS,EAAC,kDAAkD,aAC/D,cAAK,SAAS,EAAC,eAAe,YAC3B,UAAU,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,SAAS,EAAC,eAAe,GAAG,CAAC,CAAC,CAAC,eAAW,GACjE,EAEN,YAAG,SAAS,EAAC,4BAA4B,YAAE,QAAQ,CAAC,KAAK,GAAK,IAC1D,GACC,CACV,CAAC;AACJ,CAAC,CAAC;AAOF,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAA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