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. |
- Source
Members
sections :Array.<{number: number, name: string, beforeSegStart: number, el: HTMLElement}>
Type:
- Array.<{number: number, name: string, beforeSegStart: number, el: HTMLElement}>
- Source
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. |
- Source
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. |
- Source
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. |
- Source
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. |
- Source
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. |
- Source