chiro-canto/public/larynx/scripts/script.js
2021-04-07 12:35:25 +02:00

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);