StaleContextMenu

A context menu for stale-segment operations. "Retranscribe with changes" keeps the current edited text and re-aligns word timestamps to it. "Revert and retranscribe" discards edits and runs a fresh Whisper pass, replacing both text and timestamps.

Constructor

new StaleContextMenu(x, y, options)

Parameters:
NameTypeDescription
xnumberPreferred left position in viewport pixels.
ynumberPreferred top position in viewport pixels.
optionsobjectOptions and callback functions for the menu.
Properties
NameTypeAttributesDescription
onRetranscribefunctionCalled when "Retranscribe with changes" is clicked.
onRevertAndRetranscribefunctionCalled when "Revert and retranscribe" is clicked.
onDismissfunction<optional>
Called when the menu is dismissed via outside click.
infoObject | null<optional>
Info widget config passed to the base ContextMenu.
Example
new StaleContextMenu(event.clientX, event.clientY, {
  onRetranscribe:          () => transcriptPanel.retranscribeSegments([idx]),
  onRevertAndRetranscribe: () => transcriptPanel.revertAndRetranscribeSegments([idx]),
  onDismiss: () => {},
});

Classes

StaleContextMenu