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

Popular posts from this blog

php - Embed BBCode within itself not working -

three.js - how to load gltf in three JS -

sql server - T-SQL: Access DB objects in same schema without qualifying? -