meyonmoviedo commited on
Commit
9e2aca4
·
verified ·
1 Parent(s): 045dcab

try multiple trim 2

Browse files
Files changed (1) hide show
  1. src/App.tsx +1 -1
src/App.tsx CHANGED
@@ -1150,7 +1150,7 @@ function TrimModal({ file, onClose, onTrimStarted }: {
1150
  const id = `seg_${Math.random().toString(16).slice(2)}`;
1151
  const lastEnd = segments.length ? hmsToSeconds(segments[segments.length - 1].end) : 0;
1152
  const nextStart = duration ? Math.min(lastEnd, Math.floor(duration - 1)) : lastEnd;
1153
- const nextEnd = duration ? secondsToHms(Math.min(Math.floor(duration), nextStart + 10)) : "00:00:10";
1154
  const newSegment = { id, start: secondsToHms(nextStart), end: nextEnd };
1155
  setSegments((prev) => [...prev, newSegment]);
1156
  setActiveSegmentId(id);
 
1150
  const id = `seg_${Math.random().toString(16).slice(2)}`;
1151
  const lastEnd = segments.length ? hmsToSeconds(segments[segments.length - 1].end) : 0;
1152
  const nextStart = duration ? Math.min(lastEnd, Math.floor(duration - 1)) : lastEnd;
1153
+ const nextEnd = duration ? secondsToHms(Math.floor(duration)) : "00:00:00";
1154
  const newSegment = { id, start: secondsToHms(nextStart), end: nextEnd };
1155
  setSegments((prev) => [...prev, newSegment]);
1156
  setActiveSegmentId(id);