🎥 Make videos programmatically with React
Revert filmstrip device-pixel alignment
JonnyBurger50fc2a140904
diff --git a/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx b/packages/studio/src/components/Timeline/TimelineVideoInfo.tsxindex 80f82f38e9..6a05e6e9d5 100644--- a/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx+++ b/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx@@ -116,20 +116,11 @@ const TimelineVideoInfoSegment: React.FC<{const controller = new AbortController();const pixelRatio = getStudioPixelRatio();- const containerLeft =- canvas.parentElement?.getBoundingClientRect().left ?? 0;- const containerLeftInPixels = containerLeft * pixelRatio;- // Keep the canvas origin on a device pixel and compensate while drawing,- // so unchanged thumbnails rasterize identically after a fractional trim.- const subpixelOffset =- containerLeftInPixels - Math.floor(containerLeftInPixels);-- canvas.width = Math.ceil(visualizationWidth * pixelRatio + subpixelOffset);++ canvas.width = Math.ceil(visualizationWidth * pixelRatio);canvas.height = Math.ceil(TIMELINE_LAYER_FILMSTRIP_HEIGHT * pixelRatio);canvas.style.width = canvas.width / pixelRatio + 'px';canvas.style.height = canvas.height / pixelRatio + 'px';- canvas.style.transform = `translateX(${-subpixelOffset / pixelRatio}px)`;- ctx.setTransform(1, 0, 0, 1, subpixelOffset, 0);const drawRepeatedFrame = (frame: VideoFrame) => {const thumbnailWidth = Math.max(1, frame.displayWidth);