AFTERIMAGE: A Temporal Lens for Video.js Frame ComparisonAFTERIMAGE: A Temporal Lens for Video.js Frame Comparison
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
I built AFTERIMAGE around one question: what if a video player could make the passage of time visible without turning the player into a different kind of application?
The core interaction is called Temporal Lens. A viewer can pin one real decoded frame from the currently playing video. Playback continues normally underneath it. The pinned frame stays spatially registered with the moving picture, while a single reveal seam lets the viewer compare past and present directly inside the same player.
There is no second synchronized player, no fake before-and-after image, and no hidden playback timeline driving the comparison. The reference is captured from the actual rendered video frame into one bounded canvas. The normal Video.js timeline remains authoritative. The current playhead continues moving, the pinned moment is marked independently on the real seek rail, and the player shows the signed distance between Pinned and Now.
That separation was important to me. Temporal Lens is a visual layer, not a replacement transport system. Manual pinning does not call play(), pause(), or mutate currentTime. Moving the seam does not seek the media and generates no application network requests. Close hides the comparison but retains the reference. Compare restores it. Clear removes it. Pinned, Split, and Now are simply different presentations of the same captured frame.
THE WATERLINE was created specifically to make this interaction understandable in seconds. The same locked architecture is dry at 00:05 and wet at 00:13. The final submission image therefore shows a real 00:05 pinned frame against the 00:13 current frame with a +00:08 interval. The purpose of the film is not to decorate the skin. It gives the interaction a visual reason to exist.
I also treated AFTERIMAGE as a reusable Video.js v10 skin rather than a challenge-specific demo. The enhanced package can be installed in an unrelated host with its own video, poster, captions, theme, chapters, and media provider. There is also a separate base export that mounts the conventional player without Temporal Lens at all. In testing I installed the packed package into a clean external application with unrelated generated media and ran two independent AFTERIMAGE instances at the same time.
A lot of the work went into lifecycle correctness. The implementation explicitly handles metadata pending states, seeking, missing pictures, ended-but-capturable video, unstable duration, source removal, source replacement, live or DVR-like timelines, failed re-pins, stale asynchronous frame callbacks, same-URL reloads, disposal, and reconnects. Two players remain isolated from each other, and repeated detach and remount stress does not accumulate reference canvases or allow stale frame work to overwrite newer state.
Accessibility became a product-level part of the design rather than a checklist item. The primary controls meet 44px target sizing. Keyboard focus is deterministic. Escape closes the comparison and returns focus to Compare. Reduced-motion behavior is supported. Touch interaction preserves vertical page scrolling.
One subtle accessibility problem appeared during hardening: because the captured reference canvas intentionally sits above the moving video, a browser-rendered caption could be partially covered by the pinned image. I changed the architecture so the real WebVTT track remains in showing mode, while its active cue is visually mirrored above the comparison layer only when Temporal Lens is open. Native visual cue paint is suppressed only during that state and restored immediately on Close. The resulting comparison caption measured 16.61:1 contrast both inline and in real wrapper fullscreen.
The final hardened build passed Chromium, Firefox, and desktop WebKit regression coverage, plus dedicated keyboard, touch, fullscreen, lifecycle, difficult-media, external-package, first-use, and performance gates. The official headed accessibility pass completed 48/48 checks.
The performance model is intentionally simple. AFTERIMAGE keeps one reusable reference canvas instead of accumulating frame history. In CI the enhanced JavaScript added roughly 4 KB gzip over the base package. A 1279×719 reference uses about 3.68 MB of raw RGBA memory. Two hundred seam updates completed in roughly 2.6 ms of scripting time, with zero seam-generated seeking events and zero seam-generated application network requests.
The submission also demonstrates the skin outside THE WATERLINE. A separate Aafnai Patro page uses AFTERIMAGE with a different Apollo 11 visualization delivered from Mux, its own theme, poster, captions, chapters, navigation, and manual pinning. That was important because I wanted the concept to survive outside the story it was originally designed around.
The result is intentionally restrained. AFTERIMAGE does not try to replace familiar video controls with a new interaction model. Play, seek, time, volume, captions, and fullscreen remain recognizable Video.js controls.
It adds one idea:
Remember one real frame, keep time moving, and let the viewer see what changed.
Post image
Post image
Denis's avatar
Pinning a real frame so you can see time passing, Temporal Lens is a cool idea.
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started