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

Provide the license XHR object or fetch response with KEY_SYSTEM_LICENSE_REQUEST_FAILED error data #4538

Closed
pcruiksh opened this issue Feb 2, 2022 · 2 comments

Comments

@pcruiksh
Copy link

pcruiksh commented Feb 2, 2022

Is your feature request related to a problem? Please describe.

Some DRM servers provide error details in non-2xx responses that may be useful to applications for error handling and retry logic, especially for applications that already wrap the license request/response flow with custom logic. In my case, our license server may indicate that one of several tokens sent in the request body needs to be refreshed but the error is otherwise recoverable.

I acknowledge that this is solve-able if you are wrapping the license request with a licenseXhrSetup callback, but it makes error handling a bit clumsier than it needs to be.

Describe the solution you'd like

Pass the xhr object as part of the error data when a KEY_SYSTEM_LICENSE_REQUEST_FAILED error is triggered.

Additional context

No response

@pcruiksh pcruiksh added Feature proposal Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Feb 2, 2022
@robwalch
Copy link
Collaborator

robwalch commented Jul 14, 2022

Hi @pcruiksh,

Please create a PR that adds networkDetails: xhr to the error object, and update necessary TS type defs and API.md documention.

This issue will be addressed by #4930

@robwalch robwalch added Enhancement and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Jul 14, 2022
@robwalch robwalch added this to the 1.3.0 milestone Jul 16, 2022
@robwalch robwalch mentioned this issue Sep 28, 2022
3 tasks
robwalch added a commit that referenced this issue Dec 15, 2022
* Add support for com.apple.fps keySystem

* Improve support for DRM key-systems and key handling
Resolves #2833 #2737 #4318 #4538

* Update README `licenseXhrSetup` example

* Update api-extractor markdown

* Attach CDM on start when even when initial fragments do not have a key associated with them

* Handle expired key status correctly

* Map key-sessions by key ID and log key ID more often than URI

* Support "clear-lead" key-session creation without new config

* Emit and handle FRAG_PARSING_ERROR from transmuxers (#5018)

* Emit and handle FRAG_PARSING_ERROR from transmuxers
Related to #5011
* Switch levels on Key and Fragment parsing errors or escalate to fatal error

* Route all key-system errors to `onFragmentOrKeyLoadError`

* Populate EMEKeyError.err for better demo error logging

* Remove `useEmeEncryptedEvent` and mark `widevineLicenseUrl` as deprecated in API.md

* Add support for EXT-X-SESSION-KEY tags (for key-system access on manifest loaded)
#4927

* Throw before licenseXhrSetup if key was removed

* Make key session promise chain more consice

* Stop on fatal key system errors

* Only request access to key-systems for keys matching those found in the config one at time (to avoid gaining access to WV and PR on Edge)

* Modify key-system helpers so that it's easier to support additional key-system strings

* Add undocumented `generateRequest` ("Content ID") filter

Co-authored-by: Vincent Valot <[email protected]>
@robwalch robwalch added the Verify Fixed An unreleased bug fix has been merged and should be verified before closing. label Dec 18, 2022
@robwalch
Copy link
Collaborator

This is available in v1.3.0-beta.1.

Repository owner moved this from In Progress to Done in EME and Content Protection (DRM) Dec 18, 2022
@robwalch robwalch removed the Verify Fixed An unreleased bug fix has been merged and should be verified before closing. label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants