softbuilders-react-video-player 1.1.51 → 1.1.53
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/ControlBar/index.js +5 -3
- package/dist/components/ControlBar/index.js.map +1 -1
- package/dist/components/ControlBar/index.tsx +6 -3
- package/dist/components/CurrentTimeTracker/index.js +3 -1
- package/dist/components/CurrentTimeTracker/index.js.map +1 -1
- package/dist/components/CurrentTimeTracker/index.tsx +3 -1
- package/dist/components/QualityMenu/index.js +4 -1
- package/dist/components/QualityMenu/index.js.map +1 -1
- package/dist/components/QualityMenu/index.tsx +4 -1
- package/dist/components/VideoPlayerComponent/index.js +5 -4
- package/dist/components/VideoPlayerComponent/index.js.map +1 -1
- package/dist/components/VideoPlayerComponent/index.tsx +12 -12
- package/dist/components/VideoPlayerComponent/style/style.css +2 -0
- package/dist/index.css +19 -6
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +31 -27
- package/dist/styles/tailwind.css +17 -6
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
@@ -47,7 +47,9 @@ const ControlBar = ({ player, isPaused, setIsPaused, duration, notes, chapters,
|
|
47
47
|
useEffect(() => {
|
48
48
|
setDuration(duration);
|
49
49
|
}, [duration]);
|
50
|
-
return (_jsxs("div", { className: ` !sb-px-4 sb-flex sb-pt-2 sb-justify-center sb-gap-3 sb-w-full sb-h-full ${width > 400
|
50
|
+
return (_jsxs("div", { className: ` !sb-px-4 sb-flex sb-pt-2 sb-justify-center sb-gap-3 sb-w-full sb-h-full ${width > 400
|
51
|
+
? "sb-absolute sb-bottom-1 sb-items-end sb-mb-1 sb-pb-2 "
|
52
|
+
: "sb-items-start"} sb-pb-2`, children: [_jsx(BufferTracker, {}), _jsx(CurrentTimeTracker, {}), _jsx("button", { onClick: () => {
|
51
53
|
seek(-seekStep);
|
52
54
|
}, 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) => {
|
53
55
|
e.preventDefault();
|
@@ -55,13 +57,13 @@ const ControlBar = ({ player, isPaused, setIsPaused, duration, notes, chapters,
|
|
55
57
|
}, children: _jsx(ForwardIcon, { className: "sb-w-3 sb-h-3" }) }),
|
56
58
|
// isSeeking ||
|
57
59
|
// width > 400 &&
|
58
|
-
_jsx("div", { className: `${width < 400 ? "sb-
|
60
|
+
_jsx("div", { className: `${width < 400 ? "sb-flex-1 sb-ml-0 sb-mr-0" : "sb-w-full"}`, children: _jsxs("div", { style: width < 400
|
59
61
|
? {
|
60
62
|
width: `${width * 0.9}px`,
|
61
63
|
left: "5%",
|
62
64
|
top: "90%",
|
63
65
|
}
|
64
|
-
: { width: "98%" }, className: `flex gap-2 ${width < 400 ? "absolute sb-top-1" : "-sb-translate-y-0 sb-w-full"} hover:sb-w-[45%]
|
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) => {
|
65
67
|
setVolumeToggler(!volumeSliderToggler);
|
66
68
|
setIsQualityMenuOpen && setIsQualityMenuOpen(isOpen);
|
67
69
|
} }), disableNote && (_jsx(CreateNoteMenu, { handleSaveNoteAction: handleSaveNoteAction, width: width })), _jsx(SubtitleMenu, { width: width, onClick: (e, isOpen) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ControlBar/index.tsx"],"names":[],"mappings":";AAAA,OAA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M,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"}
|
@@ -98,7 +98,9 @@ const ControlBar = <T,>({
|
|
98
98
|
return (
|
99
99
|
<div
|
100
100
|
className={` !sb-px-4 sb-flex sb-pt-2 sb-justify-center sb-gap-3 sb-w-full sb-h-full ${
|
101
|
-
width > 400
|
101
|
+
width > 400
|
102
|
+
? "sb-absolute sb-bottom-1 sb-items-end sb-mb-1 sb-pb-2 "
|
103
|
+
: "sb-items-start"
|
102
104
|
} sb-pb-2`}
|
103
105
|
>
|
104
106
|
{/* Doesn't display anything, just set the downloaded buffer percentage */}
|
@@ -134,7 +136,7 @@ const ControlBar = <T,>({
|
|
134
136
|
// width > 400 &&
|
135
137
|
<div
|
136
138
|
className={`${
|
137
|
-
width < 400 ? "sb-
|
139
|
+
width < 400 ? "sb-flex-1 sb-ml-0 sb-mr-0" : "sb-w-full"
|
138
140
|
}`}
|
139
141
|
>
|
140
142
|
<div
|
@@ -149,8 +151,9 @@ const ControlBar = <T,>({
|
|
149
151
|
}
|
150
152
|
className={`flex gap-2 ${
|
151
153
|
width < 400 ? "absolute sb-top-1" : "-sb-translate-y-0 sb-w-full"
|
152
|
-
} hover:sb-w-[45%]
|
154
|
+
} hover:sb-w-[45%] `}
|
153
155
|
>
|
156
|
+
{/* sb-transition-all sb-ease-in-out sb-duration-500 */}
|
154
157
|
<CurrentTimeLabel />
|
155
158
|
|
156
159
|
<TimeSliderContainer chapters={chapters} notes={notes} />
|
@@ -5,7 +5,9 @@ const CurrentTimeTracker = () => {
|
|
5
5
|
const { setCurrentTime, player } = useSoftBuildersVideoPlayerContext();
|
6
6
|
useEffect(() => {
|
7
7
|
const intervalId = setInterval(() => {
|
8
|
-
|
8
|
+
(player === null || player === void 0 ? void 0 : player.currentTime)
|
9
|
+
? setCurrentTime((player === null || player === void 0 ? void 0 : player.currentTime()) || 0)
|
10
|
+
: setCurrentTime(0);
|
9
11
|
}, 500);
|
10
12
|
// Cleanup function to clear the interval
|
11
13
|
return () => clearInterval(intervalId);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CurrentTimeTracker/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAErF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,iCAAiC,EAAE,CAAC;IAEvE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;YAClC,cAAc,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,EAAE,KAAI,CAAC,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CurrentTimeTracker/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAErF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,iCAAiC,EAAE,CAAC;IAEvE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;YAClC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW;gBACjB,CAAC,CAAC,cAAc,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,EAAE,KAAI,CAAC,CAAC;gBAC5C,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC,EAAE,GAAG,CAAC,CAAC;QAER,yCAAyC;QACzC,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,OAAO,mBAAK,CAAC;AACf,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
@@ -6,7 +6,9 @@ const CurrentTimeTracker = () => {
|
|
6
6
|
|
7
7
|
useEffect(() => {
|
8
8
|
const intervalId = setInterval(() => {
|
9
|
-
|
9
|
+
player?.currentTime
|
10
|
+
? setCurrentTime(player?.currentTime() || 0)
|
11
|
+
: setCurrentTime(0);
|
10
12
|
}, 500);
|
11
13
|
|
12
14
|
// Cleanup function to clear the interval
|
@@ -19,7 +19,10 @@ const QualityMenu = ({ width, onClick }) => {
|
|
19
19
|
const source = player === null || player === void 0 ? void 0 : player.currentSource();
|
20
20
|
const quality = JSON.parse(JSON.stringify(source));
|
21
21
|
// setCurrentQualitySrc(quality.label);
|
22
|
-
|
22
|
+
if (qs) {
|
23
|
+
const el = qs === null || qs === void 0 ? void 0 : qs.find((ele) => ele.default);
|
24
|
+
el ? setCurrentQualitySrc(el.label) : setCurrentQualitySrc(qs[0].label);
|
25
|
+
}
|
23
26
|
}
|
24
27
|
}, [player]);
|
25
28
|
return (_jsx(MenuButton, { classContainer: `${width < 400 ? "!sb-top-8 -sb-left-9" : ""}`, onClick: (e, isOpen) => {
|
@@ -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,G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AC,CAAC;4CACxB,MAAM,WAAW,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,EAAE,CAAC;4CAC1C,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;4CACnC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,CAAC,WAAW,CAAC,CAAC;4CACjC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,EAAE,CAAC;wCACjB,CAAC;oCACH,CAAC,IAdI,WAAW,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAe9B,GACD,CACJ,CAAC;wBACJ,CAAC,CAAC,GACE,IACF,GACF,EAER,KAAK,EAAE,CAAC,EAAY,EAAE,EAAE;YACtB,oBAAoB,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;QACjC,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
@@ -78,7 +78,10 @@ const QualityMenu = ({ width, onClick }: QualityMenuProps) => {
|
|
78
78
|
);
|
79
79
|
|
80
80
|
// setCurrentQualitySrc(quality.label);
|
81
|
-
|
81
|
+
if (qs) {
|
82
|
+
const el = qs?.find((ele) => ele.default);
|
83
|
+
el ? setCurrentQualitySrc(el.label) : setCurrentQualitySrc(qs[0].label);
|
84
|
+
}
|
82
85
|
}
|
83
86
|
}, [player]);
|
84
87
|
|
@@ -84,6 +84,7 @@ const VideoPlayerComponent = ({ id, options, notes, chapters, startTime = 0, han
|
|
84
84
|
videoRef.current.appendChild(videoElement);
|
85
85
|
videoElement.style.width = "100%";
|
86
86
|
videoElement.style.height = "100%";
|
87
|
+
videoElement.style.objectFit = "cover";
|
87
88
|
playerRef.current = videojs(videoElement, options, () => {
|
88
89
|
onReady(playerRef.current);
|
89
90
|
});
|
@@ -276,11 +277,11 @@ const VideoPlayerComponent = ({ id, options, notes, chapters, startTime = 0, han
|
|
276
277
|
};
|
277
278
|
updateTimeSeeker();
|
278
279
|
}, [(_a = playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) === null || _a === void 0 ? void 0 : _a.currentTime()]);
|
279
|
-
return (
|
280
|
+
return (_jsxs("div", { ref: videoRefs, id: `video-container-${id}`, onMouseMove: () => {
|
280
281
|
handlePlayerClick(event, true);
|
281
|
-
}, className: "sb-relative
|
282
|
-
|
283
|
-
|
282
|
+
}, className: "sb-relative sb-overflow-hidden sb-w-full sb-h-full sb-bottom-2 ", onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [_jsx("div", { className: `sb-h-[3px] sb-transition-opacity sb-duration-500 sb-delay-400 sb-z-10 ease-in-out sb-border-spacing-x-2 sb-absolute sb-bg-[red] sb-bottom-0 ${opacity == "100" ? "sb-opacity-0" : "sb-opacity-100"}`, style: {
|
283
|
+
width: timeSeeker,
|
284
|
+
} }), _jsx("div", { className: "hover:sb-cursor-pointer sb-w-full sb-h-full", "data-vjs-player": true, children: _jsx("div", { onClick: handlePlayerClick, ref: videoRef, className: "sb-h-full sb-w-full sb-relative" }) })] }));
|
284
285
|
};
|
285
286
|
export default VideoPlayerComponent;
|
286
287
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/VideoPlayerComponent/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,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,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EAAE,EAC3B,WAAW,EAAE,GAAG,EAAE;YAChB,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACjC,CAAC,EACD,SAAS,EAAC,kEAAkE,EAC5E,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EACtC,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,aAEvC,cACE,SAAS,EAAE,+IACT,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,gBACtC,EAAE,EACF,KAAK,EAAE;oBACL,KAAK,EAAE,UAAU;iBAClB,GACI,EACP,cACE,SAAS,EAAC,6CAA6C,qCAIvD,cACE,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAE,QAAQ,EACb,SAAS,EAAC,iCAAiC,GACtC,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,oBAAoB,CAAC"}
|
@@ -165,6 +165,7 @@ const VideoPlayerComponent = <T,>({
|
|
165
165
|
videoRef.current.appendChild(videoElement);
|
166
166
|
videoElement.style.width = "100%";
|
167
167
|
videoElement.style.height = "100%";
|
168
|
+
videoElement.style.objectFit = "cover";
|
168
169
|
playerRef.current = videojs(videoElement, options, () => {
|
169
170
|
onReady(playerRef.current as Player);
|
170
171
|
});
|
@@ -386,29 +387,28 @@ const VideoPlayerComponent = <T,>({
|
|
386
387
|
onMouseMove={() => {
|
387
388
|
handlePlayerClick(event, true);
|
388
389
|
}}
|
389
|
-
className="sb-relative
|
390
|
+
className="sb-relative sb-overflow-hidden sb-w-full sb-h-full sb-bottom-2 "
|
390
391
|
onMouseEnter={() => setIsHovered(true)}
|
391
392
|
onMouseLeave={() => setIsHovered(false)}
|
392
393
|
>
|
394
|
+
<div
|
395
|
+
className={`sb-h-[3px] sb-transition-opacity sb-duration-500 sb-delay-400 sb-z-10 ease-in-out sb-border-spacing-x-2 sb-absolute sb-bg-[red] sb-bottom-0 ${
|
396
|
+
opacity == "100" ? "sb-opacity-0" : "sb-opacity-100"
|
397
|
+
}`}
|
398
|
+
style={{
|
399
|
+
width: timeSeeker,
|
400
|
+
}}
|
401
|
+
></div>
|
393
402
|
<div
|
394
403
|
className="hover:sb-cursor-pointer sb-w-full sb-h-full"
|
395
404
|
// Attach click event
|
396
405
|
data-vjs-player
|
397
406
|
>
|
398
|
-
<div
|
399
|
-
className={`sb-h-[3px] sb-transition- sb-duration-500 sb-delay-400 sb-z-10 ease-in-out sb-border-spacing-x-2 sb-absolute sb-bg-[red] -sb-bottom-[1.5px] ${
|
400
|
-
opacity == "100" ? "sb-opacity-0" : "sb-opacity-100"
|
401
|
-
}`}
|
402
|
-
style={{
|
403
|
-
width: timeSeeker,
|
404
|
-
}}
|
405
|
-
></div>
|
406
|
-
|
407
407
|
<div
|
408
408
|
onClick={handlePlayerClick}
|
409
409
|
ref={videoRef}
|
410
|
-
className="sb-h-full sb-w-full"
|
411
|
-
|
410
|
+
className="sb-h-full sb-w-full sb-relative"
|
411
|
+
></div>
|
412
412
|
</div>
|
413
413
|
</div>
|
414
414
|
);
|
package/dist/index.css
CHANGED
@@ -41,6 +41,8 @@ input[type=range]::-moz-range-thumb {
|
|
41
41
|
height: 100%;
|
42
42
|
width: 100%;
|
43
43
|
aspect-ratio: 16 / 9;
|
44
|
+
-o-object-fit: cover;
|
45
|
+
object-fit: cover;
|
44
46
|
}
|
45
47
|
.vjs-control-bar {
|
46
48
|
justify-content: center;
|
@@ -428,9 +430,6 @@ video {
|
|
428
430
|
.\!sb-top-8 {
|
429
431
|
top: 2rem !important;
|
430
432
|
}
|
431
|
-
.-sb-bottom-\[1\.5px\] {
|
432
|
-
bottom: -1.5px;
|
433
|
-
}
|
434
433
|
.-sb-left-9 {
|
435
434
|
left: -2.25rem;
|
436
435
|
}
|
@@ -440,9 +439,18 @@ video {
|
|
440
439
|
.-sb-top-1 {
|
441
440
|
top: -0.25rem;
|
442
441
|
}
|
442
|
+
.sb-bottom-0 {
|
443
|
+
bottom: 0px;
|
444
|
+
}
|
445
|
+
.sb-bottom-1 {
|
446
|
+
bottom: 0.25rem;
|
447
|
+
}
|
443
448
|
.sb-bottom-10 {
|
444
449
|
bottom: 2.5rem;
|
445
450
|
}
|
451
|
+
.sb-bottom-2 {
|
452
|
+
bottom: 0.5rem;
|
453
|
+
}
|
446
454
|
.sb-bottom-full {
|
447
455
|
bottom: 100%;
|
448
456
|
}
|
@@ -545,9 +553,6 @@ video {
|
|
545
553
|
.sb-w-5 {
|
546
554
|
width: 1.25rem;
|
547
555
|
}
|
548
|
-
.sb-w-\[100px\] {
|
549
|
-
width: 100px;
|
550
|
-
}
|
551
556
|
.sb-w-\[150px\] {
|
552
557
|
width: 150px;
|
553
558
|
}
|
@@ -563,6 +568,9 @@ video {
|
|
563
568
|
.sb-w-full {
|
564
569
|
width: 100%;
|
565
570
|
}
|
571
|
+
.sb-flex-1 {
|
572
|
+
flex: 1 1 0%;
|
573
|
+
}
|
566
574
|
.sb-border-spacing-x-2 {
|
567
575
|
--tw-border-spacing-x: 0.5rem;
|
568
576
|
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
|
@@ -786,6 +794,11 @@ video {
|
|
786
794
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
787
795
|
transition-duration: 150ms;
|
788
796
|
}
|
797
|
+
.sb-transition-opacity {
|
798
|
+
transition-property: opacity;
|
799
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
800
|
+
transition-duration: 150ms;
|
801
|
+
}
|
789
802
|
.sb-duration-500 {
|
790
803
|
transition-duration: 500ms;
|
791
804
|
}
|
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
@@ -702,7 +702,10 @@ var QualityMenu = ({ width, onClick }) => {
|
|
702
702
|
const quality = JSON.parse(
|
703
703
|
JSON.stringify(source)
|
704
704
|
);
|
705
|
-
|
705
|
+
if (qs) {
|
706
|
+
const el = qs == null ? void 0 : qs.find((ele) => ele.default);
|
707
|
+
el ? setCurrentQualitySrc(el.label) : setCurrentQualitySrc(qs[0].label);
|
708
|
+
}
|
706
709
|
}
|
707
710
|
}, [player]);
|
708
711
|
return /* @__PURE__ */ jsx21(
|
@@ -1101,7 +1104,7 @@ var CurrentTimeTracker = () => {
|
|
1101
1104
|
const { setCurrentTime, player } = useSoftBuildersVideoPlayerContext();
|
1102
1105
|
useEffect11(() => {
|
1103
1106
|
const intervalId = setInterval(() => {
|
1104
|
-
setCurrentTime((player == null ? void 0 : player.currentTime()) || 0);
|
1107
|
+
(player == null ? void 0 : player.currentTime) ? setCurrentTime((player == null ? void 0 : player.currentTime()) || 0) : setCurrentTime(0);
|
1105
1108
|
}, 500);
|
1106
1109
|
return () => clearInterval(intervalId);
|
1107
1110
|
}, [player]);
|
@@ -1259,7 +1262,7 @@ var ControlBar = ({
|
|
1259
1262
|
return /* @__PURE__ */ jsxs13(
|
1260
1263
|
"div",
|
1261
1264
|
{
|
1262
|
-
className: ` !sb-px-4 sb-flex sb-pt-2 sb-justify-center sb-gap-3 sb-w-full sb-h-full ${width > 400 ? "sb-items-end sb-mb-1 " : "sb-items-start"} sb-pb-2`,
|
1265
|
+
className: ` !sb-px-4 sb-flex sb-pt-2 sb-justify-center sb-gap-3 sb-w-full sb-h-full ${width > 400 ? "sb-absolute sb-bottom-1 sb-items-end sb-mb-1 sb-pb-2 " : "sb-items-start"} sb-pb-2`,
|
1263
1266
|
children: [
|
1264
1267
|
/* @__PURE__ */ jsx33(BufferTracker_default, {}),
|
1265
1268
|
/* @__PURE__ */ jsx33(CurrentTimeTracker_default, {}),
|
@@ -1288,7 +1291,7 @@ var ControlBar = ({
|
|
1288
1291
|
/* @__PURE__ */ jsx33(
|
1289
1292
|
"div",
|
1290
1293
|
{
|
1291
|
-
className: `${width < 400 ? "sb-
|
1294
|
+
className: `${width < 400 ? "sb-flex-1 sb-ml-0 sb-mr-0" : "sb-w-full"}`,
|
1292
1295
|
children: /* @__PURE__ */ jsxs13(
|
1293
1296
|
"div",
|
1294
1297
|
{
|
@@ -1297,7 +1300,7 @@ var ControlBar = ({
|
|
1297
1300
|
left: "5%",
|
1298
1301
|
top: "90%"
|
1299
1302
|
} : { width: "98%" },
|
1300
|
-
className: `flex gap-2 ${width < 400 ? "absolute sb-top-1" : "-sb-translate-y-0 sb-w-full"} hover:sb-w-[45%]
|
1303
|
+
className: `flex gap-2 ${width < 400 ? "absolute sb-top-1" : "-sb-translate-y-0 sb-w-full"} hover:sb-w-[45%] `,
|
1301
1304
|
children: [
|
1302
1305
|
/* @__PURE__ */ jsx33(CurrentTimeLabel_default, {}),
|
1303
1306
|
/* @__PURE__ */ jsx33(TimeSliderContainer_default, { chapters, notes }),
|
@@ -1501,6 +1504,7 @@ var VideoPlayerComponent = ({
|
|
1501
1504
|
videoRef.current.appendChild(videoElement);
|
1502
1505
|
videoElement.style.width = "100%";
|
1503
1506
|
videoElement.style.height = "100%";
|
1507
|
+
videoElement.style.objectFit = "cover";
|
1504
1508
|
playerRef.current = videojs(videoElement, options, () => {
|
1505
1509
|
onReady(playerRef.current);
|
1506
1510
|
});
|
@@ -1706,7 +1710,7 @@ var VideoPlayerComponent = ({
|
|
1706
1710
|
};
|
1707
1711
|
updateTimeSeeker();
|
1708
1712
|
}, [(_a = playerRef == null ? void 0 : playerRef.current) == null ? void 0 : _a.currentTime()]);
|
1709
|
-
return /* @__PURE__ */
|
1713
|
+
return /* @__PURE__ */ jsxs14(
|
1710
1714
|
"div",
|
1711
1715
|
{
|
1712
1716
|
ref: videoRefs,
|
@@ -1714,35 +1718,35 @@ var VideoPlayerComponent = ({
|
|
1714
1718
|
onMouseMove: () => {
|
1715
1719
|
handlePlayerClick(event, true);
|
1716
1720
|
},
|
1717
|
-
className: "sb-relative
|
1721
|
+
className: "sb-relative sb-overflow-hidden sb-w-full sb-h-full sb-bottom-2 ",
|
1718
1722
|
onMouseEnter: () => setIsHovered(true),
|
1719
1723
|
onMouseLeave: () => setIsHovered(false),
|
1720
|
-
children:
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
/* @__PURE__ */ jsx35(
|
1724
|
+
children: [
|
1725
|
+
/* @__PURE__ */ jsx35(
|
1726
|
+
"div",
|
1727
|
+
{
|
1728
|
+
className: `sb-h-[3px] sb-transition-opacity sb-duration-500 sb-delay-400 sb-z-10 ease-in-out sb-border-spacing-x-2 sb-absolute sb-bg-[red] sb-bottom-0 ${opacity == "100" ? "sb-opacity-0" : "sb-opacity-100"}`,
|
1729
|
+
style: {
|
1730
|
+
width: timeSeeker
|
1731
|
+
}
|
1732
|
+
}
|
1733
|
+
),
|
1734
|
+
/* @__PURE__ */ jsx35(
|
1735
|
+
"div",
|
1736
|
+
{
|
1737
|
+
className: "hover:sb-cursor-pointer sb-w-full sb-h-full",
|
1738
|
+
"data-vjs-player": true,
|
1739
|
+
children: /* @__PURE__ */ jsx35(
|
1736
1740
|
"div",
|
1737
1741
|
{
|
1738
1742
|
onClick: handlePlayerClick,
|
1739
1743
|
ref: videoRef,
|
1740
|
-
className: "sb-h-full sb-w-full"
|
1744
|
+
className: "sb-h-full sb-w-full sb-relative"
|
1741
1745
|
}
|
1742
1746
|
)
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1747
|
+
}
|
1748
|
+
)
|
1749
|
+
]
|
1746
1750
|
}
|
1747
1751
|
);
|
1748
1752
|
};
|
package/dist/styles/tailwind.css
CHANGED
@@ -517,9 +517,6 @@ video {
|
|
517
517
|
.\!sb-top-8 {
|
518
518
|
top: 2rem !important;
|
519
519
|
}
|
520
|
-
.-sb-bottom-\[1\.5px\] {
|
521
|
-
bottom: -1.5px;
|
522
|
-
}
|
523
520
|
.-sb-left-9 {
|
524
521
|
left: -2.25rem;
|
525
522
|
}
|
@@ -529,9 +526,18 @@ video {
|
|
529
526
|
.-sb-top-1 {
|
530
527
|
top: -0.25rem;
|
531
528
|
}
|
529
|
+
.sb-bottom-0 {
|
530
|
+
bottom: 0px;
|
531
|
+
}
|
532
|
+
.sb-bottom-1 {
|
533
|
+
bottom: 0.25rem;
|
534
|
+
}
|
532
535
|
.sb-bottom-10 {
|
533
536
|
bottom: 2.5rem;
|
534
537
|
}
|
538
|
+
.sb-bottom-2 {
|
539
|
+
bottom: 0.5rem;
|
540
|
+
}
|
535
541
|
.sb-bottom-full {
|
536
542
|
bottom: 100%;
|
537
543
|
}
|
@@ -634,9 +640,6 @@ video {
|
|
634
640
|
.sb-w-5 {
|
635
641
|
width: 1.25rem;
|
636
642
|
}
|
637
|
-
.sb-w-\[100px\] {
|
638
|
-
width: 100px;
|
639
|
-
}
|
640
643
|
.sb-w-\[150px\] {
|
641
644
|
width: 150px;
|
642
645
|
}
|
@@ -652,6 +655,9 @@ video {
|
|
652
655
|
.sb-w-full {
|
653
656
|
width: 100%;
|
654
657
|
}
|
658
|
+
.sb-flex-1 {
|
659
|
+
flex: 1 1 0%;
|
660
|
+
}
|
655
661
|
.sb-border-spacing-x-2 {
|
656
662
|
--tw-border-spacing-x: 0.5rem;
|
657
663
|
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
|
@@ -872,6 +878,11 @@ video {
|
|
872
878
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
873
879
|
transition-duration: 150ms;
|
874
880
|
}
|
881
|
+
.sb-transition-opacity {
|
882
|
+
transition-property: opacity;
|
883
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
884
|
+
transition-duration: 150ms;
|
885
|
+
}
|
875
886
|
.sb-duration-500 {
|
876
887
|
transition-duration: 500ms;
|
877
888
|
}
|
package/dist/types.d.ts
CHANGED