🎥 Make videos programmatically with React
Fix 1px gaps between timeline video thumbnails (#6948)
Jonny Burger35d00b674edf
diff --git a/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx b/packages/studio/src/components/Timeline/TimelineVideoInfo.tsxindex 523f98384d..96c9ed527c 100644--- a/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx+++ b/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx@@ -139,15 +139,15 @@ const drawSlot = ({const relativeTimestamp = timestamp - fromSeconds * WEBCODECS_TIMESCALE;const frameIndex = relativeTimestamp / durationOfOneFrame;- const left = Math.floor(- (frameIndex * frame.displayWidth) / window.devicePixelRatio,- ); // round to avoid antialiasing+ const thumbnailWidth = frame.displayWidth / window.devicePixelRatio;+ const left = Math.floor(frameIndex * thumbnailWidth);+ const right = Math.ceil((frameIndex + 1) * thumbnailWidth);ctx.drawImage(frame,left,0,- frame.displayWidth / window.devicePixelRatio,+ right - left,frame.displayHeight / window.devicePixelRatio,);filledSlots.set(timestamp, frame.timestamp);