Transcript Player

View as Markdown

A recording and its transcript together: the spoken line lights up, any line's time plays from there, search marks matches.

Standup, 4 March

  • Ada Okafor38%
  • Wei Chen32%
  • Priya Raman31%
  1. Ada Okafor

    Morning. Quick one today. Wei, how's the export fix?

  2. Wei Chen

    It's merged. The timeout came from a missing index on export jobs. Exports now finish in under two seconds.

  3. Ada Okafor

    Great. Are any customers still waiting?

  4. Wei Chen

    Three. I'll rerun their jobs this morning and reply on each ticket.

  5. Priya Raman

    I can take the replies, if you send me the ticket numbers.

  6. Ada Okafor

    Perfect. Priya, where are we on the checkout redesign?

  7. Priya Raman

    The review notes are in. The pay button color and the contrast on the terms line are fixed. Card marks land tomorrow.

  8. Ada Okafor

    Then let's ship it on Thursday. Thanks, everyone.

When to use

A recording and its transcript together: the spoken line lights up, any line's time plays from there, search marks matches. Use Read Aloud instead when there's no recording, only text to speak.

Usage

import { TranscriptPlayer, type TranscriptSegment } from "./ui/uicontext/components/TranscriptPlayer.ts"
export const Recording = <M>(h: Html.H<M>, src: string, segments: ReadonlyArray<TranscriptSegment>) =>	TranscriptPlayer(h, { props: { label: "Customer call", src, segments } })

Examples

Beside the notes

In a narrow column the controls wrap and the lines keep their times.

Standup notes

4 March · Ada, Wei, Priya

  • Export timeout fixed: a missing index. Exports under 2 s.
  • Wei reruns three customers' jobs; Priya replies on their tickets.
  • Checkout redesign: review notes fixed, card marks tomorrow.
  • Ship checkout on Thursday.

Recording

  • Ada Okafor38%
  • Wei Chen32%
  • Priya Raman31%
  1. Ada Okafor

    Morning. Quick one today. Wei, how's the export fix?

  2. Wei Chen

    It's merged. The timeout came from a missing index on export jobs. Exports now finish in under two seconds.

  3. Ada Okafor

    Great. Are any customers still waiting?

  4. Wei Chen

    Three. I'll rerun their jobs this morning and reply on each ticket.

  5. Priya Raman

    I can take the replies, if you send me the ticket numbers.

  6. Ada Okafor

    Perfect. Priya, where are we on the checkout redesign?

  7. Priya Raman

    The review notes are in. The pay button color and the contrast on the terms line are fixed. Card marks land tomorrow.

  8. Ada Okafor

    Then let's ship it on Thursday. Thanks, everyone.

API reference

Props

TranscriptPlayer props
NameTypeDefaultDescription
labelrequiredstring—What the recording is: "Standup, 4 March".
srcrequiredstring—The audio, or a video played for its sound.
segmentsrequiredTranscriptSegment[]——
idstring"transcript"Starts the ids inside it, unique on the page; "transcript" by default.
localestring—For counts and shares; the browser's by default.

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/transcript-player

Source