Open GoranSustekJr opened 3 months ago
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