Wavesurfer.js: How to display the waveform multiple times?

Created on 7 Nov 2016  路  6Comments  路  Source: katspaugh/wavesurfer.js

Hi, I'm creating a project where mp3 files are displayed as waveform and I'm doing it with wavesurfer.js but I can't display the waveform for each audio file or display more than 1 waveform in same page.

Most helpful comment

Here is an example of how you could use a utility function to accomplish that without having to repeat yourself too much: http://codepen.io/mspae/pen/MbagWR

All 6 comments

You want to render multiple audio files with multiple instances of the wavesurfer.js plugin? Or do you want to want to render one audio file with multiple waveforms rendered by one instance of the wavesurfer.js plugin?

Yes, I want to render multiple audio files with multiple instances of the wavesurfer.js plugin. For instance like soundcloud.com.

Here is an example of how you could use a utility function to accomplish that without having to repeat yourself too much: http://codepen.io/mspae/pen/MbagWR

Yeah, cool! But I meant how to make all of this rendered waveforms to audio players.

@Bernardodinex I think you were given enough help to figure out the rest on your own. This is not a coding dojo. Please use stackoverflow for this kind of questions.

@mspae is it possibile to have one audio and link audio events to all these waveforms?

Was this page helpful?
0 / 5 - 0 ratings