I dont really see any methods to get the length of the song since i would like to make the size of my container change accordingly with the length of the song. Would be very helpful if there is a method to provide the length of the song i'm sure there is one internally somewhere thanks. :)
If you want your waveform to be it's own size and not fill the container, set the fillParent option to false and guess the right value for minPxPerSec so that waveforms are not too small (try 10 pixels per second).
Anyway, if you still want to get duration in seconds, use wavesurfer.backend.getDuration().
thanks
Most helpful comment
If you want your waveform to be it's own size and not fill the container, set the
fillParentoption tofalseand guess the right value forminPxPerSecso that waveforms are not too small (try 10 pixels per second).Anyway, if you still want to get duration in seconds, use
wavesurfer.backend.getDuration().