Add new error code for segment fetch errors. #2118
Labels
flag: good first issue
This might be a relatively easy issue; good for new contributors
priority: P3
Useful but not urgent
type: enhancement
New feature or request
Milestone
While investigating the request/response filters mechanism I saw you have different error propagation between license and other request/response types.
For license, no matter what error the underlying networking engine throws, the DRM engine will turn it to a
LICENSE_REQUEST_FAILED
error.https://github.com/google/shaka-player/blob/e7a5bb9ecf07c5a0ac0d87d2a7a44e24d6a371f0/lib/media/drm_engine.js#L1122-L1140
For other types of requests the streaming engine will re-throw the networking engine error(last else clause, lines 1607-1614):
https://github.com/google/shaka-player/blob/e7a5bb9ecf07c5a0ac0d87d2a7a44e24d6a371f0/lib/media/streaming_engine.js#L1579-L1615
So if there was a filter request or response error the application using the player can know if it is a filter error or an actual HTTP error.
(the streaming engine actually does have also different handling for all of if-else clauses - so maybe this is also valid for them - you will not know that they failed due to filter error, like the license).
Is there a reason for this inconsistency in behaviour? does it serve a purpose?
The text was updated successfully, but these errors were encountered: