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 = () => {
186186 }, [])
187187
188188 // 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
189190 // playerRef.current.onPlayCallback((sound) => {
190191 // const peaksArray = sound.waveData
191192 // waveformRef.current.setWaveData(peaksArray)
192193 // })
193194
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+
194202 const initializeWaveform = useCallback (() => {
195203
196204 const waveLayoutOptions: IWaveLayoutOptions = {
You can’t perform that action at this time.
0 commit comments