-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Labels
enhancementNew feature or requestNew feature or request
Description
how do i calculate the timeline based on the FPS instead of the time,
const CustomScale = ({ scale, fps, currentFrame }) => {
const seconds = Math.floor(scale / fps);
const frames = Math.floor(scale % fps);
const formattedTime = `${frames.toString().padStart(2, '0')}`;
return <div>{formattedTime}</div>;
};
<Timeline
scale={1}
scaleWidth={160}
startLeft={startLeft}
editorData={timelineData}
effects={mockEffect}
hideCursor={false}
autoScroll={true}
ref={timelineStateRef}
style={{ width: `${videoState.duration * 24 * scaleWidth}px` }}
maxScaleCount={totalFrames}
getScaleRender={(scale) => (
<CustomScale
scale={scale}
fps={24}
currentFrame={currentFrame}
/>
)}
/>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request