question

Andreas Wurf avatar image
Andreas Wurf asked

Add optional http request headers to [RemoteMediaPlayer setMediaSourceToURL

Hi there, I'm using the Amazon Fling SDK on iOS, but the following would apply to other platforms as well: I would like to instruct the receiver to request an asset from an external service that requires an oauth bearer token to be included as a http request header. Would it be possible to extend the RemoteMediaPlayer protocol, so that one can pass in a dictionary of arbitrary (or some selected) header tokens? Best, Andreas
amazon fling
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

memo@amazon avatar image
memo@amazon answered
Hi, Do you have a custom receiver on Fire TV? If you do, then you could use the metadata JSON to pass custom HTTP headers from client to the Fire TV. Your receiver can then pass the headers via the MediaPlayer.setDataSource(..., headers, ...) method to the server. In case of the default media receiver on Fire TV, there is no way to pass custom headers to the content server. This is a gap and we have added this to our backlog. Thank you very much for helping us improve the SDK!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andreas Wurf avatar image
Andreas Wurf answered
Thanks for considering this! I was talking about the default receiver, indeed, because I don't want to rely on any particular receiver. Also, more and more people are moving their assets to the cloud, where passing auth tokens via http headers is quite common, so this may be a very valuable addition to the protocol in any case. Best, Andreas
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.