You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To see an example of what it looks like when the range gets modified, check out the animated gif on top of this README or install the example from this repository, which uses an audio player that redraws the waveform element every time its progress callback gets triggered: [simple waveform and audio player example](/examples/simple-waveform/README.md)
155
155
156
+
If you want to replace the current waveform display with another waveform because your audio player got told to play the next song, then you don't need to create another waveform, just replace the wave peaks from the previous song with the peaks of the current song,like so:
157
+
158
+
```ts
159
+
waveform.setWaveData(peaksArray)
160
+
```
161
+
156
162
### React component example
157
163
158
164
Note: This code does the exact same thing as the previous example but uses React instead of vanilla javascript
0 commit comments