Sound.length == 0 on HTML5 target

Hello everyone! Sound.length on HTML5 target returns zero (no problem with flash). Is it a normal behavior or I have a bug?
My Haxe version 3.2.0 and OpenFl 3.3.8.

Here is OpenFL code:

@:noCompletion private function get_length ():Int {
    if (__buffer != null) {
        #if flash
        return (__buffer.src.length);
        #elseif !html5
        var samples = ( * 8) / (__buffer.channels * __buffer.bitsPerSample);
        return (samples / __buffer.sampleRate * 1000);
    return 0;

Looks like HTML5 ignored there :frowning:

In Flash Player, the sounds are loaded using Adobe’s algorithm to detect sound (or to be embedded in the SWF).

In HTML5, I don’t think the browser gives the sound length unless it is loaded, and in some cases, never (I believe) since this might not always be exposed.

We do use Sound.js at the moment, I’m not sure if we could use it better to get this data, or worst-case, we could process the sound in the command-line tools and hard-code the sound length, though that is not ideal

Thank you for explanations! I think we can find a way to live to without it, at least I have finished my manager and it works fine)