softbuilders-react-video-player
Advanced tools
Comparing version 1.1.52 to 1.1.53
@@ -50,3 +50,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
}, [duration]); | ||
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 ? "sb-items-end sb-mb-1 " : "sb-items-start"} sb-pb-2`, children: [_jsx(BufferTracker, {}), _jsx(CurrentTimeTracker, {}), _jsx("button", { onClick: () => { | ||
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 | ||
? "sb-absolute sb-bottom-1 sb-items-end sb-mb-1 sb-pb-2 " | ||
: "sb-items-start"} sb-pb-2`, children: [_jsx(BufferTracker, {}), _jsx(CurrentTimeTracker, {}), _jsx("button", { onClick: () => { | ||
seek(-seekStep); | ||
@@ -59,3 +61,3 @@ }, 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) => { | ||
// width > 400 && | ||
_jsx("div", { className: `${width < 400 ? "sb-w-[100px] sb-ml-0 sb-mr-0" : "sb-w-full"}`, children: _jsxs("div", { style: width < 400 | ||
_jsx("div", { className: `${width < 400 ? "sb-flex-1 sb-ml-0 sb-mr-0" : "sb-w-full"}`, children: _jsxs("div", { style: width < 400 | ||
? { | ||
@@ -62,0 +64,0 @@ width: `${width * 0.9}px`, |
@@ -8,3 +8,5 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime"; | ||
const intervalId = setInterval(() => { | ||
setCurrentTime((player === null || player === void 0 ? void 0 : player.currentTime()) || 0); | ||
(player === null || player === void 0 ? void 0 : player.currentTime) | ||
? setCurrentTime((player === null || player === void 0 ? void 0 : player.currentTime()) || 0) | ||
: setCurrentTime(0); | ||
}, 500); | ||
@@ -11,0 +13,0 @@ // Cleanup function to clear the interval |
@@ -87,2 +87,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
videoElement.style.height = "100%"; | ||
videoElement.style.objectFit = "cover"; | ||
playerRef.current = videojs(videoElement, options, () => { | ||
@@ -280,9 +281,9 @@ onReady(playerRef.current); | ||
}, [(_a = playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) === null || _a === void 0 ? void 0 : _a.currentTime()]); | ||
return (_jsx("div", { ref: videoRefs, id: `video-container-${id}`, onMouseMove: () => { | ||
return (_jsxs("div", { ref: videoRefs, id: `video-container-${id}`, onMouseMove: () => { | ||
handlePlayerClick(event, true); | ||
}, className: "sb-relative sb-rounded-md sb-overflow-hidden sb-w-full sb-h-full ", onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: _jsxs("div", { className: "hover:sb-cursor-pointer sb-w-full sb-h-full", "data-vjs-player": true, children: [_jsx("div", { 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] ${opacity == "100" ? "sb-opacity-0" : "sb-opacity-100"}`, style: { | ||
width: timeSeeker, | ||
} }), _jsx("div", { onClick: handlePlayerClick, ref: videoRef, className: "sb-h-full sb-w-full" })] }) })); | ||
}, 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: { | ||
width: timeSeeker, | ||
} }), _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" }) })] })); | ||
}; | ||
export default VideoPlayerComponent; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "softbuilders-react-video-player", | ||
"description": "Standalone video player component", | ||
"version": "1.1.52", | ||
"version": "1.1.53", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "types": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
321064
7016