Timed comments that cross the video as clickable DOM

Each comment below is an HTML element that the canvas draws over the video, at a position worked out from the time of the video frame. Press Play. Tap a comment to stop it and open its Like button. Write one of your own and it's added at the current time.

0:00.0

The video hasn't been played yet.

Show the code comments as cues, one element each, placed per frame
  1. The markup. The video and a control bar are children of the canvas. Comment elements are added beside them.
  2. Store comments as cues. video.addTextTrack('metadata') makes a track that is never shown. Each comment is a VTTCue whose text is JSON.
  3. One element per active cue. The same library as the captions page, with a render function that makes a comment.
  4. The comment element. A drawable div holding buttons.
  5. Where a comment is at a time. A function of the media time, so the same time always gives the same picture.
  6. Draw. One drawElementImage() call per comment, inside a transform. The call also moves the element's hit-test region.
  7. Taps. Ordinary click handlers on the buttons.
  8. Export. exportFrames() seeks the video frame by frame, and onframe chooses the comments for each time.
  9. The CSS.

How it works

Live checks

Each check builds its own small video and canvas in a corner of the window. The player above isn't touched.

ResultExperimentDetail

Findings

From Chromium 157 headless with software video decoding, 2026-11-21. The rows above say what your browser does.