@optifye/dashboard-core 6.6.8 → 6.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -16
- package/dist/index.mjs +16 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5959,6 +5959,8 @@ interface CroppedVideoPlayerProps extends VideoPlayerProps {
|
|
|
5959
5959
|
crop?: CropConfig | null;
|
|
5960
5960
|
/** Whether to show debug info */
|
|
5961
5961
|
debug?: boolean;
|
|
5962
|
+
/** Optional click handler for the video container */
|
|
5963
|
+
onClick?: () => void;
|
|
5962
5964
|
}
|
|
5963
5965
|
/**
|
|
5964
5966
|
* Video player with canvas-based cropping capability
|
package/dist/index.d.ts
CHANGED
|
@@ -5959,6 +5959,8 @@ interface CroppedVideoPlayerProps extends VideoPlayerProps {
|
|
|
5959
5959
|
crop?: CropConfig | null;
|
|
5960
5960
|
/** Whether to show debug info */
|
|
5961
5961
|
debug?: boolean;
|
|
5962
|
+
/** Optional click handler for the video container */
|
|
5963
|
+
onClick?: () => void;
|
|
5962
5964
|
}
|
|
5963
5965
|
/**
|
|
5964
5966
|
* Video player with canvas-based cropping capability
|
package/dist/index.js
CHANGED
|
@@ -4053,7 +4053,7 @@ var S3ClipsSupabaseService = class {
|
|
|
4053
4053
|
description: this.getDescriptionFromClipType(clip.clip_type_name),
|
|
4054
4054
|
type: clip.clip_type_name,
|
|
4055
4055
|
originalUri: `clips:${clip.clip_id}`,
|
|
4056
|
-
cycle_time_seconds: clip.metadata?.request?.metadata?.cycle_time ? clip.metadata.request.metadata.cycle_time / 20 : void 0,
|
|
4056
|
+
cycle_time_seconds: clip.metadata?.request?.metadata?.cycle_time ? clip.metadata.request.metadata.cycle_time / (clip.metadata?.playlist?.fps || 20) : void 0,
|
|
4057
4057
|
creation_timestamp: clip.created_at,
|
|
4058
4058
|
percentile: clip.cycle_time_percentile || clip.idle_time_percentile
|
|
4059
4059
|
}));
|
|
@@ -27633,6 +27633,7 @@ VideoPlayer.displayName = "VideoPlayer";
|
|
|
27633
27633
|
var CroppedVideoPlayer = React21.forwardRef(({
|
|
27634
27634
|
crop,
|
|
27635
27635
|
debug = false,
|
|
27636
|
+
onClick,
|
|
27636
27637
|
...videoProps
|
|
27637
27638
|
}, ref) => {
|
|
27638
27639
|
const videoContainerRef = React21.useRef(null);
|
|
@@ -27650,7 +27651,9 @@ var CroppedVideoPlayer = React21.forwardRef(({
|
|
|
27650
27651
|
}
|
|
27651
27652
|
}, []);
|
|
27652
27653
|
React21.useImperativeHandle(ref, () => ({
|
|
27653
|
-
|
|
27654
|
+
get player() {
|
|
27655
|
+
return hiddenVideoRef.current?.player || null;
|
|
27656
|
+
},
|
|
27654
27657
|
play: () => hiddenVideoRef.current?.play() || void 0,
|
|
27655
27658
|
pause: () => hiddenVideoRef.current?.pause(),
|
|
27656
27659
|
currentTime: (time2) => {
|
|
@@ -27667,7 +27670,9 @@ var CroppedVideoPlayer = React21.forwardRef(({
|
|
|
27667
27670
|
hiddenVideoRef.current?.dispose();
|
|
27668
27671
|
stopCanvasRendering();
|
|
27669
27672
|
},
|
|
27670
|
-
|
|
27673
|
+
get isReady() {
|
|
27674
|
+
return hiddenVideoRef.current?.isReady || false;
|
|
27675
|
+
}
|
|
27671
27676
|
}), [stopCanvasRendering]);
|
|
27672
27677
|
const calculateCanvasDimensions = React21.useCallback(() => {
|
|
27673
27678
|
if (!crop || !videoContainerRef.current) return;
|
|
@@ -27795,7 +27800,8 @@ var CroppedVideoPlayer = React21.forwardRef(({
|
|
|
27795
27800
|
"div",
|
|
27796
27801
|
{
|
|
27797
27802
|
ref: videoContainerRef,
|
|
27798
|
-
className: `relative w-full h-full flex items-center justify-center bg-black ${videoProps.className || ""}`,
|
|
27803
|
+
className: `relative w-full h-full flex items-center justify-center bg-black ${onClick ? "cursor-pointer" : ""} ${videoProps.className || ""}`,
|
|
27804
|
+
onClick,
|
|
27799
27805
|
children: [
|
|
27800
27806
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27801
27807
|
VideoPlayer,
|
|
@@ -27824,9 +27830,7 @@ var CroppedVideoPlayer = React21.forwardRef(({
|
|
|
27824
27830
|
style: {
|
|
27825
27831
|
display: isVideoReady ? "block" : "none",
|
|
27826
27832
|
width: `${canvasDimensions.width}px`,
|
|
27827
|
-
height: `${canvasDimensions.height}px
|
|
27828
|
-
pointerEvents: "none"
|
|
27829
|
-
// Allow clicks to pass through to controls
|
|
27833
|
+
height: `${canvasDimensions.height}px`
|
|
27830
27834
|
}
|
|
27831
27835
|
}
|
|
27832
27836
|
),
|
|
@@ -28559,7 +28563,6 @@ var FileManagerFilters = ({
|
|
|
28559
28563
|
hour12: false,
|
|
28560
28564
|
hour: "2-digit",
|
|
28561
28565
|
minute: "2-digit",
|
|
28562
|
-
second: "2-digit",
|
|
28563
28566
|
timeZone: timezone
|
|
28564
28567
|
// Use database timezone for display
|
|
28565
28568
|
});
|
|
@@ -30101,6 +30104,7 @@ var BottlenecksContent = ({
|
|
|
30101
30104
|
src: currentVideo.src,
|
|
30102
30105
|
className: "w-full h-full",
|
|
30103
30106
|
crop: workspaceCrop?.crop || null,
|
|
30107
|
+
onClick: togglePlayback,
|
|
30104
30108
|
autoplay: true,
|
|
30105
30109
|
playsInline: true,
|
|
30106
30110
|
loop: false,
|
|
@@ -30125,13 +30129,6 @@ var BottlenecksContent = ({
|
|
|
30125
30129
|
),
|
|
30126
30130
|
(isTransitioning || isVideoBuffering && isInitialLoading) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black", children: /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
30127
30131
|
!isTransitioning && isVideoBuffering && !isInitialLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
30128
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30129
|
-
"div",
|
|
30130
|
-
{
|
|
30131
|
-
className: "absolute inset-0 z-10 cursor-pointer",
|
|
30132
|
-
onClick: togglePlayback
|
|
30133
|
-
}
|
|
30134
|
-
),
|
|
30135
30132
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/80 text-white p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center max-w-md", children: [
|
|
30136
30133
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-16 h-16 mx-auto mb-4 text-red-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.732-.833-2.5 0L4.268 16.5c-.77.833.192 2.5 1.732 2.5z" }) }),
|
|
30137
30134
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold mb-2", children: "Video Stream Error" }),
|
|
@@ -30177,7 +30174,10 @@ var BottlenecksContent = ({
|
|
|
30177
30174
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30178
30175
|
"button",
|
|
30179
30176
|
{
|
|
30180
|
-
onClick:
|
|
30177
|
+
onClick: (e) => {
|
|
30178
|
+
e.stopPropagation();
|
|
30179
|
+
togglePlayback();
|
|
30180
|
+
},
|
|
30181
30181
|
className: "p-1.5 hover:bg-white/20 rounded-full focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
30182
30182
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
30183
30183
|
children: isPlaying ? /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 00-1 1v2a1 1 0 102 0V9a1 1 0 00-1-1zm5 0a1 1 0 00-1 1v2a1 1 0 102 0V9a1 1 0 00-1-1z", clipRule: "evenodd" }) }) : /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8.118l-.001 3.764a1 1 0 001.555.832l3.196-1.882a1 1 0 000-1.664l-3.196-1.882z", clipRule: "evenodd" }) })
|
package/dist/index.mjs
CHANGED
|
@@ -4023,7 +4023,7 @@ var S3ClipsSupabaseService = class {
|
|
|
4023
4023
|
description: this.getDescriptionFromClipType(clip.clip_type_name),
|
|
4024
4024
|
type: clip.clip_type_name,
|
|
4025
4025
|
originalUri: `clips:${clip.clip_id}`,
|
|
4026
|
-
cycle_time_seconds: clip.metadata?.request?.metadata?.cycle_time ? clip.metadata.request.metadata.cycle_time / 20 : void 0,
|
|
4026
|
+
cycle_time_seconds: clip.metadata?.request?.metadata?.cycle_time ? clip.metadata.request.metadata.cycle_time / (clip.metadata?.playlist?.fps || 20) : void 0,
|
|
4027
4027
|
creation_timestamp: clip.created_at,
|
|
4028
4028
|
percentile: clip.cycle_time_percentile || clip.idle_time_percentile
|
|
4029
4029
|
}));
|
|
@@ -27603,6 +27603,7 @@ VideoPlayer.displayName = "VideoPlayer";
|
|
|
27603
27603
|
var CroppedVideoPlayer = forwardRef(({
|
|
27604
27604
|
crop,
|
|
27605
27605
|
debug = false,
|
|
27606
|
+
onClick,
|
|
27606
27607
|
...videoProps
|
|
27607
27608
|
}, ref) => {
|
|
27608
27609
|
const videoContainerRef = useRef(null);
|
|
@@ -27620,7 +27621,9 @@ var CroppedVideoPlayer = forwardRef(({
|
|
|
27620
27621
|
}
|
|
27621
27622
|
}, []);
|
|
27622
27623
|
useImperativeHandle(ref, () => ({
|
|
27623
|
-
|
|
27624
|
+
get player() {
|
|
27625
|
+
return hiddenVideoRef.current?.player || null;
|
|
27626
|
+
},
|
|
27624
27627
|
play: () => hiddenVideoRef.current?.play() || void 0,
|
|
27625
27628
|
pause: () => hiddenVideoRef.current?.pause(),
|
|
27626
27629
|
currentTime: (time2) => {
|
|
@@ -27637,7 +27640,9 @@ var CroppedVideoPlayer = forwardRef(({
|
|
|
27637
27640
|
hiddenVideoRef.current?.dispose();
|
|
27638
27641
|
stopCanvasRendering();
|
|
27639
27642
|
},
|
|
27640
|
-
|
|
27643
|
+
get isReady() {
|
|
27644
|
+
return hiddenVideoRef.current?.isReady || false;
|
|
27645
|
+
}
|
|
27641
27646
|
}), [stopCanvasRendering]);
|
|
27642
27647
|
const calculateCanvasDimensions = useCallback(() => {
|
|
27643
27648
|
if (!crop || !videoContainerRef.current) return;
|
|
@@ -27765,7 +27770,8 @@ var CroppedVideoPlayer = forwardRef(({
|
|
|
27765
27770
|
"div",
|
|
27766
27771
|
{
|
|
27767
27772
|
ref: videoContainerRef,
|
|
27768
|
-
className: `relative w-full h-full flex items-center justify-center bg-black ${videoProps.className || ""}`,
|
|
27773
|
+
className: `relative w-full h-full flex items-center justify-center bg-black ${onClick ? "cursor-pointer" : ""} ${videoProps.className || ""}`,
|
|
27774
|
+
onClick,
|
|
27769
27775
|
children: [
|
|
27770
27776
|
/* @__PURE__ */ jsx("div", { className: "hidden", children: /* @__PURE__ */ jsx(
|
|
27771
27777
|
VideoPlayer,
|
|
@@ -27794,9 +27800,7 @@ var CroppedVideoPlayer = forwardRef(({
|
|
|
27794
27800
|
style: {
|
|
27795
27801
|
display: isVideoReady ? "block" : "none",
|
|
27796
27802
|
width: `${canvasDimensions.width}px`,
|
|
27797
|
-
height: `${canvasDimensions.height}px
|
|
27798
|
-
pointerEvents: "none"
|
|
27799
|
-
// Allow clicks to pass through to controls
|
|
27803
|
+
height: `${canvasDimensions.height}px`
|
|
27800
27804
|
}
|
|
27801
27805
|
}
|
|
27802
27806
|
),
|
|
@@ -28529,7 +28533,6 @@ var FileManagerFilters = ({
|
|
|
28529
28533
|
hour12: false,
|
|
28530
28534
|
hour: "2-digit",
|
|
28531
28535
|
minute: "2-digit",
|
|
28532
|
-
second: "2-digit",
|
|
28533
28536
|
timeZone: timezone
|
|
28534
28537
|
// Use database timezone for display
|
|
28535
28538
|
});
|
|
@@ -30071,6 +30074,7 @@ var BottlenecksContent = ({
|
|
|
30071
30074
|
src: currentVideo.src,
|
|
30072
30075
|
className: "w-full h-full",
|
|
30073
30076
|
crop: workspaceCrop?.crop || null,
|
|
30077
|
+
onClick: togglePlayback,
|
|
30074
30078
|
autoplay: true,
|
|
30075
30079
|
playsInline: true,
|
|
30076
30080
|
loop: false,
|
|
@@ -30095,13 +30099,6 @@ var BottlenecksContent = ({
|
|
|
30095
30099
|
),
|
|
30096
30100
|
(isTransitioning || isVideoBuffering && isInitialLoading) && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
30097
30101
|
!isTransitioning && isVideoBuffering && !isInitialLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
30098
|
-
/* @__PURE__ */ jsx(
|
|
30099
|
-
"div",
|
|
30100
|
-
{
|
|
30101
|
-
className: "absolute inset-0 z-10 cursor-pointer",
|
|
30102
|
-
onClick: togglePlayback
|
|
30103
|
-
}
|
|
30104
|
-
),
|
|
30105
30102
|
error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/80 text-white p-4", children: /* @__PURE__ */ jsxs("div", { className: "text-center max-w-md", children: [
|
|
30106
30103
|
/* @__PURE__ */ jsx("svg", { className: "w-16 h-16 mx-auto mb-4 text-red-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.732-.833-2.5 0L4.268 16.5c-.77.833.192 2.5 1.732 2.5z" }) }),
|
|
30107
30104
|
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Video Stream Error" }),
|
|
@@ -30147,7 +30144,10 @@ var BottlenecksContent = ({
|
|
|
30147
30144
|
/* @__PURE__ */ jsx(
|
|
30148
30145
|
"button",
|
|
30149
30146
|
{
|
|
30150
|
-
onClick:
|
|
30147
|
+
onClick: (e) => {
|
|
30148
|
+
e.stopPropagation();
|
|
30149
|
+
togglePlayback();
|
|
30150
|
+
},
|
|
30151
30151
|
className: "p-1.5 hover:bg-white/20 rounded-full focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
30152
30152
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
30153
30153
|
children: isPlaying ? /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 00-1 1v2a1 1 0 102 0V9a1 1 0 00-1-1zm5 0a1 1 0 00-1 1v2a1 1 0 102 0V9a1 1 0 00-1-1z", clipRule: "evenodd" }) }) : /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8.118l-.001 3.764a1 1 0 001.555.832l3.196-1.882a1 1 0 000-1.664l-3.196-1.882z", clipRule: "evenodd" }) })
|