Summary
I'd like to contribute typing animation support to ray.so, so code snippets can be
previewed and exported as short videos in addition to static images.
The main goal is to let users turn the current snippet into a polished typing animation
with configurable timing and export it as a browser-generated WebM video.
Before opening a PR, I wanted to check whether this direction is aligned with the project.
Proposed feature
Add typing animation support for code snippets with:
- preview playback on the existing code frame
- configurable duration
- configurable frame rate
- optional typing cursor
- configurable export size
- WebM export
What I have in mind
From an implementation perspective, the feature would include:
- a typing animation dialog with preview/export controls
- deterministic frame-based rendering instead of real-time recording
- fixed-timestamp WebM export using WebCodecs
- a render-state handshake with the highlighted code layer, so export waits for syntax
rendering before capturing each frame
- a faster export path by caching the static frame and only re-rendering the dynamic code
layer for each typing step
UX / product direction
I also explored a cleaner separation between static and animated outputs:
Code Images for PNG/SVG/link export
Code Videos for typing animation preview/export
The idea there is to keep both experiences focused while sharing the same rendering core.
That said, I understand this may be too large for a first PR. If preferred, I can scope
the initial contribution down to:
- adding typing animation export inside the existing code tool
- keeping
Code Videos / route split as a follow-up discussion
Notes
A few implementation details I already ran into:
MediaRecorder / real-time capture produced incorrect timing and stutter
- the more reliable approach was fixed-frame export with explicit timestamps
webm-muxer appears deprecated, so I switched to Mediabunny for WebM output
Questions
Would you be open to this feature?
If yes, would you prefer:
- a smaller first PR that adds typing animation export inside the current
Code Images
flow
- a larger refactor that introduces a separate
Code Videos surface with shared
rendering infrastructure
I'm happy to scope it however you'd prefer before opening the PR.
Screenshots / Demo
I can also attach a short demo of the current prototype.
Suggested attachments:
- a screenshot of the typing animation export dialog
- a short GIF/video showing the typing preview or exported result



Summary
I'd like to contribute typing animation support to
ray.so, so code snippets can bepreviewed and exported as short videos in addition to static images.
The main goal is to let users turn the current snippet into a polished typing animation
with configurable timing and export it as a browser-generated WebM video.
Before opening a PR, I wanted to check whether this direction is aligned with the project.
Proposed feature
Add typing animation support for code snippets with:
What I have in mind
From an implementation perspective, the feature would include:
rendering before capturing each frame
layer for each typing step
UX / product direction
I also explored a cleaner separation between static and animated outputs:
Code Imagesfor PNG/SVG/link exportCode Videosfor typing animation preview/exportThe idea there is to keep both experiences focused while sharing the same rendering core.
That said, I understand this may be too large for a first PR. If preferred, I can scope
the initial contribution down to:
Code Videos/ route split as a follow-up discussionNotes
A few implementation details I already ran into:
MediaRecorder/ real-time capture produced incorrect timing and stutterwebm-muxerappears deprecated, so I switched toMediabunnyfor WebM outputQuestions
Would you be open to this feature?
If yes, would you prefer:
Code Imagesflow
Code Videossurface with sharedrendering infrastructure
I'm happy to scope it however you'd prefer before opening the PR.
Screenshots / Demo
I can also attach a short demo of the current prototype.
Suggested attachments: