Skip to content
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 Support for header tokens #129

Open
pepie opened this issue Mar 23, 2019 · 21 comments
Open

Add Support for header tokens #129

pepie opened this issue Mar 23, 2019 · 21 comments

Comments

@pepie
Copy link

pepie commented Mar 23, 2019

No description provided.

@pepie
Copy link
Author

pepie commented Mar 23, 2019

It would be nice to be able to pass an auth token, for secured remote content.
is this possible?

@erickzanardo
Copy link
Member

I am not sure, would to do some research. I wonder if this is something achieved on the native platform

@zencubic
Copy link

Would like to have this feature too!
@erickzanardo On android ist not too complicated (https://stackoverflow.com/a/29128037, https://developer.android.com/reference/android/media/MediaPlayer.html#setDataSource(android.content.Context,%2520android.net.Uri,%2520java.util.Map%3Cjava.lang.String,%2520java.lang.String%3E)) but I don't know about iOS.
It would probably be best if you pass your own HTTP-Header in dart code

@zencubic
Copy link

@s98113161
Copy link

I need this feature too!

@MasjZam
Copy link

MasjZam commented Feb 14, 2020

I've implemented the Android side - anyone have experience with Objective C willing to do the iOS side for this?

@mihael998
Copy link

Somebody has some news for this? I would need it too.

@alectogeek
Copy link

Please add this feature!

@qianciling
Copy link

I need this feature too!

@WinXaito
Copy link

WinXaito commented Jun 7, 2021

+1

@BartusZak
Copy link

HTTPS headers for web please :D

@AhemadAbbasVagh
Copy link

any updates on HTTPS headers for web?

@keyur005
Copy link

keyur005 commented Jul 4, 2022

Pl add this feature!

@raheemuddin786
Copy link

Please add this feature.

@synchronisator
Copy link

I try to play a file from a Nextcloud.
To do this, i need to add a Basic Authentication Header.
This is not possible at the moment.
Because in web it is not possible to save the file to disk and play it from there, and playing UInt8List is also not implemented, it is at this moment not possible to play a file from nextcloud in web.

Please add this feature.
Thanks

@Gustl22
Copy link
Collaborator

Gustl22 commented Jan 11, 2023

Proposal: implement #374 by downloading the file beforehand and then can use header tokens to get the file, so we don't rely on the platform implementation.

@cnkygmr
Copy link

cnkygmr commented Oct 4, 2023

any update ?

@maximeburri
Copy link

+1
Any update ?

@1250422131
Copy link

Proposal: implement #374 by downloading the file beforehand and then can use header tokens to get the file, so we don't rely on the platform implementation.

Downloading files in advance is reasonable and effective, but we need to be aware of one issue: most of the time, we prefer online audio to be cached in segments rather than caching the entire file before playback. This allows us to save some data usage and enables faster playback of online music.

@jvaleski
Copy link

+1

@jvaleski
Copy link

audioplayers uses AVPlayerItem under the hood for iOS, and Apple has gone way out of their way to prevent arbitrary (auth for example) header additions to the AVURLAsset's that AVPlayerItem uses. as best I can tell, you'd have to subclass AVURLAsset, creating your own custom URL scheme, and implement your own delegation of the resource loading to manage all the network interactions yourself.

feeling like all roads lead to accessing remote URLs that require custom headers via an HTTP lib, saving data locally, then having audioplayers play the local file. the alternative is a pretty big overhaul of how audioplayers currently implements UrlSource in order to get custom headers in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests