-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: dispatch FairPlay-related error details #57
chore: dispatch FairPlay-related error details #57
Conversation
to ease unit testing
…layerViewController
4a37436
to
1d93657
Compare
case 400: | ||
return "The URL or playback ID was invalid. You may have used an invalid value as a playback ID." | ||
case 403: | ||
return "The video's secured drm-token has expired." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be inaccurate, as it's only one of several reasons why you may end up receiving a 403. See: https://github.com/muxinc/elements/pull/965/files#diff-6bc54449b29c68761250a41d4d58fd58052f5d932f195952c66908324b1fe436R98-R194.
Without decoding the JWT, you can't disambiguate the reason for being unauthorized. You should either decode the JWT for more precise cases (a la Mux Player/elements web) or make this message more generic, e.g. something like "The video's secured drm-token is not authorized for this request. It may be expired or a token for another resource."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still potentially inaccurate. Make sure you update to at least a more generic message (See prior comment for more in depth discussion).
2f8a6ad
to
a87bff9
Compare
Make a defensive copy of MUXSDKCustomerData when it is provided. Since it is a reference, this prevents alterations the SDK makes to bubble up to client code. As well as guards against the player software name and version from being altered after they're set. Improve readability. Add customer data tests to validate dimensions are passed through and check for pointer equality
77f2d44
to
b1f1693
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One pending issue (minor with the less granular error message solution)
case 400: | ||
return "The URL or playback ID was invalid. You may have used an invalid value as a playback ID." | ||
case 403: | ||
return "The video's secured drm-token has expired." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still potentially inaccurate. Make sure you update to at least a more generic message (See prior comment for more in depth discussion).
b1f1693
to
45f1917
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved
No description provided.