Hi everyone !
I have a problem trying to create an audio with wavesurfer.js
Everything is fine the music is load but the playPayse button doesn't work
here is my code
HTML
<div id="waveform"></div>
<button class="btn btn-primary" data-action="play" onclick="wavesurfer.playPause()">Play / Pause</button>
JS
var wavesurfer = WaveSurfer.create({
container: '#waveform',
waveColor: '#fff',
progressColor: 'FDD670',
});
wavesurfer.load('http://ia902606.us.archive.org/35/items/shortpoetry_047_librivox/song_cjrg_teasdale_64kb.mp3');
Here is what i get :

I try to do it on google chrome safari and firefox but this damn button doesn't want to work and i don't find explanation about the playPause function on the website.
Thank you for your help
I just find the solution the code was right but i had a shitty z-index for something transparent and the button was unclickable ! :p
thanks anyway !
Hello all,
I have a problem trying to play audio with wavesurfer.js in safari browser.
when i click on play button it's show me error only safari.
TypeError: 'undefined' is not a function (evaluating 'this.ac.createGainNode()')
app.js:23
TypeError: 'undefined' is not an object (evaluating 'wavesurfer.on')
app.js:19
TypeError: 'undefined' is not an object (evaluating 'wavesurfer.playPause')
Please help me. How to solve this problem.
Thanks in advance.
Most helpful comment
I just find the solution the code was right but i had a shitty z-index for something transparent and the button was unclickable ! :p
thanks anyway !