Closed Bug 1131755 Opened 5 years ago Closed 5 years ago
Global pref to disable DRM should make EME APIs inert instead of hiding them from Web
Websites will need to detect whether DRM is disabled so they can provide different messaging for disabled vs unsupported DRM.
Add a pref media.eme.apiVisible and make WebIDL bindings depend on that rather than media.eme.enabled. This is so that if a user disables EME in our UI, the EME API can be called by content and we can detect the calls failing in Gecko, notify chrome, and our UI can throw up a notification explaining to users what's going on. The work to make notify chrome will happen in bug 1111160 and dependents.
Attachment #8562653 - Flags: review?(bzbarsky)
Comment on attachment 8562653 [details] [diff] [review] Patch: Add pref to make EME visible in WebIDL bindings >+ p->MaybeReject(NS_ERROR_DOM_NOT_SUPPORTED_ERR); Hmm. Would NS_ERROR_DOM_INVALID_ACCESS_ERR make more sense? Or NS_ERROR_DOM_INVALID_STATE_ERR? In general, it seems like it would be good for the spec to define what to reject with here... r=me modulo that.
Attachment #8562653 - Flags: review?(bzbarsky) → review+
Based on the draft spec, it seems NS_ERROR_DOM_INVALID_ACCESS_ERR is for when the API is called with invalid arguments, and NS_ERROR_DOM_INVALID_STATE_ERR for when you're calling the API out of sequence, i.e. the object isn't in the right state to be called? Rejecting with NS_ERROR_DOM_NOT_SUPPORTED_ERR means we behave as if no keySystems/configurations or thereof are supported, which is basically the case when the user disables the API... So should we leave it at NS_ERROR_DOM_NOT_SUPPORTED_ERR? NS_ERROR_DOM_INVALID_STATE_ERR seems next best to me.
> So should we leave it at NS_ERROR_DOM_NOT_SUPPORTED_ERR? Yeah, I can live with that.
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/62b1b41d58f0642404b7e6421d1669d8c6c8b85f Bug 1131755 - Make media.eme.enabled pref enable/disable EME rather than hide/expose EME. r=bz
Patch for beta branch as part of EME platform uplift.
Comment on attachment 8572366 [details] [diff] [review] Beta patch Requesting retroactive approval for Beta landing as part of EME platform uplift.
Attachment #8572366 - Flags: approval-mozilla-beta?
Comment on attachment 8572366 [details] [diff] [review] Beta patch Approved for Beta as part of EME platform uplift.
Attachment #8572366 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.