You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which API doesn't behave as documented, and how does it misbehave?
When Creating a type List, I dynamically trough for loop create AudioSource.uri with headers and add it to the list.
Minimal reproduction project
Provide a link here using one of two options:
Will provide if needed.
To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:
Will provide if needed Error messages
If applicable, copy & paste error message here, within the triple quotes to preserve formatting.
Expected behavior
I expect to hear three different audios, but I hear only one three times.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Device: Samsung Galaxy A22
OS: Android 13
Flutter SDK version
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.2, on Ubuntu 24.04 LTS 6.8.0-35-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.90.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
Additional context
I have a videoIds list which contains some strings. Then I iterate trough a for loop which takes every videoId from videoIds list. It creates new AudioSource.uri() with custom headers and tagItem. After that it adds it to sources list type List. After the loop finishes I return the sources list. The Player does make three connections, which is the length of videoIds list and when I look at background audio played, info is correct, but it plays the same song three times. I also see on my server that headers gotten from all three requests have same headers videoId. The printed out headers when setting AudioSource from uri are correct (can be seen in code)
Okay, after a lot of debugging the issue was with ConcatenatingAudioSource. AudioSources that it consists of are from uri. Url is the same but headers are different. It seems that just_audio for same url uses same headers. The solution is to use query parameters in url instead of headers. It would be nice if you could fix it and/or add support for different headers if someone will be sending data about song being played in them and add body support.
Which API doesn't behave as documented, and how does it misbehave?
When Creating a type List, I dynamically trough for loop create AudioSource.uri with headers and add it to the list.
Minimal reproduction project
Provide a link here using one of two options:
Will provide if needed.
To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:
Will provide if needed
Error messages
Expected behavior
I expect to hear three different audios, but I hear only one three times.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Flutter SDK version
Additional context
I have a videoIds list which contains some strings. Then I iterate trough a for loop which takes every videoId from videoIds list. It creates new AudioSource.uri() with custom headers and tagItem. After that it adds it to sources list type List. After the loop finishes I return the sources list. The Player does make three connections, which is the length of videoIds list and when I look at background audio played, info is correct, but it plays the same song three times. I also see on my server that headers gotten from all three requests have same headers videoId. The printed out headers when setting AudioSource from uri are correct (can be seen in code)
Code
Flutter debug console output
Python API Output
If anything else is needed, please say
The text was updated successfully, but these errors were encountered: