This question is asked previously in the following link but didn't work for me. WaveSurfer JS can not generate graph in firefox.
I used the following code to create an audio player by Wavesurfer JS.
var wavesurfer = WaveSurfer.create({
container: '#waveform',
backend: 'MediaElement',
mediaType: 'audio',
waveColor: '#f0f1f7',
barWidth: 3,
cursorColor: 'transparent',
progressColor: '#ff4342',
barGap: 4,
responsive: true,
height: 66
});
wavesurfer.load('./assets/audio/test.mp3');
it works properly in all major browsers but when I install IDM ( internet download manager ) I encounter the following error in firefox and IDM tries to download the audio file and finally, the Wavesurfer graph isn't created. why this error occurs and how can I solve it?
The error code in the firefox console:
I found the problem is because my project is on the local computer and when I transfer it to a live server all errors are fixed and the audio player works properly.