softbuilders-react-video-player 1.2.0 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/ChapterTooltip/index.js.map +1 -1
- package/dist/components/ChapterTooltip/index.tsx +1 -1
- package/dist/components/ControlBar/index.js +1 -1
- package/dist/components/ControlBar/index.js.map +1 -1
- package/dist/components/ControlBar/index.tsx +1 -1
- package/dist/components/Slider/index.d.ts +2 -1
- package/dist/components/Slider/index.js +3 -2
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Slider/index.tsx +36 -33
- package/dist/components/SoftBuildersVideoPlayer/index.js +5 -2
- package/dist/components/SoftBuildersVideoPlayer/index.js.map +1 -1
- package/dist/components/SoftBuildersVideoPlayer/index.tsx +6 -3
- package/dist/components/TimeSlider/index.js +12 -2
- package/dist/components/TimeSlider/index.js.map +1 -1
- package/dist/components/TimeSlider/index.tsx +92 -80
- package/dist/components/VideoPlayerComponent/index.js +47 -27
- package/dist/components/VideoPlayerComponent/index.js.map +1 -1
- package/dist/components/VideoPlayerComponent/index.tsx +51 -26
- package/dist/index.mjs +68 -30
- package/package.json +2 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ChapterTooltip/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAQrF,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAS,EAAE,EAAE;IAC5C,MAAM,EAAE,MAAM,EAAE,GAAG,iCAAiC,EAAE,CAAC;IAEvD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,EAAE,WAAW,EAAE,GAAG,iCAAiC,EAAE,CAA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,uDAAuD,aACjE,gBAAgB,CAAC,OAAO,CAAC,SAAS,CAAC,QAAI,GAAG,EAC1C,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,IAChC,IACA,GACE,GACN,GACC,GACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
@@ -73,7 +73,7 @@ const ControlBar = ({ player, isPaused, setIsPaused, duration, notes, chapters,
|
|
73
73
|
time: Number((player === null || player === void 0 ? void 0 : player.currentTime()) || 0),
|
74
74
|
isOpen: e,
|
75
75
|
});
|
76
|
-
player.pause();
|
76
|
+
player === null || player === void 0 ? void 0 : player.pause();
|
77
77
|
} }) })), _jsx(TooltipModal, { width: width, content: _jsx("p", { children: "Subtitle" }), children: _jsx(SubtitleMenu, { width: width, onClick: (e, isOpen) => {
|
78
78
|
setVolumeToggler(!volumeSliderToggler);
|
79
79
|
setIsSubtitleMenuOpen && setIsSubtitleMenuOpen(isOpen);
|
@@ -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,S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AAK,EAAE,KAAK,EACZ,OAAO,EAAE,CAAC,CAAM,EAAE,MAAe,EAAE,EAAE;wBACnC,gBAAgB,CAAC,CAAC,mBAAmB,CAAC,CAAC;wBACvC,qBAAqB,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;oBACzD,CAAC,GACD,GACW,EACf,KAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,sCAAkB,YACrD,iBACE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;wBACb,CAAC,CAAC,cAAc,EAAE,CAAC;wBACnB,CAAC,CAAC,eAAe,EAAE,CAAC;wBAEpB,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,YAAY,EAAE,EAAE,CAAC;4BAC3B,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,cAAc,EAAE,CAAC;wBAC3B,CAAC;6BAAM,CAAC;4BACN,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,iBAAiB,EAAE,CAAC;wBAC9B,CAAC;oBACH,CAAC,YAED,KAAC,cAAc,IAAC,SAAS,EAAC,eAAe,GAAG,GACrC,GACI,IACX,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
@@ -3,8 +3,9 @@ import "./style.css";
|
|
3
3
|
type Props = {
|
4
4
|
value: number;
|
5
5
|
handleValueChange: React.ChangeEventHandler<HTMLInputElement>;
|
6
|
+
handleSliderClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
6
7
|
min?: number;
|
7
8
|
max?: number;
|
8
9
|
} & InputHTMLAttributes<HTMLInputElement>;
|
9
|
-
declare const Slider: ({ value, handleValueChange, min, max, className, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
10
|
+
declare const Slider: ({ value, handleValueChange, min, max, className, handleSliderClick, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
10
11
|
export default Slider;
|
@@ -12,9 +12,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
13
13
|
import "./style.css";
|
14
14
|
const Slider = (_a) => {
|
15
|
-
var { value, handleValueChange, min = 0, max = 100, className } = _a, rest = __rest(_a, ["value", "handleValueChange", "min", "max", "className"]);
|
16
|
-
return (_jsx("input", Object.assign({ type:
|
15
|
+
var { value, handleValueChange, min = 0, max = 100, className, handleSliderClick = () => { } } = _a, rest = __rest(_a, ["value", "handleValueChange", "min", "max", "className", "handleSliderClick"]);
|
16
|
+
return (_jsx("input", Object.assign({ type: 'range', min: min, onMouseDown: (e) => e.stopPropagation(), onClick: (e) => {
|
17
17
|
e.stopPropagation();
|
18
|
+
handleSliderClick(e);
|
18
19
|
}, onMouseUp: (e) => e.stopPropagation(), max: max, value: value, onChange: (e) => {
|
19
20
|
e.preventDefault();
|
20
21
|
e.stopPropagation();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Slider/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,aAAa,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Slider/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,aAAa,CAAC;AAUrB,MAAM,MAAM,GAAG,CAAC,EAQR,EAAE,EAAE;QARI,EACf,KAAK,EACL,iBAAiB,EACjB,GAAG,GAAG,CAAC,EACP,GAAG,GAAG,GAAG,EACT,SAAS,EACT,iBAAiB,GAAG,GAAG,EAAE,GAAE,CAAC,OAErB,EADJ,IAAI,cAPQ,8EAQf,CADO;IAEP,OAAO,CACN,8BACC,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EACvC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACd,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,iBAAiB,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EACrC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;YACf,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,iBAAiB,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC,EACD,SAAS,EAAE;UACJ,SAAS,EAAE,EAClB,KAAK,EAAE;YACN,UAAU,EAAE,qCAAqC,KAAK,gBAAgB,KAAK,IAAI;SAC/E,IACG,IAAI,EACP,CACF,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
@@ -2,44 +2,47 @@ import React, { InputHTMLAttributes, SetStateAction, useState } from "react";
|
|
2
2
|
import "./style.css";
|
3
3
|
|
4
4
|
type Props = {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
value: number;
|
6
|
+
handleValueChange: React.ChangeEventHandler<HTMLInputElement>;
|
7
|
+
handleSliderClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
8
|
+
min?: number;
|
9
|
+
max?: number;
|
9
10
|
} & InputHTMLAttributes<HTMLInputElement>;
|
10
11
|
|
11
12
|
const Slider = ({
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
value,
|
14
|
+
handleValueChange,
|
15
|
+
min = 0,
|
16
|
+
max = 100,
|
17
|
+
className,
|
18
|
+
handleSliderClick = () => {},
|
19
|
+
...rest
|
18
20
|
}: Props) => {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
21
|
+
return (
|
22
|
+
<input
|
23
|
+
type='range'
|
24
|
+
min={min}
|
25
|
+
onMouseDown={(e) => e.stopPropagation()}
|
26
|
+
onClick={(e) => {
|
27
|
+
e.stopPropagation();
|
28
|
+
handleSliderClick(e);
|
29
|
+
}}
|
30
|
+
onMouseUp={(e) => e.stopPropagation()}
|
31
|
+
max={max}
|
32
|
+
value={value}
|
33
|
+
onChange={(e) => {
|
34
|
+
e.preventDefault();
|
35
|
+
e.stopPropagation();
|
36
|
+
handleValueChange(e);
|
37
|
+
}}
|
38
|
+
className={`sb-w-full sb-h-2 sb-bg-transparent sb-bg-opacity-50 sb-rounded-lg sb-appearance-none sb-cursor-pointer sb-range-slider sb-slider-thumb
|
36
39
|
${className}`}
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
style={{
|
41
|
+
background: `linear-gradient(to right, #f97316 ${value}%, #30303070 ${value}%)`,
|
42
|
+
}}
|
43
|
+
{...rest}
|
44
|
+
/>
|
45
|
+
);
|
43
46
|
};
|
44
47
|
|
45
48
|
export default Slider;
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, memo, useCallback, useEffect, useMemo, useState, } from "react";
|
3
3
|
import VideoPlayerComponent from "../VideoPlayerComponent";
|
4
4
|
import { convertSRTtoVTT } from "../../utils";
|
5
|
+
import { isEqual } from "lodash";
|
5
6
|
const DEFAULT_OPTIONS = {
|
6
7
|
autoplay: false,
|
7
8
|
controls: true,
|
@@ -72,8 +73,10 @@ const Component = forwardRef(({ options, notes, chapters, startTime = 0, handleS
|
|
72
73
|
return (_jsx(VideoPlayerComponent, { id: id, chapters: chapters, options: Object.assign(Object.assign({}, mergedOptions), { tracks }), notes: notes, poster: "", startTime: startTime, handleSaveNoteAction: handleSaveNoteAction, disableNote: disableNote, onPause: onPause, onPlay: onPlay, childRef: childRef, bottomRedBar: bottomRedBar, noteButtonClick: noteButtonClick }));
|
73
74
|
});
|
74
75
|
const SoftBuildersVideoPlayer = memo(Component, (prevProps, nextProps) => {
|
75
|
-
|
76
|
-
|
76
|
+
console.log(isEqual(prevProps.options, nextProps.options, "oooop"));
|
77
|
+
console.log(nextProps.notes, prevProps.notes, "oooop");
|
78
|
+
return (isEqual(prevProps.options, nextProps.options) &&
|
79
|
+
prevProps.notes === nextProps.notes &&
|
77
80
|
prevProps.chapters === nextProps.chapters &&
|
78
81
|
prevProps.startTime === nextProps.startTime);
|
79
82
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SoftBuildersVideoPlayer/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EACZ,UAAU,EACV,IAAI,EACJ,WAAW,EACX,SAAS,EACT,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAO3D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SoftBuildersVideoPlayer/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EACZ,UAAU,EACV,IAAI,EACJ,WAAW,EACX,SAAS,EACT,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAO3D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,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,CACE,EACE,OAAO,EACP,KAAK,EACL,QAAQ,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IACpE,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAEvD,OAAO,CACL,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC;QAC7C,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"}
|
@@ -14,7 +14,7 @@ import {
|
|
14
14
|
SoftBuildersVideoPlayerTrack,
|
15
15
|
} from "../../types";
|
16
16
|
import { convertSRTtoVTT } from "../../utils";
|
17
|
-
|
17
|
+
import { isEqual } from "lodash";
|
18
18
|
const DEFAULT_OPTIONS: SoftBuildersVideoPlayerOptions = {
|
19
19
|
autoplay: false,
|
20
20
|
controls: true,
|
@@ -158,9 +158,12 @@ const Component = forwardRef<HTMLDivElement, Props<any>>(
|
|
158
158
|
);
|
159
159
|
|
160
160
|
const SoftBuildersVideoPlayer = memo(Component, (prevProps, nextProps) => {
|
161
|
+
console.log(isEqual(prevProps.options, nextProps.options, "oooop"));
|
162
|
+
console.log(nextProps.notes, prevProps.notes, "oooop");
|
163
|
+
|
161
164
|
return (
|
162
|
-
prevProps.options
|
163
|
-
|
165
|
+
isEqual(prevProps.options, nextProps.options) &&
|
166
|
+
prevProps.notes === nextProps.notes &&
|
164
167
|
prevProps.chapters === nextProps.chapters &&
|
165
168
|
prevProps.startTime === nextProps.startTime
|
166
169
|
);
|
@@ -16,6 +16,16 @@ const TimeSlider = ({ chapters }) => {
|
|
16
16
|
console.log("time: ", time);
|
17
17
|
player === null || player === void 0 ? void 0 : player.currentTime(time);
|
18
18
|
};
|
19
|
+
const handleSliderClick = (e) => {
|
20
|
+
const slider = e.currentTarget; // Get the slider element
|
21
|
+
const rect = slider.getBoundingClientRect(); // Get the bounding rect of the slider
|
22
|
+
const offsetX = e.clientX - rect.left; // Get the click position relative to the slider
|
23
|
+
const newTimeSlider = (offsetX / rect.width) * DEFERENCE; // Calculate the new slider value
|
24
|
+
// Update the time using the same function
|
25
|
+
const time = (newTimeSlider * duration) / DEFERENCE;
|
26
|
+
player === null || player === void 0 ? void 0 : player.currentTime(time);
|
27
|
+
setTimeSlider(newTimeSlider); // Update the state to reflect the change
|
28
|
+
};
|
19
29
|
useEffect(() => {
|
20
30
|
const intervalId = setInterval(() => {
|
21
31
|
const currentTime = (player === null || player === void 0 ? void 0 : player.currentTime()) || 0;
|
@@ -43,9 +53,9 @@ const TimeSlider = ({ chapters }) => {
|
|
43
53
|
arr.push(`black 100%`);
|
44
54
|
setMaskCuttes(arr.toString());
|
45
55
|
}, [chapters, duration]);
|
46
|
-
return (_jsxs("div", { className:
|
56
|
+
return (_jsxs("div", { className: ' sb-w-full sb-h-2 sb-flex sb-items-center sb-justify-center', children: [_jsx("div", { className: 'sb-absolute sb-top-0 sb-left-0 sb-w-full sb-z-10', children: _jsx(Slider, { value: timeSlider, handleValueChange: handleValueChange, handleSliderClick: handleSliderClick, min: MIN, max: MAX, style: {
|
47
57
|
background: "transparent",
|
48
|
-
} }) }), _jsx("div", { className:
|
58
|
+
} }) }), _jsx("div", { className: 'sb-absolute sb-top-0 sb-left-0 sb-w-full sb-h-2 sb-bg-slate-400 sb-rounded-md', style: {
|
49
59
|
background: `
|
50
60
|
linear-gradient(to right,
|
51
61
|
#f97316 0%,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TimeSlider/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAIrF,MAAM,GA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A+E,EACzF,KAAK,EAAE;oBACN,UAAU,EAAE;;;sBAGK,UAAU;wBACR,UAAU;wBACV,0BAA0B;wBAC1B,UAAU;;;SAGzB;oBACJ,SAAS,EAAE;;cAEF,UAAU;;SAEf;oBACJ,QAAQ,EAAE,WAAW;oBACrB,UAAU,EAAE,WAAW;iBACvB,GAAQ,IACL,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
@@ -5,86 +5,99 @@ import { SoftBuildersVideoPlayerChapter } from "../../types";
|
|
5
5
|
import log from "video.js/dist/types/utils/log";
|
6
6
|
|
7
7
|
const MIN = 0,
|
8
|
-
|
8
|
+
MAX = 100;
|
9
9
|
const DEFERENCE = Math.abs(MAX - MIN);
|
10
10
|
const BAR_PERCENTAGE_WIDTH = 0.5;
|
11
11
|
|
12
12
|
type Props = {
|
13
|
-
|
13
|
+
chapters?: SoftBuildersVideoPlayerChapter[];
|
14
14
|
};
|
15
15
|
|
16
16
|
const TimeSlider = ({ chapters }: Props) => {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
17
|
+
const [timeSlider, setTimeSlider] = useState(0);
|
18
|
+
|
19
|
+
const { player, duration, downloadedBufferPercentage } =
|
20
|
+
useSoftBuildersVideoPlayerContext();
|
21
|
+
|
22
|
+
const handleValueChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
23
|
+
const newTimeSlider = Number(e.target.value);
|
24
|
+
setTimeSlider(newTimeSlider);
|
25
|
+
console.log("newTimeSlider: ", newTimeSlider);
|
26
|
+
|
27
|
+
const time = (newTimeSlider * duration) / DEFERENCE;
|
28
|
+
console.log("time: ", time);
|
29
|
+
|
30
|
+
player?.currentTime(time);
|
31
|
+
};
|
32
|
+
|
33
|
+
const handleSliderClick = (e: React.MouseEvent<HTMLDivElement>) => {
|
34
|
+
const slider = e.currentTarget; // Get the slider element
|
35
|
+
const rect = slider.getBoundingClientRect(); // Get the bounding rect of the slider
|
36
|
+
const offsetX = e.clientX - rect.left; // Get the click position relative to the slider
|
37
|
+
const newTimeSlider = (offsetX / rect.width) * DEFERENCE; // Calculate the new slider value
|
38
|
+
|
39
|
+
// Update the time using the same function
|
40
|
+
const time = (newTimeSlider * duration) / DEFERENCE;
|
41
|
+
player?.currentTime(time);
|
42
|
+
setTimeSlider(newTimeSlider); // Update the state to reflect the change
|
43
|
+
};
|
44
|
+
|
45
|
+
useEffect(() => {
|
46
|
+
const intervalId = setInterval(() => {
|
47
|
+
const currentTime = player?.currentTime() || 0;
|
48
|
+
|
49
|
+
const time = (currentTime * DEFERENCE) / duration;
|
50
|
+
|
51
|
+
setTimeSlider(time);
|
52
|
+
}, 1000);
|
53
|
+
|
54
|
+
// Cleanup function to clear the interval
|
55
|
+
return () => clearInterval(intervalId);
|
56
|
+
}, [player, duration]);
|
57
|
+
|
58
|
+
const [maskCuttes, setMaskCuttes] = useState("");
|
59
|
+
|
60
|
+
useEffect(() => {
|
61
|
+
const arr: string[] = ["black 0%"];
|
62
|
+
chapters?.forEach((c) => {
|
63
|
+
const startPercentage = Math.floor((c.startTime * 100) / duration);
|
64
|
+
const endPercentage = Math.floor((c.endTime * 100) / duration);
|
65
|
+
arr.push(`black ${startPercentage}%`);
|
66
|
+
arr.push(`transparent ${startPercentage}%`);
|
67
|
+
arr.push(`transparent ${startPercentage + BAR_PERCENTAGE_WIDTH}%`);
|
68
|
+
|
69
|
+
arr.push(`black ${startPercentage + BAR_PERCENTAGE_WIDTH}%`);
|
70
|
+
arr.push(`black ${endPercentage}%`);
|
71
|
+
|
72
|
+
arr.push(`transparent ${endPercentage}%`);
|
73
|
+
arr.push(`transparent ${endPercentage + BAR_PERCENTAGE_WIDTH}%`);
|
74
|
+
|
75
|
+
arr.push(`black ${endPercentage + BAR_PERCENTAGE_WIDTH}%`);
|
76
|
+
});
|
77
|
+
arr.push(`black 100%`);
|
78
|
+
|
79
|
+
setMaskCuttes(arr.toString());
|
80
|
+
}, [chapters, duration]);
|
81
|
+
|
82
|
+
return (
|
83
|
+
<div className=' sb-w-full sb-h-2 sb-flex sb-items-center sb-justify-center'>
|
84
|
+
<div className='sb-absolute sb-top-0 sb-left-0 sb-w-full sb-z-10'>
|
85
|
+
<Slider
|
86
|
+
value={timeSlider}
|
87
|
+
handleValueChange={handleValueChange}
|
88
|
+
handleSliderClick={handleSliderClick}
|
89
|
+
min={MIN}
|
90
|
+
max={MAX}
|
91
|
+
style={{
|
92
|
+
background: "transparent",
|
93
|
+
}}
|
94
|
+
/>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
<div
|
98
|
+
className='sb-absolute sb-top-0 sb-left-0 sb-w-full sb-h-2 sb-bg-slate-400 sb-rounded-md'
|
99
|
+
style={{
|
100
|
+
background: `
|
88
101
|
linear-gradient(to right,
|
89
102
|
#f97316 0%,
|
90
103
|
#f97316 ${timeSlider}%,
|
@@ -94,17 +107,16 @@ const TimeSlider = ({ chapters }: Props) => {
|
|
94
107
|
#30303030 100%
|
95
108
|
)
|
96
109
|
`,
|
97
|
-
|
110
|
+
maskImage: `
|
98
111
|
linear-gradient(to right,
|
99
112
|
${maskCuttes}
|
100
113
|
)
|
101
114
|
`,
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
);
|
115
|
+
maskSize: "100% 100%",
|
116
|
+
maskRepeat: "no-repeat",
|
117
|
+
}}></div>
|
118
|
+
</div>
|
119
|
+
);
|
108
120
|
};
|
109
121
|
|
110
122
|
export default TimeSlider;
|
@@ -8,6 +8,7 @@ import "./style/style.css";
|
|
8
8
|
import "../../styles/tailwind.css";
|
9
9
|
import { SoftBuildersVideoPlayerProvider } from "./provider";
|
10
10
|
import BigPlayButton from "../BigPlayButton";
|
11
|
+
import { isEqual } from "lodash";
|
11
12
|
let bigPlayButtonRoot = {};
|
12
13
|
const renderBigPlayButton = (id, player, isPaused, setIsPaused, opacity = "100") => {
|
13
14
|
const container = document.getElementById(`video-container-${id}`);
|
@@ -58,6 +59,7 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
|
|
58
59
|
const [isQualityMenuOpen, setIsQualityMenuOpen] = useState(false);
|
59
60
|
const [isSubtitleMenuOpen, setIsSubtitleMenuOpen] = useState(false);
|
60
61
|
const [isNoteOpen, setNoteOpen] = useState(false);
|
62
|
+
console.log("notes", notes);
|
61
63
|
const onReady = (player) => {
|
62
64
|
console.log("onReady: ", onReady);
|
63
65
|
if (playerRef) {
|
@@ -87,16 +89,42 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
|
|
87
89
|
videoElement.style.height = "100%";
|
88
90
|
playerRef.current = videojs(videoElement, options, () => {
|
89
91
|
var _a;
|
90
|
-
setIsReady(true);
|
91
92
|
(_a = playerRef.current) === null || _a === void 0 ? void 0 : _a.currentTime(startTime);
|
92
93
|
});
|
94
|
+
onReady(playerRef.current);
|
93
95
|
};
|
94
96
|
useEffect(() => {
|
95
97
|
if (playerRef.current) {
|
96
|
-
playerRef.current.
|
97
|
-
|
98
|
+
if (!isEqual(playerRef.current.poster_, poster)) {
|
99
|
+
playerRef.current.dispose();
|
100
|
+
console.log("dispose: ");
|
101
|
+
playerRef.current = undefined;
|
102
|
+
}
|
98
103
|
}
|
99
104
|
initializePlayer();
|
105
|
+
console.log("initializePlayer: ghhh");
|
106
|
+
}, [options]);
|
107
|
+
useEffect(() => {
|
108
|
+
return () => {
|
109
|
+
if (playerRef.current) {
|
110
|
+
console.log(playerRef.current, options, "jk");
|
111
|
+
if (!isEqual(playerRef.current.poster_, poster)) {
|
112
|
+
playerRef.current.dispose();
|
113
|
+
console.log("dispose7: ");
|
114
|
+
playerRef.current = undefined;
|
115
|
+
setTimeout(() => {
|
116
|
+
if (bigPlayButtonRoot[id]) {
|
117
|
+
bigPlayButtonRoot[id].unmount();
|
118
|
+
bigPlayButtonRoot[id] = undefined;
|
119
|
+
}
|
120
|
+
if (controlBarRoot[id]) {
|
121
|
+
controlBarRoot[id].unmount();
|
122
|
+
controlBarRoot[id] = undefined;
|
123
|
+
}
|
124
|
+
}, 0);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
};
|
100
128
|
}, [options]);
|
101
129
|
useEffect(() => {
|
102
130
|
if (playerRef.current && isReady) {
|
@@ -114,6 +142,7 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
|
|
114
142
|
useEffect(() => {
|
115
143
|
if (isReady) {
|
116
144
|
const controlBarTimeout = setTimeout(() => {
|
145
|
+
console.log("isReady: ", isReady);
|
117
146
|
renderControlBar(id, playerRef.current, isPaused, setIsPaused, duration, notes, chapters, 5, handleSaveNoteAction, opacity, (e) => {
|
118
147
|
handlePlayerClick(e, true);
|
119
148
|
}, bgColor, setIsQualityMenuOpen, setIsSubtitleMenuOpen, disableNote, setNoteOpen, noteButtonClick);
|
@@ -139,9 +168,22 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
|
|
139
168
|
}, 500);
|
140
169
|
return () => clearTimeout(playButtonTimeout);
|
141
170
|
}
|
142
|
-
}, [id, isPaused, isReady, opacity]);
|
171
|
+
}, [id, isPaused, isReady, opacity, options, notes]);
|
143
172
|
useEffect(() => {
|
144
173
|
if (playerRef.current) {
|
174
|
+
playerRef.current.dispose();
|
175
|
+
console.log("dispose7: ");
|
176
|
+
playerRef.current = undefined;
|
177
|
+
setTimeout(() => {
|
178
|
+
if (bigPlayButtonRoot[id]) {
|
179
|
+
bigPlayButtonRoot[id].unmount();
|
180
|
+
bigPlayButtonRoot[id] = undefined;
|
181
|
+
}
|
182
|
+
if (controlBarRoot[id]) {
|
183
|
+
controlBarRoot[id].unmount();
|
184
|
+
controlBarRoot[id] = undefined;
|
185
|
+
}
|
186
|
+
}, 0);
|
145
187
|
const intervalId = setInterval(() => {
|
146
188
|
if (playerRef.current)
|
147
189
|
setIsPaused(playerRef.current.paused());
|
@@ -157,27 +199,6 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
|
|
157
199
|
(_b = playerRef.current) === null || _b === void 0 ? void 0 : _b.play();
|
158
200
|
}
|
159
201
|
}, [startTime]);
|
160
|
-
useEffect(() => {
|
161
|
-
return () => {
|
162
|
-
if (playerRef.current) {
|
163
|
-
// Defer cleanup to avoid flushSync issues during rendering
|
164
|
-
setTimeout(() => {
|
165
|
-
var _a;
|
166
|
-
if (bigPlayButtonRoot[id]) {
|
167
|
-
bigPlayButtonRoot[id].unmount();
|
168
|
-
bigPlayButtonRoot[id] = undefined;
|
169
|
-
}
|
170
|
-
if (controlBarRoot[id]) {
|
171
|
-
controlBarRoot[id].unmount();
|
172
|
-
controlBarRoot[id] = undefined;
|
173
|
-
}
|
174
|
-
// Dispose the player after custom elements are cleaned up
|
175
|
-
(_a = playerRef.current) === null || _a === void 0 ? void 0 : _a.dispose();
|
176
|
-
playerRef.current = undefined;
|
177
|
-
}, 0);
|
178
|
-
}
|
179
|
-
};
|
180
|
-
}, []);
|
181
202
|
const timeoutRef = useRef(null);
|
182
203
|
useEffect(() => {
|
183
204
|
if (isQualityMenuOpen || isSubtitleMenuOpen) {
|
@@ -197,8 +218,7 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
|
|
197
218
|
}
|
198
219
|
}, [isQualityMenuOpen, isSubtitleMenuOpen]);
|
199
220
|
useEffect(() => {
|
200
|
-
|
201
|
-
}
|
221
|
+
console.log("notes: ", notes);
|
202
222
|
}, [notes]);
|
203
223
|
const handlePlayerClick = async (e, isTimerOnly = false) => {
|
204
224
|
e.preventDefault();
|
@@ -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;AAE7C,IAAI,iBAAiB,GAEjB,EAAE,CAAC;AACP,MAAM,mBAAmB,GAAG,CAC1B,EAAU,EACV,MAA0B,EAC1B,QAAiB,EACjB,WAA0D,EAC1D,UAAkB,KAAK,EACvB,EAAE;IACF,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IAEnE,IAAI,SAAS,EAAE,CAAC;QACd,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QAChC,MAAM,OAAO,GAAQ,SAAS,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;QACrE,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,OA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13
|
import "../../styles/tailwind.css";
|
14
14
|
import { SoftBuildersVideoPlayerProvider } from "./provider";
|
15
15
|
import BigPlayButton from "../BigPlayButton";
|
16
|
+
import { isEqual } from "lodash";
|
16
17
|
|
17
18
|
let bigPlayButtonRoot: {
|
18
19
|
[key: string]: ReactDOM.Root | undefined;
|
@@ -128,6 +129,7 @@ export type Props<T = any> = {
|
|
128
129
|
childRef?: React.Ref<HTMLDivElement>;
|
129
130
|
noteButtonClick?: (e: any) => void;
|
130
131
|
};
|
132
|
+
|
131
133
|
const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
132
134
|
(
|
133
135
|
{
|
@@ -158,6 +160,8 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
|
158
160
|
const [isQualityMenuOpen, setIsQualityMenuOpen] = useState(false);
|
159
161
|
const [isSubtitleMenuOpen, setIsSubtitleMenuOpen] = useState(false);
|
160
162
|
const [isNoteOpen, setNoteOpen] = useState(false);
|
163
|
+
console.log("notes", notes);
|
164
|
+
|
161
165
|
const onReady = (player: Player) => {
|
162
166
|
console.log("onReady: ", onReady);
|
163
167
|
if (playerRef) {
|
@@ -176,6 +180,7 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
|
176
180
|
});
|
177
181
|
}
|
178
182
|
};
|
183
|
+
|
179
184
|
const initializePlayer = () => {
|
180
185
|
const videoElement = document.createElement("video-js");
|
181
186
|
videoElement.setAttribute("playsinline", "true");
|
@@ -188,16 +193,42 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
|
188
193
|
videoElement.style.height = "100%";
|
189
194
|
|
190
195
|
playerRef.current = videojs(videoElement, options, () => {
|
191
|
-
setIsReady(true);
|
192
196
|
playerRef.current?.currentTime(startTime);
|
193
197
|
});
|
198
|
+
onReady(playerRef.current);
|
194
199
|
};
|
195
200
|
useEffect(() => {
|
196
201
|
if (playerRef.current) {
|
197
|
-
playerRef.current.
|
198
|
-
|
202
|
+
if (!isEqual(playerRef.current.poster_, poster)) {
|
203
|
+
playerRef.current.dispose();
|
204
|
+
console.log("dispose: ");
|
205
|
+
playerRef.current = undefined;
|
206
|
+
}
|
199
207
|
}
|
200
208
|
initializePlayer();
|
209
|
+
console.log("initializePlayer: ghhh");
|
210
|
+
}, [options]);
|
211
|
+
useEffect(() => {
|
212
|
+
return () => {
|
213
|
+
if (playerRef.current) {
|
214
|
+
console.log(playerRef.current, options, "jk");
|
215
|
+
if (!isEqual(playerRef.current.poster_, poster)) {
|
216
|
+
playerRef.current.dispose();
|
217
|
+
console.log("dispose7: ");
|
218
|
+
playerRef.current = undefined;
|
219
|
+
setTimeout(() => {
|
220
|
+
if (bigPlayButtonRoot[id]) {
|
221
|
+
bigPlayButtonRoot[id].unmount();
|
222
|
+
bigPlayButtonRoot[id] = undefined;
|
223
|
+
}
|
224
|
+
if (controlBarRoot[id]) {
|
225
|
+
controlBarRoot[id].unmount();
|
226
|
+
controlBarRoot[id] = undefined;
|
227
|
+
}
|
228
|
+
}, 0);
|
229
|
+
}
|
230
|
+
}
|
231
|
+
};
|
201
232
|
}, [options]);
|
202
233
|
useEffect(() => {
|
203
234
|
if (playerRef.current && isReady) {
|
@@ -213,6 +244,8 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
|
213
244
|
useEffect(() => {
|
214
245
|
if (isReady) {
|
215
246
|
const controlBarTimeout = setTimeout(() => {
|
247
|
+
console.log("isReady: ", isReady);
|
248
|
+
|
216
249
|
renderControlBar(
|
217
250
|
id,
|
218
251
|
playerRef.current,
|
@@ -262,9 +295,22 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
|
262
295
|
}, 500);
|
263
296
|
return () => clearTimeout(playButtonTimeout);
|
264
297
|
}
|
265
|
-
}, [id, isPaused, isReady, opacity]);
|
298
|
+
}, [id, isPaused, isReady, opacity, options, notes]);
|
266
299
|
useEffect(() => {
|
267
300
|
if (playerRef.current) {
|
301
|
+
playerRef.current.dispose();
|
302
|
+
console.log("dispose7: ");
|
303
|
+
playerRef.current = undefined;
|
304
|
+
setTimeout(() => {
|
305
|
+
if (bigPlayButtonRoot[id]) {
|
306
|
+
bigPlayButtonRoot[id].unmount();
|
307
|
+
bigPlayButtonRoot[id] = undefined;
|
308
|
+
}
|
309
|
+
if (controlBarRoot[id]) {
|
310
|
+
controlBarRoot[id].unmount();
|
311
|
+
controlBarRoot[id] = undefined;
|
312
|
+
}
|
313
|
+
}, 0);
|
268
314
|
const intervalId = setInterval(() => {
|
269
315
|
if (playerRef.current) setIsPaused(playerRef.current.paused());
|
270
316
|
}, 500);
|
@@ -278,27 +324,7 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
|
278
324
|
playerRef.current?.play();
|
279
325
|
}
|
280
326
|
}, [startTime]);
|
281
|
-
useEffect(() => {
|
282
|
-
return () => {
|
283
|
-
if (playerRef.current) {
|
284
|
-
// Defer cleanup to avoid flushSync issues during rendering
|
285
|
-
setTimeout(() => {
|
286
|
-
if (bigPlayButtonRoot[id]) {
|
287
|
-
bigPlayButtonRoot[id].unmount();
|
288
|
-
bigPlayButtonRoot[id] = undefined;
|
289
|
-
}
|
290
|
-
if (controlBarRoot[id]) {
|
291
|
-
controlBarRoot[id].unmount();
|
292
|
-
controlBarRoot[id] = undefined;
|
293
|
-
}
|
294
327
|
|
295
|
-
// Dispose the player after custom elements are cleaned up
|
296
|
-
playerRef.current?.dispose();
|
297
|
-
playerRef.current = undefined;
|
298
|
-
}, 0);
|
299
|
-
}
|
300
|
-
};
|
301
|
-
}, []);
|
302
328
|
const timeoutRef = useRef<any>(null);
|
303
329
|
useEffect(() => {
|
304
330
|
if (isQualityMenuOpen || isSubtitleMenuOpen) {
|
@@ -319,8 +345,7 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
|
|
319
345
|
}, [isQualityMenuOpen, isSubtitleMenuOpen]);
|
320
346
|
|
321
347
|
useEffect(() => {
|
322
|
-
|
323
|
-
}
|
348
|
+
console.log("notes: ", notes);
|
324
349
|
}, [notes]);
|
325
350
|
|
326
351
|
const handlePlayerClick = async (e: any, isTimerOnly = false) => {
|
package/dist/index.mjs
CHANGED
@@ -171,13 +171,16 @@ var Slider = (_a) => {
|
|
171
171
|
handleValueChange,
|
172
172
|
min = 0,
|
173
173
|
max = 100,
|
174
|
-
className
|
174
|
+
className,
|
175
|
+
handleSliderClick = () => {
|
176
|
+
}
|
175
177
|
} = _b, rest = __objRest(_b, [
|
176
178
|
"value",
|
177
179
|
"handleValueChange",
|
178
180
|
"min",
|
179
181
|
"max",
|
180
|
-
"className"
|
182
|
+
"className",
|
183
|
+
"handleSliderClick"
|
181
184
|
]);
|
182
185
|
return /* @__PURE__ */ jsx3(
|
183
186
|
"input",
|
@@ -187,6 +190,7 @@ var Slider = (_a) => {
|
|
187
190
|
onMouseDown: (e) => e.stopPropagation(),
|
188
191
|
onClick: (e) => {
|
189
192
|
e.stopPropagation();
|
193
|
+
handleSliderClick(e);
|
190
194
|
},
|
191
195
|
onMouseUp: (e) => e.stopPropagation(),
|
192
196
|
max,
|
@@ -1048,6 +1052,15 @@ var TimeSlider = ({ chapters }) => {
|
|
1048
1052
|
console.log("time: ", time);
|
1049
1053
|
player == null ? void 0 : player.currentTime(time);
|
1050
1054
|
};
|
1055
|
+
const handleSliderClick = (e) => {
|
1056
|
+
const slider = e.currentTarget;
|
1057
|
+
const rect = slider.getBoundingClientRect();
|
1058
|
+
const offsetX = e.clientX - rect.left;
|
1059
|
+
const newTimeSlider = offsetX / rect.width * DEFERENCE;
|
1060
|
+
const time = newTimeSlider * duration / DEFERENCE;
|
1061
|
+
player == null ? void 0 : player.currentTime(time);
|
1062
|
+
setTimeSlider(newTimeSlider);
|
1063
|
+
};
|
1051
1064
|
useEffect9(() => {
|
1052
1065
|
const intervalId = setInterval(() => {
|
1053
1066
|
const currentTime = (player == null ? void 0 : player.currentTime()) || 0;
|
@@ -1080,6 +1093,7 @@ var TimeSlider = ({ chapters }) => {
|
|
1080
1093
|
{
|
1081
1094
|
value: timeSlider,
|
1082
1095
|
handleValueChange,
|
1096
|
+
handleSliderClick,
|
1083
1097
|
min: MIN2,
|
1084
1098
|
max: MAX2,
|
1085
1099
|
style: {
|
@@ -1483,7 +1497,7 @@ var ControlBar = ({
|
|
1483
1497
|
time: Number((player == null ? void 0 : player.currentTime()) || 0),
|
1484
1498
|
isOpen: e
|
1485
1499
|
});
|
1486
|
-
player.pause();
|
1500
|
+
player == null ? void 0 : player.pause();
|
1487
1501
|
}
|
1488
1502
|
}
|
1489
1503
|
) }),
|
@@ -1538,6 +1552,7 @@ var BigPlayButton = ({ player, isPaused, setIsPaused }) => {
|
|
1538
1552
|
var BigPlayButton_default = BigPlayButton;
|
1539
1553
|
|
1540
1554
|
// src/components/VideoPlayerComponent/index.tsx
|
1555
|
+
import { isEqual } from "lodash";
|
1541
1556
|
import { jsx as jsx36, jsxs as jsxs15 } from "react/jsx-runtime";
|
1542
1557
|
var bigPlayButtonRoot = {};
|
1543
1558
|
var renderBigPlayButton = (id, player, isPaused, setIsPaused, opacity = "100") => {
|
@@ -1635,6 +1650,7 @@ var VideoPlayerComponent = forwardRef(
|
|
1635
1650
|
const [isQualityMenuOpen, setIsQualityMenuOpen] = useState14(false);
|
1636
1651
|
const [isSubtitleMenuOpen, setIsSubtitleMenuOpen] = useState14(false);
|
1637
1652
|
const [isNoteOpen, setNoteOpen] = useState14(false);
|
1653
|
+
console.log("notes", notes);
|
1638
1654
|
const onReady = (player) => {
|
1639
1655
|
console.log("onReady: ", onReady);
|
1640
1656
|
if (playerRef) {
|
@@ -1665,16 +1681,42 @@ var VideoPlayerComponent = forwardRef(
|
|
1665
1681
|
videoElement.style.height = "100%";
|
1666
1682
|
playerRef.current = videojs(videoElement, options, () => {
|
1667
1683
|
var _a;
|
1668
|
-
setIsReady(true);
|
1669
1684
|
(_a = playerRef.current) == null ? void 0 : _a.currentTime(startTime);
|
1670
1685
|
});
|
1686
|
+
onReady(playerRef.current);
|
1671
1687
|
};
|
1672
1688
|
useEffect14(() => {
|
1673
1689
|
if (playerRef.current) {
|
1674
|
-
playerRef.current.
|
1675
|
-
|
1690
|
+
if (!isEqual(playerRef.current.poster_, poster)) {
|
1691
|
+
playerRef.current.dispose();
|
1692
|
+
console.log("dispose: ");
|
1693
|
+
playerRef.current = void 0;
|
1694
|
+
}
|
1676
1695
|
}
|
1677
1696
|
initializePlayer();
|
1697
|
+
console.log("initializePlayer: ghhh");
|
1698
|
+
}, [options]);
|
1699
|
+
useEffect14(() => {
|
1700
|
+
return () => {
|
1701
|
+
if (playerRef.current) {
|
1702
|
+
console.log(playerRef.current, options, "jk");
|
1703
|
+
if (!isEqual(playerRef.current.poster_, poster)) {
|
1704
|
+
playerRef.current.dispose();
|
1705
|
+
console.log("dispose7: ");
|
1706
|
+
playerRef.current = void 0;
|
1707
|
+
setTimeout(() => {
|
1708
|
+
if (bigPlayButtonRoot[id]) {
|
1709
|
+
bigPlayButtonRoot[id].unmount();
|
1710
|
+
bigPlayButtonRoot[id] = void 0;
|
1711
|
+
}
|
1712
|
+
if (controlBarRoot[id]) {
|
1713
|
+
controlBarRoot[id].unmount();
|
1714
|
+
controlBarRoot[id] = void 0;
|
1715
|
+
}
|
1716
|
+
}, 0);
|
1717
|
+
}
|
1718
|
+
}
|
1719
|
+
};
|
1678
1720
|
}, [options]);
|
1679
1721
|
useEffect14(() => {
|
1680
1722
|
if (playerRef.current && isReady) {
|
@@ -1689,6 +1731,7 @@ var VideoPlayerComponent = forwardRef(
|
|
1689
1731
|
useEffect14(() => {
|
1690
1732
|
if (isReady) {
|
1691
1733
|
const controlBarTimeout = setTimeout(() => {
|
1734
|
+
console.log("isReady: ", isReady);
|
1692
1735
|
renderControlBar(
|
1693
1736
|
id,
|
1694
1737
|
playerRef.current,
|
@@ -1738,9 +1781,22 @@ var VideoPlayerComponent = forwardRef(
|
|
1738
1781
|
}, 500);
|
1739
1782
|
return () => clearTimeout(playButtonTimeout);
|
1740
1783
|
}
|
1741
|
-
}, [id, isPaused, isReady, opacity]);
|
1784
|
+
}, [id, isPaused, isReady, opacity, options, notes]);
|
1742
1785
|
useEffect14(() => {
|
1743
1786
|
if (playerRef.current) {
|
1787
|
+
playerRef.current.dispose();
|
1788
|
+
console.log("dispose7: ");
|
1789
|
+
playerRef.current = void 0;
|
1790
|
+
setTimeout(() => {
|
1791
|
+
if (bigPlayButtonRoot[id]) {
|
1792
|
+
bigPlayButtonRoot[id].unmount();
|
1793
|
+
bigPlayButtonRoot[id] = void 0;
|
1794
|
+
}
|
1795
|
+
if (controlBarRoot[id]) {
|
1796
|
+
controlBarRoot[id].unmount();
|
1797
|
+
controlBarRoot[id] = void 0;
|
1798
|
+
}
|
1799
|
+
}, 0);
|
1744
1800
|
const intervalId = setInterval(() => {
|
1745
1801
|
if (playerRef.current) setIsPaused(playerRef.current.paused());
|
1746
1802
|
}, 500);
|
@@ -1755,25 +1811,6 @@ var VideoPlayerComponent = forwardRef(
|
|
1755
1811
|
(_b = playerRef.current) == null ? void 0 : _b.play();
|
1756
1812
|
}
|
1757
1813
|
}, [startTime]);
|
1758
|
-
useEffect14(() => {
|
1759
|
-
return () => {
|
1760
|
-
if (playerRef.current) {
|
1761
|
-
setTimeout(() => {
|
1762
|
-
var _a;
|
1763
|
-
if (bigPlayButtonRoot[id]) {
|
1764
|
-
bigPlayButtonRoot[id].unmount();
|
1765
|
-
bigPlayButtonRoot[id] = void 0;
|
1766
|
-
}
|
1767
|
-
if (controlBarRoot[id]) {
|
1768
|
-
controlBarRoot[id].unmount();
|
1769
|
-
controlBarRoot[id] = void 0;
|
1770
|
-
}
|
1771
|
-
(_a = playerRef.current) == null ? void 0 : _a.dispose();
|
1772
|
-
playerRef.current = void 0;
|
1773
|
-
}, 0);
|
1774
|
-
}
|
1775
|
-
};
|
1776
|
-
}, []);
|
1777
1814
|
const timeoutRef = useRef2(null);
|
1778
1815
|
useEffect14(() => {
|
1779
1816
|
if (isQualityMenuOpen || isSubtitleMenuOpen) {
|
@@ -1792,8 +1829,7 @@ var VideoPlayerComponent = forwardRef(
|
|
1792
1829
|
}
|
1793
1830
|
}, [isQualityMenuOpen, isSubtitleMenuOpen]);
|
1794
1831
|
useEffect14(() => {
|
1795
|
-
|
1796
|
-
}
|
1832
|
+
console.log("notes: ", notes);
|
1797
1833
|
}, [notes]);
|
1798
1834
|
const handlePlayerClick = async (e, isTimerOnly = false) => {
|
1799
1835
|
e.preventDefault();
|
@@ -1921,6 +1957,7 @@ var VideoPlayerComponent = forwardRef(
|
|
1921
1957
|
var VideoPlayerComponent_default = VideoPlayerComponent;
|
1922
1958
|
|
1923
1959
|
// src/components/SoftBuildersVideoPlayer/index.tsx
|
1960
|
+
import { isEqual as isEqual2 } from "lodash";
|
1924
1961
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
1925
1962
|
var DEFAULT_OPTIONS = {
|
1926
1963
|
autoplay: false,
|
@@ -1994,8 +2031,9 @@ var Component = forwardRef2(
|
|
1994
2031
|
}
|
1995
2032
|
);
|
1996
2033
|
var SoftBuildersVideoPlayer = memo(Component, (prevProps, nextProps) => {
|
1997
|
-
|
1998
|
-
|
2034
|
+
console.log(isEqual2(prevProps.options, nextProps.options, "oooop"));
|
2035
|
+
console.log(nextProps.notes, prevProps.notes, "oooop");
|
2036
|
+
return isEqual2(prevProps.options, nextProps.options) && prevProps.notes === nextProps.notes && prevProps.chapters === nextProps.chapters && prevProps.startTime === nextProps.startTime;
|
1999
2037
|
});
|
2000
2038
|
var SoftBuildersVideoPlayer_default = SoftBuildersVideoPlayer;
|
2001
2039
|
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "softbuilders-react-video-player",
|
3
3
|
"description": "Standalone video player component",
|
4
|
-
"version": "1.2.
|
4
|
+
"version": "1.2.3",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
7
7
|
"files": [
|
@@ -24,6 +24,7 @@
|
|
24
24
|
"react-dom": "^18.3.1"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
+
"lodash": "^4.17.21",
|
27
28
|
"typescript": "^5.6.2",
|
28
29
|
"video.js": "^8.18.0"
|
29
30
|
},
|