javascript - Play mp3 with Audio Waves in client side and file:/// -
i trying load audio waves using wavesurfer-js
this working great challenge me load file:/// protocol in chrome.
i following error when loaded local.
failed load file:///users/ashokshah/audiowavetest/audio.wav: cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https.
var wavesurfer = wavesurfer.create({ container: '#waveform', wavecolor: 'violet', progresscolor: 'purple' }); window.onload = function () { wavesurfer.load('audio.wav'); } <script src="https://cdnjs.cloudflare.com/ajax/libs/wavesurfer.js/1.4.0/wavesurfer.min.js"></script> <div id="waveform"></div> <button onclick="wavesurfer.play()">play</button> please me achieve showing audio waves in chrome file:/// protocol.
Comments
Post a Comment