chiro-canto/public/larynx/scripts/script.js

11 lines
286 B
JavaScript
Raw Normal View History

2021-04-07 12:35:25 +02:00
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);