-
Notifications
You must be signed in to change notification settings - Fork 861
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
Add headers parameters in audio playerscontroller.play() function to GET the url with the good headers (authorization ) #1158
Comments
For people who need the headers, I have created a temporary solution to wait for this urgent feature. When you start the audio player, add this:
Then define the cache function:
And delete the file when it is no more needed:
|
For an urgent production repair, consider migrating => just_audio
|
It's an open source project. Feel free to fork and try to implement it :) I think it's a very special use case, which is not high priority :/ |
See #129 |
There is no possibility to add headers in the play() function.
I love this project but without it I am getting 403 errors from because the JWT Authorization cannot be sent.
It would be great to have a headers parameters in the play function, because there is a lot of APIs that request headers like authorization application-type, ...
This is the error shown by your your package :
The package received this error because the server expect to receive in the request the headers:
You should add an optional headers parameter to your play() function, and add the headers map when you make the get url request.
Example:
This should be implemented in each platform because it's an easy fix (headers is always propose with get, post ... requests), and other people will need it. But it my case it's only Android, Web and iOS.
I hope you will be able to add this little fix because this headers parameter is mandatory for us and we cannot use your package without it.
Take care.
The text was updated successfully, but these errors were encountered: