Get the length (duration) of sounds in javascript

I use howler.js to control the sounds in my html / css / js project, everything works fine, the only thing that took me many hours of research without success: how can I get the length of the sound using howler.js?

+4
source share
2 answers

Using howler.js, you can simply do the following:

sound._duration

You can also wrap this inside the onload event, as you cannot get it until the sound loads.

+8
source

- .duration . , .

0

Source: https://habr.com/ru/post/1546907/


All Articles