screencastgen

Reader Page

Full-screen browser reader for completed highlight/lip-sync jobs with synchronized playback, word highlighting, and optional presenter video.

Source: web/frontend/src/pages/Reader.tsx Route: /jobs/:id/read


Features


State

State Type Description
manifest ReaderManifest \| null Reader metadata and timed chunks
error string \| null Reader load failure message
loading boolean Initial manifest fetch state
activeIdx number Active flattened word index
playing boolean Current audio playback state
rate number Playback speed
currentTime number Current audio time in seconds
autoScroll boolean Whether reader follows the active word
controlsVisible boolean Visibility of the bottom playback dock
hasStartedPlaying boolean Tracks whether autoplay-style control hiding should activate
theme "night" \| "pdf" Persisted reader color theme
pipWidth number Persisted presenter PiP width
pipPos {x, y} Persisted presenter PiP position
epubStatus EpubExportStatus On-demand EPUB export state
epubError string \| null EPUB export failure detail

API Calls


Interaction Model

  1. Fetch the manifest for the job-specific reader route
  2. Flatten chunk words into a searchable timeline for binary-search lookup
  3. Update activeIdx from audio timeupdate events
  4. Smooth-scroll only when the active word leaves the comfort band
  5. For lip-sync jobs, use the presenter video as the media element; for highlight jobs, use audio
  6. Let users drag the presenter and resize it from the right/bottom edges or bottom-right corner
  7. Cancel automatic scrolling when the user manually scrolls or swipes
  8. Hide the playback dock only after playback has started and the pointer is idle away from the bottom edge

See Also