Optionaloptions: WindowedSpectrogramPluginOptionsInternal__test-only, see TestInternals
Clear cached frequency data to force recalculation. 'full' mode only - a no-op (with a console.warn) in 'windowed' mode, whose segment cache lives in segmentManager instead; see loadFrequenciesData's doc comment for why.
Get the current frequency data, computing (and caching) it from the decoded audio if needed. 'full' mode only - a no-op (returns null, with a console.warn) in 'windowed' mode; see loadFrequenciesData's doc comment for why.
Windowed rendering only: current loading progress as a percentage (0-100); 100 in 'full' mode.
Fetch pre-computed spectrogram JSON data from a URL and render it. 'full' mode only - a no-op (with a console.warn) in 'windowed' mode, where data is computed and cached per segment via progressive loading instead of as one whole-buffer result; calling this would fight the segment renderer's own canvases.
ProtectedoptionsWindowed rendering only: restart progressive background loading from the beginning. No-op in 'full' mode.
ProtectedscopeA disposal scope owned by the plugin chassis, disposed by destroy().
definePlugin (see define-plugin.ts) replaces this with a fresh Scope
on every (re-)init; class-based plugins that support destroy() ->
_init() re-init must do the same in onInit().
Windowed rendering only: stop progressive background loading if it's currently running. No-op in 'full' mode.
ProtectedsubscriptionsProtected OptionalwavesurferProtecteddestroyedWhether destroy() has been called. Subclasses use this to guard async work.
Do not call directly, only called by WavesSurfer internally
Destroy the plugin and unsubscribe from all events
ProtectedemitEmit an event
Subscribe to an event. Returns an unsubscribe function.
Optionaloptions: { once?: boolean }Subscribe to an event only once
ProtectedonCalled after this.wavesurfer is available
Unsubscribe from an event
Clear all events
StaticcreateOptionaloptions: WindowedSpectrogramPluginOptions
Thin wrapper mirroring spectrogram.ts's own
SpectrogramPluginclass - see its doc comment for why create-time validation needs a constructor, not just a check inside setup().