Constructor
new PresentationTranscript(rootEl, ctrl)
Parameters:| Name | Type | Description |
|---|
rootEl | HTMLElement | Container element for the rendered transcript. |
ctrl | PresentationController | Shared 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:| Name | Type | Description |
|---|
idx | number | Index of the clicked segment. |
loadFromProject(project)
Renders the transcript for the given project, building speaker blocks, paragraphs, and clickable/hoverable segment spans.
Parameters:| Name | Type | Description |
|---|
project | Project | The project whose transcript should be rendered. |
setActiveSegment(idx)
Applies the active CSS class to the given segment span (playhead position).
Parameters:| Name | Type | Description |
|---|
idx | number | Segment index to mark active, or -1 to clear. |
setHoveredSegment(idx)
Applies the hovered CSS class to the given segment span.
Parameters:| Name | Type | Description |
|---|
idx | number | Segment index to highlight, or -1 to clear. |
setSelectedSegment(idx)
Applies the selected CSS class to the given segment span.
Parameters:| Name | Type | Description |
|---|
idx | number | Segment index to mark selected, or -1 to clear. |