Hi,
I was wondering if there is a way to get the sound duration without/before playing it.
In my tests it seems that things like duration,seek, onseeked etc only work when the sound has been 'started'.
A 'dirty' fix would be to play it, muted, for a little moment, but i was wondering if there is another way.
Preloading the sound also doesn't help.
edit: I now have something like this:
Code
function initializesound(name){
krpano.playsound(name);
const timeout = setTimeout(function() {stopSoundIni(name)}, 10);
}
function stopSoundIni(name){
krpano.stopsound(name);
krpano.call("soundinterface.mute = false");
krpano.trace(1, "duration ini stop= " + krpano.get("sound["+sid+"].duration"));
}
Tuur