madLokesh
madLokesh

Reputation: 1878

Unable to plot waveform of audiofile using XMLHttpRequest

Here is the scenario:

The audio is playing fine but the waveform is not being loaded in the canvas.

Is there something to do with relative path?

I have even used WaveSurfer.js and Shore.js but both of them are using similar concept and yielding same results. Result is: Waveform is not being created.

Please guide.

Upvotes: 3

Views: 946

Answers (1)

cwilso
cwilso

Reputation: 13918

I expect your problem is that XMLHTTPRequest doesn't by default work for local files: Allow Google Chrome to use XMLHttpRequest to load a URL from a local file. Cross-origin controls don't apply to non-HTTP requests.

Upvotes: 1

Related Questions