PresentationTranscript

Read-only transcript renderer for presentation mode.

Constructor

new PresentationTranscript(rootEl, ctrl)

Parameters:
NameTypeDescription
rootElHTMLElementContainer element for the rendered transcript.
ctrlPresentationControllerShared controller used to seek the waveform on click.

Methods

_onSegClick(idx)

Handles a click on a segment span: seeks the waveform and selects the segment.
Parameters:
NameTypeDescription
idxnumberIndex of the clicked segment.

loadFromProject(project)

Renders the transcript for the given project, building speaker blocks, paragraphs, and clickable/hoverable segment spans.
Parameters:
NameTypeDescription
projectProjectThe project whose transcript should be rendered.

setActiveSegment(idx)

Applies the active CSS class to the given segment span (playhead position).
Parameters:
NameTypeDescription
idxnumberSegment index to mark active, or -1 to clear.

setHoveredSegment(idx)

Applies the hovered CSS class to the given segment span.
Parameters:
NameTypeDescription
idxnumberSegment index to highlight, or -1 to clear.

setSelectedSegment(idx)

Applies the selected CSS class to the given segment span.
Parameters:
NameTypeDescription
idxnumberSegment index to mark selected, or -1 to clear.