Should the result of the API depend on key system, given HDCP is independent of CDM? Is there any requirement that platform must get these values from CDM?
Good questions. Note that the proposal is not limited to HDCP, it's more about "policy check". Since only the CDM knows exactly how policies work, we prefer to plumbing this to the CDM to get the answer. Also, this is to avoid having the same checking code duplicated in the CDM, and in Chromium. Also, if you do implement the check outside the CDM, since the implementation could be different from what the CDM does, the result could potentially be inconsistent.
That said, for HDCP policy, given the rules are pretty clear, if you are confident that you can get the same result without going through the actual CDM, you can implement it somewhere else.
ClearKey doesn't support HDCP policies, so it'll just reject the promise indicating that the policy is not supported:
https://cs.chromium.org/chromium/src/media/base/content_decryption_module.cc?rcl=a1e0a375eb4fbd011befa0bba5956b2488de32e8&l=20
For Chromecast, HDCP is always enforced, even for clear content. Also, Android should be similar. If the Android platform decides to enforce HDCP all the time, we should also report the correct value. Creating a Widevine MediaDrm and querying HDCP is a potential solution for ClearKey.
Agree, if there're other policy checks, we'd better to ask CDM.
This has already been implemented in Chromium in July.
Now each individual CDM needs to implement this. For example, on ChromeCast this is implemented in https://chromium-review.googlesource.com/c/chromium/src/+/676102.
With that, I'll update the title to emphasize that this issue tracks the Chromium side only, and mark it as fixed. We'll track CDM implementations separately.
Comment 1 by xhw...@chromium.org
, Apr 7 2017