Position of audiohandle doesn't work on web
There is example:
var handle = Luxe.audio.play(source, volume);
override function update (dt:Float){
trace(Luxe.audio.position_of(handle)); // so, it always outputs: 0
}
And what it must output?
What are you testing on? How long is the sound?
I put this in tests/features/audio:
override function update(dt:Float) {
if(Luxe.audio.state_of(last_played) == luxe.Audio.AudioState.as_playing) {
trace(Luxe.audio.position_of(last_played));
}
}
And it works as expected on native. On web it will return 0
The reason is largely because web audio api doesn't support this concept (yet, maybe). I was intending to look into implementing the work arounds but I've been focused elsewhere.
Yes, I worked on Web target. It's not very good news for me, but I'll wait for changes.
Not much I can do about browsers not supporting these basic features I'm afraid! I'll see if we can work around it but it's probably not going to be a best fit until the browsers finish the API. For streaming sounds I think the position is knowable already, which I'll add soon.