File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -186,11 +186,19 @@ const WaveformComponent = () => {
186
186
}, [])
187
187
188
188
// here is some pseudo code to show you what to when another sound (song) gets played
189
+ // we replace the wave data (peaks) of the previous song with the data for the current song
189
190
// playerRef.current.onPlayCallback((sound) => {
190
191
// const peaksArray = sound.waveData
191
192
// waveformRef.current.setWaveData(peaksArray)
192
193
// })
193
194
195
+ // and here is some pseudo code to show you have to change the range display
196
+ // when your player is playing a sound (song)
197
+ // the range value is the playing progress in percent, so a value between 0 and 100
198
+ // playerRef.current.onPlayingCallback((progressInPercent) => {
199
+ // waveformRef.current.draw(progressInPercent)
200
+ // })
201
+
194
202
const initializeWaveform = useCallback (() => {
195
203
196
204
const waveLayoutOptions: IWaveLayoutOptions = {
You can’t perform that action at this time.
0 commit comments