wavesurfer.js

Initialize WaveSurfer targeting the container div

陌路散爱 提交于 2019-12-20 03:55:07
问题 I am trying to create waveform using wavesurfer.js for dynamically created elements using JavaScript. Here is my code: $(document).ready(function() { var id = 9; $("#audio").append('<div class="row" id="wave' + id + '"></div>'); $('#audio').on('DOMNodeInserted', 'div', function() { var selectedId = $(this).prop('id'); console.log(selectedId); window['waveForm' + selectedId] = Object.create(WaveSurfer); window['waveForm' + selectedId].init({ container: $(this), waveColor: 'violet',

WaveSurfer JS can not generate graph in firefox for the specific mp3 audio file

∥☆過路亽.° 提交于 2019-12-13 03:35:07
问题 We are facing problem to draw the audio visualization (graph) by wavesurfer JS in Firefox for some specific format of the mp3 file. It always gives us the error like: The buffer passed to decodeAudioData contains an unknown content type. But same file is running in chrome without any problem. After the investigation, we have found that decodeAudioData() is used in wavesurfer JS which is generating the error while decoding audio file data contained in an ArrayBuffer. Since we don't have an

Initialize WaveSurfer targeting the container div

不羁的心 提交于 2019-12-02 04:17:26
I am trying to create waveform using wavesurfer.js for dynamically created elements using JavaScript. Here is my code: $(document).ready(function() { var id = 9; $("#audio").append('<div class="row" id="wave' + id + '"></div>'); $('#audio').on('DOMNodeInserted', 'div', function() { var selectedId = $(this).prop('id'); console.log(selectedId); window['waveForm' + selectedId] = Object.create(WaveSurfer); window['waveForm' + selectedId].init({ container: $(this), waveColor: 'violet', progressColor: 'purple' }); window['waveForm' + selectedId].on('ready', function() { window['waveForm' +