collab-project / videojs-wavesurfer

video.js plugin that adds a navigable waveform for audio and video files
https://collab-project.github.io/videojs-wavesurfer
MIT License
365 stars 54 forks source link

Using zoom on videojs-wavesurfer #153

Closed shallfer7 closed 2 years ago

shallfer7 commented 2 years ago

Hi

Is there any way to implement zoom on videojs-wavesurfer ? Something like this, but on the waveform of videojs

Thank you

thijstriemstra commented 2 years ago

Yes, you can set the zoom level on wavesurfer.js like this (based on the example you linked):

document.querySelector('#slider').oninput = function () {
    player.wavesurfer().surfer.zoom(Number(this.value));
};