hls.js
hls.js copied to clipboard
Provide the license XHR object or fetch response with KEY_SYSTEM_LICENSE_REQUEST_FAILED error data
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
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
This is available in v1.3.0-beta.1.