11 lines
286 B
JavaScript
11 lines
286 B
JavaScript
var wavesurfer = WaveSurfer.create({
|
|
container: '#waveform',
|
|
waveColor: 'violet',
|
|
progressColor: 'purple'
|
|
});
|
|
wavesurfer.on('ready', function () {
|
|
wavesurfer.play();
|
|
});
|
|
let audio = document.getElementById('audio');
|
|
let file_path = audio.src;
|
|
wavesurfer.load(file_path); |