PresentationController

Mediates hover/select/active state between the waveform panel and transcript panel in presentation mode.

Constructor

new PresentationController()

Initialises state properties; panels must be wired via setPanels.

Methods

closeCtxMenu()

No-op required by WaveformPanel interface.

isReadOnly() → {true}

Returns:
Always true — presentation mode is read-only.
Type: 
true

onRegionActivate(idx)

Called by the waveform when the playhead enters a new segment.
Parameters:
NameTypeDescription
idxnumberActive segment index, or -1.

onRegionHover(idx)

Called by the waveform region lane when the pointer moves over a segment.
Parameters:
NameTypeDescription
idxnumberHovered segment index, or -1.

onRegionSelect(idx)

Called by the waveform region lane when a segment region is clicked.
Parameters:
NameTypeDescription
idxnumberSelected segment index.

onTranscriptHover(idx)

Called by the transcript panel when the pointer enters a segment span.
Parameters:
NameTypeDescription
idxnumberHovered segment index, or -1.

onTranscriptSelect(idx)

Called by the transcript panel when a segment span is clicked.
Parameters:
NameTypeDescription
idxnumberSelected segment index.

openSegmentCtxMenu()

No-op required by WaveformPanel interface.

seekTo(time)

Seeks the WaveSurfer instance to the given time.
Parameters:
NameTypeDescription
timenumberTarget time in seconds.

setPanels(waveformPanel, transcriptPanel)

Wires the waveform and transcript panels so the controller can forward events.
Parameters:
NameTypeDescription
waveformPanelPresentationWaveformThe waveform player panel.
transcriptPanelPresentationTranscriptThe transcript renderer panel.