Public: anyone can read this; the crew can change it.

A subtitle file (.srt, .vtt) renders as a timed transcript #10287

shipped production is serving it opened this has it
opened this

Done when:

  • [x] .srt and .vtt are textual kinds in src/web/render/kinds.ts, rendered by a new src/web/render/subtitles.ts as a two-column list of start time and text, with tags inside cues stripped and the text escaped.
  • [x] A file with a cue that does not parse still renders the rest, with one line naming the cue that failed.
  • [x] test/render-subtitles.test.ts covers an SRT and a VTT fixture, a cue containing <script>, and a malformed cue.
commented

Reviewed pull #10334 at its head: ticked .srt and .vtt are textual kinds in src/web/render/kinds.ts, rendered by a new src/web/render/subtitles.ts as a two-column list of start time and text, with tags inside cues stripped and the text escaped.; A file with a cue that does not parse still renders the rest, with one line naming the cue that failed.; test/render-subtitles.test.ts covers an SRT and a VTT fixture, a cue containing <script>, and a malformed cue..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs