softbuilders-react-video-player 1.1.60 → 1.1.61
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/ControlBar/index.d.ts +2 -1
- package/dist/components/ControlBar/index.js +4 -2
- package/dist/components/ControlBar/index.js.map +1 -1
- package/dist/components/ControlBar/index.tsx +5 -0
- package/dist/components/CreateNoteMenu/index.d.ts +2 -1
- package/dist/components/CreateNoteMenu/index.js +2 -2
- package/dist/components/CreateNoteMenu/index.js.map +1 -1
- package/dist/components/CreateNoteMenu/index.tsx +4 -0
- package/dist/components/MenuButton/index.d.ts +3 -1
- package/dist/components/MenuButton/index.js +6 -3
- package/dist/components/MenuButton/index.js.map +1 -1
- package/dist/components/MenuButton/index.tsx +10 -2
- package/dist/components/SoftBuildersVideoPlayer/index.d.ts +1 -0
- package/dist/components/SoftBuildersVideoPlayer/index.js +2 -2
- package/dist/components/SoftBuildersVideoPlayer/index.js.map +1 -1
- package/dist/components/SoftBuildersVideoPlayer/index.tsx +3 -0
- package/dist/components/VideoPlayerComponent/index.d.ts +1 -0
- package/dist/components/VideoPlayerComponent/index.js +4 -4
- package/dist/components/VideoPlayerComponent/index.js.map +1 -1
- package/dist/components/VideoPlayerComponent/index.tsx +7 -2
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +29 -12
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
@@ -16,6 +16,7 @@ type Props<T> = {
|
|
16
16
|
setIsSubtitleMenuOpen?: (val: boolean) => void;
|
17
17
|
disableNote?: boolean;
|
18
18
|
setNoteOpen?: (val: boolean) => void;
|
19
|
+
noteButtonClick?: (e: any) => void;
|
19
20
|
};
|
20
|
-
declare const ControlBar: <T>({ player, isPaused, setIsPaused, duration, notes, chapters, seekStep, id, handleSaveNoteAction, handleControlDisplayTimer, setIsQualityMenuOpen, setIsSubtitleMenuOpen, setNoteOpen, disableNote, }: Props<T>) => import("react/jsx-runtime").JSX.Element;
|
21
|
+
declare const ControlBar: <T>({ player, isPaused, setIsPaused, duration, notes, chapters, seekStep, id, handleSaveNoteAction, handleControlDisplayTimer, setIsQualityMenuOpen, setIsSubtitleMenuOpen, setNoteOpen, disableNote, noteButtonClick, }: Props<T>) => import("react/jsx-runtime").JSX.Element;
|
21
22
|
export default ControlBar;
|
@@ -11,7 +11,7 @@ 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
|
-
const ControlBar = ({ player, isPaused, setIsPaused, duration, notes, chapters, seekStep = 5, id, handleSaveNoteAction, handleControlDisplayTimer, setIsQualityMenuOpen, setIsSubtitleMenuOpen, setNoteOpen, disableNote, }) => {
|
14
|
+
const ControlBar = ({ player, isPaused, setIsPaused, duration, notes, chapters, seekStep = 5, id, handleSaveNoteAction, handleControlDisplayTimer, setIsQualityMenuOpen, setIsSubtitleMenuOpen, setNoteOpen, disableNote, noteButtonClick, }) => {
|
15
15
|
const { setPlayer, setDuration } = useSoftBuildersVideoPlayerContext();
|
16
16
|
const [width, setWidth] = useState(0);
|
17
17
|
const [isSeeking, setIsSeeking] = useState(true);
|
@@ -66,7 +66,9 @@ const ControlBar = ({ player, isPaused, setIsPaused, duration, notes, chapters,
|
|
66
66
|
: { 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) => {
|
67
67
|
setVolumeToggler(!volumeSliderToggler);
|
68
68
|
setIsQualityMenuOpen && setIsQualityMenuOpen(isOpen);
|
69
|
-
} }), disableNote && (_jsx(CreateNoteMenu, { handleSaveNoteAction: handleSaveNoteAction, width: width, setNoteOpen: setNoteOpen
|
69
|
+
} }), disableNote && (_jsx(CreateNoteMenu, { handleSaveNoteAction: handleSaveNoteAction, width: width, setNoteOpen: setNoteOpen, noteButtonClick: () => {
|
70
|
+
noteButtonClick(Number((player === null || player === void 0 ? void 0 : player.currentTime()) || 0));
|
71
|
+
} })), _jsx(SubtitleMenu, { width: width, onClick: (e, isOpen) => {
|
70
72
|
setVolumeToggler(!volumeSliderToggler);
|
71
73
|
setIsSubtitleMenuOpen && setIsSubtitleMenuOpen(isOpen);
|
72
74
|
} }), _jsx("button", { onClick: (e) => {
|
@@ -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,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ControlBar/index.tsx"],"names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MAAM,CAAE,cAAc,EAAE,CAAC;oBAC3B,CAAC;yBAAM,CAAC;wBACN,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,iBAAiB,EAAE,CAAC;oBAC9B,CAAC;gBACH,CAAC,YAED,KAAC,cAAc,IAAC,SAAS,EAAC,eAAe,GAAG,GACrC,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
@@ -38,6 +38,7 @@ type Props<T> = {
|
|
38
38
|
setIsSubtitleMenuOpen?: (val: boolean) => void;
|
39
39
|
disableNote?: boolean;
|
40
40
|
setNoteOpen?: (val: boolean) => void;
|
41
|
+
noteButtonClick?: (e: any) => void;
|
41
42
|
};
|
42
43
|
|
43
44
|
const ControlBar = <T,>({
|
@@ -55,6 +56,7 @@ const ControlBar = <T,>({
|
|
55
56
|
setIsSubtitleMenuOpen,
|
56
57
|
setNoteOpen,
|
57
58
|
disableNote,
|
59
|
+
noteButtonClick,
|
58
60
|
}: Props<T>) => {
|
59
61
|
const { setPlayer, setDuration } = useSoftBuildersVideoPlayerContext();
|
60
62
|
const [width, setWidth] = useState<number>(0);
|
@@ -186,6 +188,9 @@ const ControlBar = <T,>({
|
|
186
188
|
handleSaveNoteAction={handleSaveNoteAction}
|
187
189
|
width={width}
|
188
190
|
setNoteOpen={setNoteOpen}
|
191
|
+
noteButtonClick={() => {
|
192
|
+
noteButtonClick(Number(player?.currentTime() || 0));
|
193
|
+
}}
|
189
194
|
/>
|
190
195
|
)}
|
191
196
|
|
@@ -2,6 +2,7 @@ type Props<T> = {
|
|
2
2
|
handleSaveNoteAction?: (time: number, note: string) => Promise<T>;
|
3
3
|
width: number;
|
4
4
|
setNoteOpen?: (val: boolean) => void;
|
5
|
+
noteButtonClick?: (e: any) => void;
|
5
6
|
};
|
6
|
-
declare const CreateNoteMenu: <T>({ handleSaveNoteAction, width, setNoteOpen, }: Props<T>) => import("react/jsx-runtime").JSX.Element;
|
7
|
+
declare const CreateNoteMenu: <T>({ handleSaveNoteAction, width, setNoteOpen, noteButtonClick, }: Props<T>) => import("react/jsx-runtime").JSX.Element;
|
7
8
|
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, }) => {
|
6
|
+
const CreateNoteMenu = ({ handleSaveNoteAction, width, setNoteOpen, noteButtonClick, }) => {
|
7
7
|
const { player } = useSoftBuildersVideoPlayerContext();
|
8
8
|
const [note, setNote] = useState("");
|
9
9
|
const handleSaveNote = () => {
|
@@ -17,7 +17,7 @@ const CreateNoteMenu = ({ handleSaveNoteAction, width, setNoteOpen, }) => {
|
|
17
17
|
window.alert("Video Player, there is no implementation for the handleSaveNoteAction function");
|
18
18
|
}
|
19
19
|
};
|
20
|
-
return (_jsx(MenuButton, { 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, { 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,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GAAG,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE,EAAE,EACtE,aAAa,EAAE,KAAC,cAAc,IAAC,SAAS,EAAC,eAAe,GAAG,EAC3D,WAAW,EACT,cACE,SAAS,EAAE,kDACT,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,sBAC1C,EAAE,YAEF,eACE,SAAS,EAAC,gEAAgE,EAC1E,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,aAEnC,aAAI,SAAS,EAAC,SAAS,yBAAc,EAErC,cAAK,SAAS,EAAC,wDAAwD,GAAG,EAE1E,eAAK,SAAS,EAAC,qDAAqD,aAClE,gBACE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,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"}
|
@@ -7,11 +7,13 @@ type Props<T> = {
|
|
7
7
|
handleSaveNoteAction?: (time: number, note: string) => Promise<T>;
|
8
8
|
width: number;
|
9
9
|
setNoteOpen?: (val: boolean) => void;
|
10
|
+
noteButtonClick?: (e: any) => void;
|
10
11
|
};
|
11
12
|
const CreateNoteMenu = <T,>({
|
12
13
|
handleSaveNoteAction,
|
13
14
|
width,
|
14
15
|
setNoteOpen,
|
16
|
+
noteButtonClick,
|
15
17
|
}: Props<T>) => {
|
16
18
|
const { player } = useSoftBuildersVideoPlayerContext();
|
17
19
|
|
@@ -32,6 +34,8 @@ const CreateNoteMenu = <T,>({
|
|
32
34
|
|
33
35
|
return (
|
34
36
|
<MenuButton
|
37
|
+
disablePopUp={true}
|
38
|
+
noteButtonClick={noteButtonClick}
|
35
39
|
setNoteOpen={setNoteOpen}
|
36
40
|
classContainer={`${width < 400 ? "!sb-top-8 -sb-left-[9.75rem]" : ""}`}
|
37
41
|
buttonContent={<ClosedNoteIcon className="sb-w-3 sb-h-3" />}
|
@@ -6,6 +6,8 @@ type Props = {
|
|
6
6
|
classContainer?: string;
|
7
7
|
onClick?: (e: any, isOpen: boolean) => void;
|
8
8
|
setNoteOpen?: (val: boolean) => void;
|
9
|
+
noteButtonClick?: (e: any) => void;
|
10
|
+
disablePopUp?: boolean;
|
9
11
|
};
|
10
|
-
declare const MenuButton: ({ buttonContent, menuContent, close, classContainer, onClick, setNoteOpen, }: Props) => import("react/jsx-runtime").JSX.Element;
|
12
|
+
declare const MenuButton: ({ buttonContent, menuContent, close, classContainer, onClick, setNoteOpen, noteButtonClick, disablePopUp, }: Props) => import("react/jsx-runtime").JSX.Element;
|
11
13
|
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, }) => {
|
3
|
+
const MenuButton = ({ buttonContent, menuContent, close, classContainer, onClick, setNoteOpen, noteButtonClick, disablePopUp = false, }) => {
|
4
4
|
const [isOpen, setIsOpen] = useState(false);
|
5
5
|
const buttonRef = useRef(null);
|
6
6
|
const menuRef = useRef(null);
|
@@ -29,8 +29,11 @@ const MenuButton = ({ buttonContent, menuContent, close, classContainer, onClick
|
|
29
29
|
}, [isOpen]);
|
30
30
|
return (_jsxs("div", { className: "sb-relative sb-flex sb-items-end", children: [_jsx("button", { ref: buttonRef, onClick: (e) => {
|
31
31
|
e.stopPropagation();
|
32
|
-
|
33
|
-
|
32
|
+
if (!disablePopUp) {
|
33
|
+
toggleMenu();
|
34
|
+
onClick && onClick(e, !isOpen);
|
35
|
+
}
|
36
|
+
noteButtonClick && noteButtonClick(e);
|
34
37
|
}, "aria-haspopup": "true", "aria-expanded": isOpen, "aria-label": "Open menu", children: buttonContent }), isOpen && (_jsx("div", { ref: menuRef, role: "menu", "aria-orientation": "vertical", "aria-labelledby": "Open menu", className: `sb-absolute sb-shadow-lg sb-right-0 sb-bottom-10 ${classContainer}`, children: menuContent }))] }));
|
35
38
|
};
|
36
39
|
export default MenuButton;
|
@@ -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;
|
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,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACzD,MAAM,OAAO,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAEpD,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CA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BACjC,CAAC;oBAED,eAAe,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;gBACxC,CAAC,mBACa,MAAM,mBACL,MAAM,gBACV,WAAW,YAErB,aAAa,GACP,EAER,MAAM,IAAI,CACT,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"}
|
@@ -8,6 +8,8 @@ type Props = {
|
|
8
8
|
classContainer?: string;
|
9
9
|
onClick?: (e: any, isOpen: boolean) => void;
|
10
10
|
setNoteOpen?: (val: boolean) => void;
|
11
|
+
noteButtonClick?: (e: any) => void;
|
12
|
+
disablePopUp?: boolean;
|
11
13
|
};
|
12
14
|
|
13
15
|
const MenuButton = ({
|
@@ -17,6 +19,8 @@ const MenuButton = ({
|
|
17
19
|
classContainer,
|
18
20
|
onClick,
|
19
21
|
setNoteOpen,
|
22
|
+
noteButtonClick,
|
23
|
+
disablePopUp = false,
|
20
24
|
}: Props) => {
|
21
25
|
const [isOpen, setIsOpen] = useState(false);
|
22
26
|
const buttonRef = useRef<HTMLButtonElement | null>(null);
|
@@ -56,8 +60,12 @@ const MenuButton = ({
|
|
56
60
|
ref={buttonRef}
|
57
61
|
onClick={(e: any) => {
|
58
62
|
e.stopPropagation();
|
59
|
-
|
60
|
-
|
63
|
+
if (!disablePopUp) {
|
64
|
+
toggleMenu();
|
65
|
+
onClick && onClick(e, !isOpen);
|
66
|
+
}
|
67
|
+
|
68
|
+
noteButtonClick && noteButtonClick(e);
|
61
69
|
}}
|
62
70
|
aria-haspopup="true"
|
63
71
|
aria-expanded={isOpen}
|
@@ -12,6 +12,7 @@ export type Props<T = any> = {
|
|
12
12
|
disableNote?: boolean;
|
13
13
|
bottomRedBar?: boolean;
|
14
14
|
childRef?: React.Ref<HTMLDivElement>;
|
15
|
+
noteButtonClick?: (e: any) => void;
|
15
16
|
};
|
16
17
|
declare const SoftBuildersVideoPlayer: React.MemoExoticComponent<React.ForwardRefExoticComponent<Props<any> & React.RefAttributes<HTMLDivElement>>>;
|
17
18
|
export default SoftBuildersVideoPlayer;
|
@@ -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, }) => {
|
15
|
+
const Component = forwardRef(({ options, notes, chapters, startTime = 0, handleSaveNoteAction, onPlay, onPause, isFocused = true, disableNote, childRef, bottomRedBar, noteButtonClick, }) => {
|
16
16
|
options = Object.assign(Object.assign({}, options), { responsive: true, inactivityTimeout: 0, fullscreen: {
|
17
17
|
navigationUI: "hide",
|
18
18
|
} });
|
@@ -46,7 +46,7 @@ const Component = forwardRef(({ options, notes, chapters, startTime = 0, handleS
|
|
46
46
|
getTracks();
|
47
47
|
}, [options === null || options === void 0 ? void 0 : options.tracks]);
|
48
48
|
const id = (Date.now() + Math.random() * 100).toString();
|
49
|
-
return (_jsx(VideoPlayerComponent, { id: id, chapters: chapters, options: Object.assign(Object.assign({}, options), { tracks }), notes: notes, poster: "", startTime: startTime, handleSaveNoteAction: handleSaveNoteAction, disableNote: disableNote, onPause: onPause, onPlay: onPlay, childRef: childRef, bottomRedBar: bottomRedBar }));
|
49
|
+
return (_jsx(VideoPlayerComponent, { id: id, chapters: chapters, options: Object.assign(Object.assign({}, options), { tracks }), notes: notes, poster: "", startTime: startTime, handleSaveNoteAction: handleSaveNoteAction, disableNote: disableNote, onPause: onPause, onPlay: onPlay, childRef: childRef, bottomRedBar: bottomRedBar, noteButtonClick: noteButtonClick }));
|
50
50
|
});
|
51
51
|
const SoftBuildersVideoPlayer = memo(Component, (prevProps, nextProps) => {
|
52
52
|
return (prevProps.options === nextProps.options &&
|
@@ -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;
|
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,GAAG,CAAC,EACb,oBAAoB,EACpB,MAAM,EACN,OAAO,EACP,SAAS,GAAG,IAAI,EAChB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,eAAe,GACJ,EAAE,EAAE;IACf,OAA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,SAAS,CAAC,SAAS,KAAK,SAAS,CAAC,SAAS,CAC5C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC"}
|
@@ -31,6 +31,7 @@ export type Props<T = any> = {
|
|
31
31
|
disableNote?: boolean;
|
32
32
|
bottomRedBar?: boolean;
|
33
33
|
childRef?: React.Ref<HTMLDivElement>;
|
34
|
+
noteButtonClick?: (e: any) => void;
|
34
35
|
};
|
35
36
|
|
36
37
|
const Component = forwardRef<HTMLDivElement, Props<any>>(
|
@@ -46,6 +47,7 @@ const Component = forwardRef<HTMLDivElement, Props<any>>(
|
|
46
47
|
disableNote,
|
47
48
|
childRef,
|
48
49
|
bottomRedBar,
|
50
|
+
noteButtonClick,
|
49
51
|
}: Props<any>) => {
|
50
52
|
options = {
|
51
53
|
...options,
|
@@ -106,6 +108,7 @@ const Component = forwardRef<HTMLDivElement, Props<any>>(
|
|
106
108
|
onPlay={onPlay}
|
107
109
|
childRef={childRef}
|
108
110
|
bottomRedBar={bottomRedBar}
|
111
|
+
noteButtonClick={noteButtonClick}
|
109
112
|
/>
|
110
113
|
);
|
111
114
|
}
|
@@ -16,6 +16,7 @@ export type Props<T = any> = {
|
|
16
16
|
disableNote?: boolean;
|
17
17
|
bottomRedBar?: boolean;
|
18
18
|
childRef?: React.Ref<HTMLDivElement>;
|
19
|
+
noteButtonClick?: (e: any) => void;
|
19
20
|
};
|
20
21
|
declare const VideoPlayerComponent: React.ForwardRefExoticComponent<Props<any> & React.RefAttributes<HTMLDivElement>>;
|
21
22
|
export default VideoPlayerComponent;
|
@@ -24,7 +24,7 @@ const renderBigPlayButton = (id, player, isPaused, setIsPaused, opacity = "100")
|
|
24
24
|
}
|
25
25
|
};
|
26
26
|
let controlBarRoot = {};
|
27
|
-
const renderControlBar = (id, player, isPaused, setIsPaused, duration, notes, chapters, seekStep = 5, handleSaveNoteAction, opacity = "0", handleControlDisplayTimer = () => { }, bgColor = "transparent", setIsQualityMenuOpen, setIsSubtitleMenuOpen, disableNote, setNoteOpen) => {
|
27
|
+
const renderControlBar = (id, player, isPaused, setIsPaused, duration, notes, chapters, seekStep = 5, handleSaveNoteAction, opacity = "0", handleControlDisplayTimer = () => { }, bgColor = "transparent", setIsQualityMenuOpen, setIsSubtitleMenuOpen, disableNote, setNoteOpen, noteButtonClick) => {
|
28
28
|
const container = document.getElementById(`video-container-${id}`);
|
29
29
|
if (container) {
|
30
30
|
container.style.height = "100%";
|
@@ -39,11 +39,11 @@ const renderControlBar = (id, player, isPaused, setIsPaused, duration, notes, ch
|
|
39
39
|
element.style.backgroundColor = `${bgColor} !important`;
|
40
40
|
element.style.height = "100%";
|
41
41
|
element.style.alignItems = "flex-end";
|
42
|
-
controlBarRoot[id].render(_jsx(SoftBuildersVideoPlayerProvider, { children: _jsx(ControlBar, { id: id, player: player, isPaused: isPaused, setIsPaused: setIsPaused, duration: duration, notes: notes, chapters: chapters, seekStep: seekStep, handleSaveNoteAction: handleSaveNoteAction, handleControlDisplayTimer: handleControlDisplayTimer, setIsSubtitleMenuOpen: setIsSubtitleMenuOpen, setIsQualityMenuOpen: setIsQualityMenuOpen, disableNote: disableNote, setNoteOpen: setNoteOpen }) }));
|
42
|
+
controlBarRoot[id].render(_jsx(SoftBuildersVideoPlayerProvider, { children: _jsx(ControlBar, { id: id, player: player, isPaused: isPaused, setIsPaused: setIsPaused, duration: duration, notes: notes, chapters: chapters, seekStep: seekStep, handleSaveNoteAction: handleSaveNoteAction, handleControlDisplayTimer: handleControlDisplayTimer, setIsSubtitleMenuOpen: setIsSubtitleMenuOpen, setIsQualityMenuOpen: setIsQualityMenuOpen, disableNote: disableNote, setNoteOpen: setNoteOpen, noteButtonClick: noteButtonClick }) }));
|
43
43
|
}
|
44
44
|
}
|
45
45
|
};
|
46
|
-
const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTime = 0, handleSaveNoteAction, poster, onPlay, onPause, disableNote, childRef, bottomRedBar = true, }) => {
|
46
|
+
const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTime = 0, handleSaveNoteAction, poster, onPlay, onPause, disableNote, childRef, bottomRedBar = true, noteButtonClick, }) => {
|
47
47
|
var _a;
|
48
48
|
const videoRef = useRef(undefined);
|
49
49
|
const playerRef = useRef(undefined);
|
@@ -125,7 +125,7 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
|
|
125
125
|
const controlBarTimeout = setTimeout(() => {
|
126
126
|
renderControlBar(id, playerRef.current, isPaused, setIsPaused, duration, notes, chapters, 5, handleSaveNoteAction, opacity, (e) => {
|
127
127
|
handlePlayerClick(e, true);
|
128
|
-
}, bgColor, setIsQualityMenuOpen, setIsSubtitleMenuOpen, disableNote, setNoteOpen);
|
128
|
+
}, bgColor, setIsQualityMenuOpen, setIsSubtitleMenuOpen, disableNote, setNoteOpen, noteButtonClick);
|
129
129
|
}, 500);
|
130
130
|
return () => clearTimeout(controlBarTimeout);
|
131
131
|
}
|
@@ -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,+BAA+B,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,IAAI,iBAAiB,GAEjB,EAAE,CAAC;AACP,MAAM,mBAAmB,GAAG,CAC1B,EAAU,EACV,MAA0B,EAC1B,QAAiB,EACjB,WAA0D,EAC1D,UAAkB,KAAK,EACvB,EAAE;IACF,MAAM,SAA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;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,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,+BAA+B,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,aAAa,M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C,CAAC;gBACvB,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"}
|
@@ -63,7 +63,8 @@ const renderControlBar = <T,>(
|
|
63
63
|
setIsQualityMenuOpen?: (val: boolean) => void,
|
64
64
|
setIsSubtitleMenuOpen?: (val: boolean) => void,
|
65
65
|
disableNote?: boolean,
|
66
|
-
setNoteOpen?: (val: boolean) => void
|
66
|
+
setNoteOpen?: (val: boolean) => void,
|
67
|
+
noteButtonClick?: (e: any) => void
|
67
68
|
) => {
|
68
69
|
const container = document.getElementById(`video-container-${id}`);
|
69
70
|
if (container) {
|
@@ -96,6 +97,7 @@ const renderControlBar = <T,>(
|
|
96
97
|
setIsQualityMenuOpen={setIsQualityMenuOpen}
|
97
98
|
disableNote={disableNote}
|
98
99
|
setNoteOpen={setNoteOpen}
|
100
|
+
noteButtonClick={noteButtonClick}
|
99
101
|
/>
|
100
102
|
</SoftBuildersVideoPlayerProvider>
|
101
103
|
);
|
@@ -115,6 +117,7 @@ export type Props<T = any> = {
|
|
115
117
|
disableNote?: boolean;
|
116
118
|
bottomRedBar?: boolean;
|
117
119
|
childRef?: React.Ref<HTMLDivElement>;
|
120
|
+
noteButtonClick?: (e: any) => void;
|
118
121
|
};
|
119
122
|
const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
120
123
|
({
|
@@ -130,6 +133,7 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
|
130
133
|
disableNote,
|
131
134
|
childRef,
|
132
135
|
bottomRedBar = true,
|
136
|
+
noteButtonClick,
|
133
137
|
}: Props) => {
|
134
138
|
const videoRef = useRef<any>(undefined);
|
135
139
|
const playerRef = useRef<Player | undefined>(undefined);
|
@@ -227,7 +231,8 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
|
227
231
|
setIsQualityMenuOpen,
|
228
232
|
setIsSubtitleMenuOpen,
|
229
233
|
disableNote,
|
230
|
-
setNoteOpen
|
234
|
+
setNoteOpen,
|
235
|
+
noteButtonClick
|
231
236
|
);
|
232
237
|
}, 500);
|
233
238
|
return () => clearTimeout(controlBarTimeout);
|
package/dist/index.d.mts
CHANGED
@@ -27,6 +27,7 @@ type SoftBuildersVideoPlayerOptions = {
|
|
27
27
|
childRef?: React.Ref<HTMLDivElement>;
|
28
28
|
disableNote?: boolean;
|
29
29
|
bottomRedBar?: boolean;
|
30
|
+
noteButtonClick?: (e: any) => void;
|
30
31
|
};
|
31
32
|
interface SoftBuildersVideoPlayerNote {
|
32
33
|
time: number;
|
@@ -50,6 +51,7 @@ type Props<T = any> = {
|
|
50
51
|
disableNote?: boolean;
|
51
52
|
bottomRedBar?: boolean;
|
52
53
|
childRef?: React$1.Ref<HTMLDivElement>;
|
54
|
+
noteButtonClick?: (e: any) => void;
|
53
55
|
};
|
54
56
|
declare const SoftBuildersVideoPlayer: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<Props<any> & React$1.RefAttributes<HTMLDivElement>>>;
|
55
57
|
|
package/dist/index.mjs
CHANGED
@@ -608,7 +608,9 @@ var MenuButton = ({
|
|
608
608
|
close,
|
609
609
|
classContainer,
|
610
610
|
onClick,
|
611
|
-
setNoteOpen
|
611
|
+
setNoteOpen,
|
612
|
+
noteButtonClick,
|
613
|
+
disablePopUp = false
|
612
614
|
}) => {
|
613
615
|
const [isOpen, setIsOpen] = useState3(false);
|
614
616
|
const buttonRef = useRef(null);
|
@@ -639,8 +641,11 @@ var MenuButton = ({
|
|
639
641
|
ref: buttonRef,
|
640
642
|
onClick: (e) => {
|
641
643
|
e.stopPropagation();
|
642
|
-
|
643
|
-
|
644
|
+
if (!disablePopUp) {
|
645
|
+
toggleMenu();
|
646
|
+
onClick && onClick(e, !isOpen);
|
647
|
+
}
|
648
|
+
noteButtonClick && noteButtonClick(e);
|
644
649
|
},
|
645
650
|
"aria-haspopup": "true",
|
646
651
|
"aria-expanded": isOpen,
|
@@ -787,7 +792,8 @@ import { jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
787
792
|
var CreateNoteMenu = ({
|
788
793
|
handleSaveNoteAction,
|
789
794
|
width,
|
790
|
-
setNoteOpen
|
795
|
+
setNoteOpen,
|
796
|
+
noteButtonClick
|
791
797
|
}) => {
|
792
798
|
const { player } = useSoftBuildersVideoPlayerContext();
|
793
799
|
const [note, setNote] = useState5("");
|
@@ -806,6 +812,8 @@ var CreateNoteMenu = ({
|
|
806
812
|
return /* @__PURE__ */ jsx22(
|
807
813
|
MenuButton_default,
|
808
814
|
{
|
815
|
+
disablePopUp: true,
|
816
|
+
noteButtonClick,
|
809
817
|
setNoteOpen,
|
810
818
|
classContainer: `${width < 400 ? "!sb-top-8 -sb-left-[9.75rem]" : ""}`,
|
811
819
|
buttonContent: /* @__PURE__ */ jsx22(ClosedNoteIcon_default, { className: "sb-w-3 sb-h-3" }),
|
@@ -1235,7 +1243,8 @@ var ControlBar = ({
|
|
1235
1243
|
setIsQualityMenuOpen,
|
1236
1244
|
setIsSubtitleMenuOpen,
|
1237
1245
|
setNoteOpen,
|
1238
|
-
disableNote
|
1246
|
+
disableNote,
|
1247
|
+
noteButtonClick
|
1239
1248
|
}) => {
|
1240
1249
|
const { setPlayer, setDuration } = useSoftBuildersVideoPlayerContext();
|
1241
1250
|
const [width, setWidth] = useState12(0);
|
@@ -1344,7 +1353,10 @@ var ControlBar = ({
|
|
1344
1353
|
{
|
1345
1354
|
handleSaveNoteAction,
|
1346
1355
|
width,
|
1347
|
-
setNoteOpen
|
1356
|
+
setNoteOpen,
|
1357
|
+
noteButtonClick: () => {
|
1358
|
+
noteButtonClick(Number((player == null ? void 0 : player.currentTime()) || 0));
|
1359
|
+
}
|
1348
1360
|
}
|
1349
1361
|
),
|
1350
1362
|
/* @__PURE__ */ jsx33(
|
@@ -1425,7 +1437,7 @@ var renderBigPlayButton = (id, player, isPaused, setIsPaused, opacity = "100") =
|
|
1425
1437
|
};
|
1426
1438
|
var controlBarRoot = {};
|
1427
1439
|
var renderControlBar = (id, player, isPaused, setIsPaused, duration, notes, chapters, seekStep = 5, handleSaveNoteAction, opacity = "0", handleControlDisplayTimer = () => {
|
1428
|
-
}, bgColor = "transparent", setIsQualityMenuOpen, setIsSubtitleMenuOpen, disableNote, setNoteOpen) => {
|
1440
|
+
}, bgColor = "transparent", setIsQualityMenuOpen, setIsSubtitleMenuOpen, disableNote, setNoteOpen, noteButtonClick) => {
|
1429
1441
|
const container = document.getElementById(`video-container-${id}`);
|
1430
1442
|
if (container) {
|
1431
1443
|
container.style.height = "100%";
|
@@ -1457,7 +1469,8 @@ var renderControlBar = (id, player, isPaused, setIsPaused, duration, notes, chap
|
|
1457
1469
|
setIsSubtitleMenuOpen,
|
1458
1470
|
setIsQualityMenuOpen,
|
1459
1471
|
disableNote,
|
1460
|
-
setNoteOpen
|
1472
|
+
setNoteOpen,
|
1473
|
+
noteButtonClick
|
1461
1474
|
}
|
1462
1475
|
) })
|
1463
1476
|
);
|
@@ -1477,7 +1490,8 @@ var VideoPlayerComponent = forwardRef(
|
|
1477
1490
|
onPause,
|
1478
1491
|
disableNote,
|
1479
1492
|
childRef,
|
1480
|
-
bottomRedBar = true
|
1493
|
+
bottomRedBar = true,
|
1494
|
+
noteButtonClick
|
1481
1495
|
}) => {
|
1482
1496
|
var _a;
|
1483
1497
|
const videoRef = useRef2(void 0);
|
@@ -1573,7 +1587,8 @@ var VideoPlayerComponent = forwardRef(
|
|
1573
1587
|
setIsQualityMenuOpen,
|
1574
1588
|
setIsSubtitleMenuOpen,
|
1575
1589
|
disableNote,
|
1576
|
-
setNoteOpen
|
1590
|
+
setNoteOpen,
|
1591
|
+
noteButtonClick
|
1577
1592
|
);
|
1578
1593
|
}, 500);
|
1579
1594
|
return () => clearTimeout(controlBarTimeout);
|
@@ -1811,7 +1826,8 @@ var Component = forwardRef2(
|
|
1811
1826
|
isFocused = true,
|
1812
1827
|
disableNote,
|
1813
1828
|
childRef,
|
1814
|
-
bottomRedBar
|
1829
|
+
bottomRedBar,
|
1830
|
+
noteButtonClick
|
1815
1831
|
}) => {
|
1816
1832
|
options = __spreadProps(__spreadValues({}, options), {
|
1817
1833
|
responsive: true,
|
@@ -1863,7 +1879,8 @@ var Component = forwardRef2(
|
|
1863
1879
|
onPause,
|
1864
1880
|
onPlay,
|
1865
1881
|
childRef,
|
1866
|
-
bottomRedBar
|
1882
|
+
bottomRedBar,
|
1883
|
+
noteButtonClick
|
1867
1884
|
}
|
1868
1885
|
);
|
1869
1886
|
}
|
package/dist/types.d.ts
CHANGED