Skip to content

Custom headers support #135

@AlexGee17

Description

@AlexGee17

Hi,

First of all, thank you for maintaining AudioStreaming.

I'm evaluating AudioStreaming for an iOS internet radio application and I have a question regarding authenticated streams.

Does AudioStreaming currently support setting custom HTTP headers when opening a remote audio stream?

For example, I need to send headers such as:

  • Authorization: Bearer
  • X-API-Key:
  • X-Device-Id:

Ideally something along the lines of:

player.play(url: streamURL, headers: [
    "Authorization": "Bearer ...",
    "X-Device-Id": "..."
])

If this is not currently supported:

  1. Is there an existing workaround?
  2. Would you consider adding support for custom request headers?
  3. Which part of the codebase would need to be extended to implement this feature?

My use case is authenticated internet radio streams where the backend requires custom headers on every request.

And one last question if possible. Does AudioStreaming expose decoded PCM samples or AVAudioPCMBuffer frames that can be used to build a real-time visualizer/FFT spectrum analyzer?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions