Constructor
new PresentationController()
Initialises state properties; panels must be wired via setPanels.
- Source
Methods
closeCtxMenu()
No-op required by WaveformPanel interface.
- Source
isReadOnly() → {true}
- Source
Returns:
Always true — presentation mode is read-only.
- Type:
- true
onRegionActivate(idx)
Called by the waveform when the playhead enters a new segment.
Parameters:
| Name | Type | Description |
|---|---|---|
idx | number | Active segment index, or -1. |
- Source
onRegionHover(idx)
Called by the waveform region lane when the pointer moves over a segment.
Parameters:
| Name | Type | Description |
|---|---|---|
idx | number | Hovered segment index, or -1. |
- Source
onRegionSelect(idx)
Called by the waveform region lane when a segment region is clicked.
Parameters:
| Name | Type | Description |
|---|---|---|
idx | number | Selected segment index. |
- Source
onTranscriptHover(idx)
Called by the transcript panel when the pointer enters a segment span.
Parameters:
| Name | Type | Description |
|---|---|---|
idx | number | Hovered segment index, or -1. |
- Source
onTranscriptSelect(idx)
Called by the transcript panel when a segment span is clicked.
Parameters:
| Name | Type | Description |
|---|---|---|
idx | number | Selected segment index. |
- Source
onUserSeek(idx)
Called by the waveform when the user manually seeks (clicks timeline). Scrolls the transcript to bring the segment into view below the sticky waveform.
Parameters:
| Name | Type | Description |
|---|---|---|
idx | number | Segment index at the seeked position, or -1. |
- Source
openSegmentCtxMenu()
No-op required by WaveformPanel interface.
- Source
seekTo(time)
Seeks the WaveSurfer instance to the given time.
Parameters:
| Name | Type | Description |
|---|---|---|
time | number | Target time in seconds. |
- Source
setPanels(waveformPanel, transcriptPanel, sectionNavopt)
Wires the waveform, transcript, and optional section nav panels.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
waveformPanel | PresentationWaveform | The waveform panel instance to wire up. | ||
transcriptPanel | PresentationTranscript | The transcript panel instance to wire up. | ||
sectionNav | PresentationSectionNav | | <optional> | null | Optional section navigation panel. |
- Source