React-native-track-player: send headers for audio

Created on 20 Oct 2018  路  9Comments  路  Source: react-native-kit/react-native-track-player

i wanna send header for Authorization of file is possible ??
like this ::

await TrackPlayer.add({ id: 'trackId', url: { uri:'https://abc.com/download/67', method: 'Get', headers: { 'Authorization': 'Bearer ' + this.props.user.access_token, 'Content-Type': 'application/json', } }, title: 'Track Title', artist: 'Track Artist', artwork: require('track.png') });

Enhancement

Most helpful comment

@bodrug98 this is an open source library that they work on in their free time, so no deadlines are imposed or committed to. You're welcome to submit a pull request though!

All 9 comments

@dcvz what do you think? I guess it would be useful not only for authorization, but also for analytics.

I think that this is a good idea. I'm just wondering if we should really support this per track or as part of the setup for the player.

Unless it's too complicated for the current implementation, I don't think we should support it for the whole player. Let's say your app plays shoutcast radios, one of them requires an Authorization header (it's a private/premium radio) but another one doesn't, it's a big security flaw to share the same headers for everything.

Hello @Guichaguri, @dcvz , how long will this option be implemented?

@bodrug98 this is an open source library that they work on in their free time, so no deadlines are imposed or committed to. You're welcome to submit a pull request though!

jasongrishkoff , I know and respect that, I just wanted to know if they have plans to make this option

@bodrug98 we are still discussing about the implementation, feel free to join us.

@Guichaguri @dcvz @jasongrishkoff
is there any resource to learn how change java file and objective-c file and then send change to github ?? i can implement this feature but how can i change java ???

@hoseineghbal there are a few resources to learn git around the internet

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moduval picture moduval  路  3Comments

RiccardoNL picture RiccardoNL  路  3Comments

KalebPortillo picture KalebPortillo  路  4Comments

sagargheewala picture sagargheewala  路  3Comments

moduval picture moduval  路  4Comments