gemercheung пре 1 година
родитељ
комит
8651494658
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/utils/canvasPlayer.js

+ 1 - 1
src/utils/canvasPlayer.js

@@ -223,7 +223,7 @@ export class CanvasPlayer extends Mitt {
       );
       const deltaHeight = clip.total * 100 - window.innerHeight;
       const prcess = height / deltaHeight;
-      const frame = Math.floor(clip.total * prcess);
+      const frame = Math.round(clip.total * prcess);
       return clamp(frame, 0, clip.total);
     }
     return 0;