Skip to content

The agent that grows with you

fix(desktop): defer transcript video loading

Yuan Li79741737081c
diff --git a/apps/desktop/src/components/chat/transcript-video.test.tsx b/apps/desktop/src/components/chat/transcript-video.test.tsx
index 7242a8d98dd..c1f67e39ca4 100644
--- a/apps/desktop/src/components/chat/transcript-video.test.tsx
+++ b/apps/desktop/src/components/chat/transcript-video.test.tsx
@@ -23,6 +23,7 @@ describe('video playback speed preference', () => {
const video = container.querySelector('video')!
expect(video.playbackRate).toBe(1)
+ expect(video.preload).toBe('none')
// The user picks 2x in the native controls' rate menu.
video.playbackRate = 2
diff --git a/apps/desktop/src/components/chat/transcript-video.tsx b/apps/desktop/src/components/chat/transcript-video.tsx
index e5cbd4151af..65ec41b82e6 100644
--- a/apps/desktop/src/components/chat/transcript-video.tsx
+++ b/apps/desktop/src/components/chat/transcript-video.tsx
@@ -104,5 +104,5 @@ export function TranscriptVideo(props: ComponentProps<'video'>) {
}
}, [])
- return <video onRateChange={onRateChange} ref={videoRef} {...props} />
+ return <video onRateChange={onRateChange} ref={videoRef} {...props} preload={props.preload ?? 'none'} />
}