Hi! tried many things - does anyone have an example of how to add a volume slider HTML and JS ?
I have the equalizer example working though need to add a simple master volume fader
This is the equalizer example i hope to add a volume slider to
https://wavesurfer-js.org/examples/
BIG thanks!
@tweed here you go:
http://codepen.io/entonbiba/pen/YNExjW
VERY VERY much appreciated!!! Bet it helps many of us.
I have enjoyed the Volume Slider - now I'm trying to find a way to modify the code from the link above to get the slider to reflect the correct position when i set DEFAULT VOLUME with this:
wavesurfer.setVolume(0.4);
REALLY hoping to some help with this - it's FANTASTIC to have the slider - and as i set a default volume to be much less than 100% loud - hoping to have the slider not show 100% full right position by default -
Long way of asking:
is there a way to have the slider follow the default volume I set with
wavesurfer.setVolume(0.4);
Sorry and thanks!!
Check the code for the zoom slider in the examples.
THANK YOU
No Luck yet
I had a go and I think it may be that there's no volumeLevel paramenter for setVolume?
hoping to have the slider for volume relect the actual default volume I'm setting with setVolume
wavesurfer.setVolume(0.4);
var slider = document.querySelector('#volume');
slider.oninput = function () {
var volumeLevel = Number(slider.value);
wavesurfer.setVolume(volumeLevel);
};
@tweed here you go, you may now use wavesurfer.getVolume(); with the latest version.
wavesurfer.setVolume(0.4);
document.querySelector('#volume').value = wavesurfer.getVolume();
FANTASTICALLY HELPFUL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! the last puzzle piece - GREATEST thanks
Is it possible to do this with two channels ?
When you split channels do they get a name or an Id i can work with.
I want to be able to change the volume of each channel seperately.
document.querySelector('#volume').value = wavesurfer.getVolume();
Cannot get it... is there any code example?
Thanks in advance
Most helpful comment
@tweed here you go:
http://codepen.io/entonbiba/pen/YNExjW