Transcripts
Transcript renders a clickable transcript for a linked player: clicking a cue seeks to it (starting playback if paused), the cue under the playhead is highlighted and kept scrolled into view, and auto-scroll pauses while your pointer is over the list.
Unlike captions, it works on every platform, embeds included - it only needs the current time and seek, both of which every adapter provides.
<VideoPlayer ref="itemRef" src="..." />
<Transcript
:player="itemRef"
:cues="[
{ time: 0, text: 'Opening titles - birds sing over a meadow.' },
{ time: 95, end: 110, text: 'He stops to smell a flower.' },
{ time: 555, text: 'Peace returns to the meadow.' },
]"
/>
<ml-video-player id="my-player" src="..."></ml-video-player>
<!-- `for` points at the player's id; cues go in as an inline JSON string -->
<ml-video-transcript
for="my-player"
cues='[
{"time":0,"text":"Opening titles - birds sing over a meadow."},
{"time":95,"end":110,"text":"He stops to smell a flower."},
{"time":555,"text":"Peace returns to the meadow."}
]'
></ml-video-transcript>
Loading player…
end is optional - when set, nothing is highlighted between that cue's end and the next cue's start. In Vue, a scoped slot ({ cue, index, isActive, formatTime }) customises each cue's markup.
Spoken readout
Where the browser supports the Web Speech API, the transcript carries a readout toggle that speaks each cue aloud as the playhead reaches it. It mutes the player while enabled, and restores the sound when switched off - but only if the toggle was what muted it, leaving a mute you set yourself alone.
Unmuting from anywhere else (a MuteButton, the built-in HUD) switches the readout off rather than competing with now-audible video. The button hides itself entirely where speechSynthesis is unavailable.