If I use wavesurfer.js I get a CORS error

Viewed 28

Isn't that right?

I want to know how..

Access to XMLHttpRequest at 'http://aa.com/aaa.mp3' from origin 'http://bb.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

source :

var wavesurfer = WaveSurfer.create({

    container: '#waveform',
    waveColor: '#4bf3a7',
    progressColor: '#efefef',
    cursorColor: 'red',
    cursorWidth: 1.5,
    barHeight: 1.5,
    height:  window.outerHeight - 140,
    audioRate: 1, // play speed
});
wavesurfer.load('http://aa.com/aaa.mp3');
0 Answers
Related