fix(player): respect stream user agent headers#1247
Open
WhiteGiso wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Respects stream-provided
User-Agentheaders during Android playback.The Android player now only applies the default player user agent when the stream does not already provide its own
User-Agentheader.PR type
Why
Some streams require a specific
User-Agentheader to be accepted by the server.The Android player previously set its default user agent even when the stream already provided a
User-Agentheader. This could cause playback requests to use the wrong user agent and fail.This fix preserves stream-provided request headers by only applying the default user agent when no
User-Agentis present.Issue or approval
Fixes #1246
UI / behavior impact
Policy check
CONTRIBUTING.md.Scope boundaries
This only changes Android playback header handling for streams that already provide a
User-Agent.It does not add new headers, change UI, change stream selection, add settings, add dependencies, or alter request headers other than avoiding the default user agent override when a stream-specific
User-Agentexists.Testing
git diff --check.User-Agentis provided.PlayerPlaybackNetworking.kt.Manual validation needed on an Android device/build:
User-Agentheader.User-Agentto confirm the default user agent is still used.Screenshots / Video
Not a UI change.
Breaking changes
None.
Linked issues
Fixes #1246