try multiple trim 2
Browse files- 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.
|
| 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);
|