Skip to content

Commit 90a9af5

Browse files
authored
fix: flicker when region starts at 0:00 (#11)
1 parent 4b634ab commit 90a9af5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Components/Control/Regions.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ function RegionList() {
119119
const isPlaying = createSelector(
120120
currentTime,
121121
(r: Region, { seconds: t }) =>
122-
t >= Math.floor(r.startTime) && t <= Math.ceil(r.endTime),
122+
Math.max(t, 0) >= Math.floor(r.startTime) &&
123+
Math.max(t, 0) <= Math.ceil(r.endTime),
123124
);
124125

125126
const processedRegions = createMemo(() =>

0 commit comments

Comments
 (0)