-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AudioStreamPlayer not returning position on get_playback_position() on HTML5 #95128
Comments
Please confirm with a recent version like rc2 |
I can confirm the issue in 4.3.rc2, with both OGG and MP3 files. MRP: testtt.zip |
So I can confirm this issue as the fix cannot be implemented as is right now for the 4.3.0 release.* The WebAudio API for There's an existing WebAudio API issue. There's a way to know that "playhead" parameter though, if we use the code that is mentioned here: WebAudio/web-audio-api#2397 (comment) (along with a fix). It's not perfect, but it's the most precise "playhead" that we can have. But implementing this is 4.4 material, maybe cherry-pickable for 4.3.1. *I know about #95197 by @yahkr, see my comment: #95197 (comment) |
@adamscott If this can't be fixed for 4.3, this should be documented in the description of And it should probably return a sentinel value (0 or -1) instead of (seemingly?) uninitialized memory. |
@akien-mga I need to test @yahkr PR, as they implemented what I wanted to do but didn't had the time to do so the last days (being not available/time with my family). I'll do this for tomorrow, so maybe this can be fixed for 4.3. |
Tested versions
-reproducible in v4.3.beta3.official [82cedc8]
-not reproducible in v4.2.2.stable.official [15073af]
System information
Windows 11 Godot v4.3.beta3.official [82cedc8]
Issue description
HTML5 export returns same value no matter what position song is at while using AudioStreamMP3, changed the AudioStreamPlayer type to the new synchronized and now i am getting correct results on exported project.
Side note, it seems that it always returning 0.00290249427781 regardless of which song is played.
Steps to reproduce
Create new project and add AudioStreamPlayer and Label to scene
Attach mp3 to AudioStreamPlayer and set autoplay to true
Create script that updates label.text with AudioStreamPlayer.get_playback_positon() in _process
Export to web build and test
Minimal reproduction project (MRP)
This is a fairly easy project to create..
The text was updated successfully, but these errors were encountered: