-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[eme] Check if HDCP policy is supported #14384
[eme] Check if HDCP policy is supported #14384
Conversation
In [1] there is a proposal to add the ability to know before fetching content if HDCP (and what version) can be enforced. This adds a test to check if it is supported. [1] https://github.com/WICG/hdcp-detection/blob/master/explainer.md
// don't bother checking the result returned as it may or | ||
// may not be supported. This simply verifies that | ||
// getStatusForPolicy() exists and doesn't blow up. | ||
return mediaKeys.getStatusForPolicy({minHdcpVersion: hdcpPolicy}); |
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 might return a rejected promise, e.g. for clear key. Will this cause the test to fail? For the context, see WICG/hdcp-detection#2
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.
The test will fail, but if you look at the results you will see the failure due to error NotSupportedException. I think this is better for developers as they will see that it is not supported on the platform (by clear key, for example) and recognize they need to handle the failure. This is similar to the persistent-session tests (that are optional, but it is useful to know that persistent sessions aren't supported).
promise_test( | ||
() => checkHdcpPolicy(''), | ||
testnamePrefix(qualifier, config.keysystem) + | ||
' support for empty HDCP policy.'); |
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.
s/policy/version
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.
Done.
@@ -0,0 +1,26 @@ | |||
function runTest(config, qualifier) | |||
{ | |||
function checkHdcpPolicy(hdcpPolicy) |
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 should be something like checkStatusForMinHdcpVersionPolicy(hdcpVersion)
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.
Done.
// don't bother checking the result returned as it may or | ||
// may not be supported. This simply verifies that | ||
// getStatusForPolicy() exists and doesn't blow up. | ||
return mediaKeys.getStatusForPolicy({minHdcpVersion: hdcpPolicy}); |
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.
see above. s/hdcpPolicy/hdcpVersion
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.
Done.
<html> | ||
<head> | ||
<meta charset=utf-8> | ||
<title>Encrypted Media Extensions: Check HDCP policy with Clear Key</title> |
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.
Here and below and in the file names, to be accurate, this should be something like "Check status for minHdcpVersion policy"
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.
Done. Kept the files names simple with check-hdcp-version.
In [1] there is a proposal to add the ability to know before fetching content
if HDCP (and what version) can be enforced. This adds a test to check if it
is supported.
[1] https://github.com/WICG/hdcp-detection/blob/master/explainer.md