Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Reject promise with NotSupportedError on unsupported keysystem in 'HDCP Policy Check' proposal (moved from wicg/media-capabilities) #2

Open
mounirlamouri opened this issue May 15, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@mounirlamouri
Copy link
Contributor

Original issue: w3c/media-capabilities#56

/CC @xhwang-chromium @JamesWCCheng

@joeyparrish
Copy link
Member

@JamesWCCheng, this does not make sense because the new method is on MediaKeys. You can't get a MediaKeys instance if the key system is unsupported, so this error would have been reached during requestMediaKeySystemAccess.

(Cross-posted to the original discussion as well.)

@joeyparrish joeyparrish added the invalid This doesn't seem right label Nov 6, 2018
@xhwang-chromium
Copy link

Reading through the old bug, I think "unsupported key system" here means key systems that do not implement/support this "hdcp detection" API, not a key system not supported by the UA. For example, Clear Key key system doesn't do anything about HDCP, and can potentially declare that "hdcp detection" API is not supported.

I see mounirlamouri@'s point that the CDM should "just do what it would do with a real license with certain limitation/requirement (e.g. HDCP reqirement)". The current explainer doc also says:

The new API will allow application developers to query the status of a hypothetical key associated with an HDCP policy...

However, in the example of Clear Key key system, it never expects a license with HDCP requirement. As such, a typically Clear Key CDM implementation wouldn't have code to check HDCP status to determine whether a "hypothetical key associated with an HDCP policy" would be usable or not. Therefore, it's hard and unnecessary to ask all CDMs to implement this API, and I think it makes more sense to have these CDMs declare "HDCP detection" API is not supported.

In summary, I think it makes sense that if a MediaKeys (CDM) doesn't not support this policy check that it should reject the promise with NotSupportedError. This is actually how things are implemented in Blink/Chromium.

If agreed, we should update the explainer doc to reflect this.

@joeyparrish joeyparrish reopened this Dec 21, 2018
@joeyparrish
Copy link
Member

Okay, that makes sense to me.

@mounirlamouri mounirlamouri added enhancement New feature or request and removed invalid This doesn't seem right labels Jan 21, 2019
@xhwang-chromium
Copy link

joeyparrish: I am a bit confused with all the labels :) Just want to make sure this is included when you update the spec.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants