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

fix: don't double wrap URIs for HLS key requests #6246

Merged
merged 1 commit into from Feb 14, 2024

Conversation

avelad
Copy link
Collaborator

@avelad avelad commented Feb 14, 2024

The constructSegmentUris util already returns an array, so the call to makeRequest was being made with an array of arrays. This wasn't causing errors for requests that use the fetch plugin, since fetch will stringify the first argument if it's an array. But the data URI plugin expects to receive a string and calls .split() on it, so keys using data URIs throw an error if the URI is wrapped in an array.

Thanks to #6243 and @andrew0

The `constructSegmentUris` util already returns an array, so the call to `makeRequest` was being made with an array of arrays. This wasn't causing errors for requests that use the `fetch` plugin, since `fetch` will stringify the first argument if its an array. But the data URI plugin expects to receive a string and calls `.split()` on it, so keys using data URIs throw an error if the URI is wrapped in an array.
@avelad avelad added type: bug Something isn't working correctly priority: P2 Smaller impact or easy workaround component: HLS The issue involves Apple's HLS manifest format labels Feb 14, 2024
@avelad avelad added this to the v5.0 milestone Feb 14, 2024
@shaka-bot
Copy link
Collaborator

Incremental code coverage: 0.00%

@joeyparrish joeyparrish merged commit 948660b into shaka-project:main Feb 14, 2024
17 of 20 checks passed
joeyparrish pushed a commit that referenced this pull request Feb 20, 2024
The `constructSegmentUris` util already returns an array, so the call to `makeRequest` was being made with an array of arrays. This wasn't causing errors for requests that use the `fetch` plugin, since `fetch` will stringify the first argument if it's an array. But the data URI plugin expects to receive a string and calls `.split()` on it, so keys using data URIs throw an error if the URI is wrapped in an array.

Thanks to #6243 and @andrew0

Backported to v4.7.x
joeyparrish pushed a commit that referenced this pull request Feb 20, 2024
The `constructSegmentUris` util already returns an array, so the call to `makeRequest` was being made with an array of arrays. This wasn't causing errors for requests that use the `fetch` plugin, since `fetch` will stringify the first argument if it's an array. But the data URI plugin expects to receive a string and calls `.split()` on it, so keys using data URIs throw an error if the URI is wrapped in an array.

Thanks to #6243 and @andrew0

Backported to v4.7.x
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 14, 2024
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: HLS The issue involves Apple's HLS manifest format priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants