Skip to content

Obtain a registered plugin from WaveSurfer instance #4006

Answered by katspaugh
mcalderon-codes asked this question in Q&A
Discussion options

You must be logged in to vote

There can be multiple of the same plugin type active at the same time. E.g. two Timelines – one above and one under with different steps.
So you can use https://wavesurfer.xyz/docs/classes/wavesurfer.default#getActivePlugins + filter by type.

Better yet, just keep a memoized reference to your plugin instances using useMemo or useRef.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mcalderon-codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants