This example demonstrates multiple WaveSurfer instances reacting to events and states. When a different play button is pressed, the previously playing audio is stopped and reset to the beginning.
Samples by Bad Snacks available for free on the YouTube Audio Library.