-
Notifications
You must be signed in to change notification settings - Fork 133
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(DRM): handle all keys statuses #1423
base: dev
Are you sure you want to change the base?
Conversation
`A "${keyStatus}" status has been encountered (${bytesToHex(keyId)})`, | ||
{ keyStatuses: [keyStatusObj, ...badKeyStatuses] }, | ||
); | ||
throw error; |
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.
I don't know if "output-downscaled" should be considered an error, for resiliency.
If it is output-downscaled, it's theoretically playing, just at a lower quality, isn't that semi-OK (like a warning-type of scenario?)
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.
I agree with @peaBerberian : some platforms thoretically support usage rules that require the device to force the downscale of video frames before outputting them to an uncompressed digital video output interface that is insufficiently protected.
Typical use is a usage rule requiring "downscale video output to SD if HDCP 1.4 or higher cannot be established on HDMI output". When processing a key associated with such usage rule and an unprotected HDMI output:
- a platform that doesn't support downscaling is expected to fail to decrypt content and to issue an
OUTPUT_RESTRICTED
error. - a platform that does support downscaling is expected to decrypt, downscale, output content, and, I guess, to notify an
OUTPUT_DOWNSCALED
key status
Playready's uncompressed_digital_video_output_protection_level=270
usage rule is the typical example of such usage rule.
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.
Thanks I have updated the behavior to authorized to use a key that is "output-downscaled"
.
I'm wondering if we should take in consideration that the key status is "output-downscaled"
to select the appropriate track.
For example a content with 2 representations:
- Representation 1: FHD (1080p) with key status
usable
. - Representation 2: UHD (4K) with key status
output-downscaled
.
Currently the player will select the highest quality (UHD) if the client has the required bandwidth.
But which representation has a better perceived quality between the downscaled UHD and the FHD ?
Could it be possible that the downscaled UHD representation would be at a worse quality than the FHD representation ? In it's case we don't want to select the highest quality because it has been downscaled.
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.
output-downscaled
doesn't seem to indicate details about the downscaling it performs, so I'm not sure if we could be able to compare it with other Representations (if there even is other Representations).
Treating "output-downscaled" as a "whitelisted" case seems ok to me in the meantime, as we've never yet even encountered that key status, but we might have to set a more complex logic in the future if we do observe some unwanted situation with it.
32b2e83
to
83a9c77
Compare
As discussed while drafting things after #1427 for what I would call support of "accidental multi-key responses" scenarios where the license server would respond with multiple keys despite a So the question is whether we whitelist that key in the meantime (yet that would be kind of weird to consider corresponding Representations "decipherable") or if a special "pending" status should be added, kind of like unknown but for which no fallback would be triggered (at least until we do know the real status). |
I'm writing about a pretty rare scenario but now that I think of it, I don't see how the same cases couldn't arise in the other |
83a9c77
to
8f9c7e4
Compare
The spec https://w3c.github.io/encrypted-media/#dom-mediakeystatus
defines 8 MediaKeyStatuses. In the RxPlayer, we didn't handle every one of them.
This PR add an appropriate behavior for the missing keys.