mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-25 11:43:17 +01:00
improve play current segment once
This commit is contained in:
parent
8eebd7ecd6
commit
37931c4d52
@ -940,8 +940,9 @@ function App() {
|
||||
}
|
||||
|
||||
if (playbackModeRef.current != null) {
|
||||
const isSomeSelectedSegmentAtCursor = selectedSegments.some((selectedSegment) => selectedSegment.segId === segmentAtCursorRef.current?.segId);
|
||||
if (!isSomeSelectedSegmentAtCursor) { // if a segment is already at cursor, don't do anything
|
||||
const selectedSegmentAtCursor = selectedSegments.find((selectedSegment) => selectedSegment.segId === segmentAtCursorRef.current?.segId);
|
||||
const isSomeSegmentAtCursor = selectedSegmentAtCursor != null && commandedTimeRef.current != null && selectedSegmentAtCursor.end - commandedTimeRef.current > 0.1;
|
||||
if (!isSomeSegmentAtCursor) { // if a segment is already at cursor, don't do anything
|
||||
if (playbackModeRef.current === 'loop-selected-segments') {
|
||||
const firstSelectedSegment = selectedSegments[0];
|
||||
if (firstSelectedSegment == null) throw new Error();
|
||||
|
Loading…
Reference in New Issue
Block a user