That, sadly, isn't the case. (It would be much better if it were!) All the existing EME modules are embedded as part of the browser, and there definitely isn't any standardised API to communicate with a module external to the browser.
All EME defines is an API on HTMLMediaElement to communicate with this abstract module, which yes, would allow the case of hiding the key from third parties to be addressed.
The CDMs used by Firefox, Chrome and Opera on Windows and Mac are distinct downloadables although the browsers handle the download automatically.
The CDMs used by Chrome for Android, Edge and Safari are bundled with the underlying platform and aren't embedded in the browser (though these browsers are bundled with their platform).
If you hiding the key from person who is intended recipient you are implementing a DRM, not solution that provides privacy.
The problem that you are mentioning is already solved, and you don't need to hide key from the viewer. It happens as follows:
- content is encrypted using randomly generated symmetric key
- the key is then encrypted using asymmetric public keys of recipients
The recipient has all information necessary to decrypt the information. If your goal is to hide from the recipient the one time key that is only used for the content that the recipient supposed to be able to view, then you're implementing DRM.
Not really. If you want to use the Clear Key key system for privacy, you need to deliver the key over https. (Plain http plus Web Crypto doesn't work against an active adversary.)
To get the key over https, the hosting page needs to be https. Then, due to cross-scheme CORS being prohibited, you also have to fetch the media (MSE segments) over https.
Since https already provides privacy, Clear Key EME doesn't add privacy value beyond protecting against untrusted CDN staff. But if you deliver some JPEGs over the same CDN, you have to trust the CDN staff anyway.
Don't try to post hoc rationalize DRM-motivated constructs as privacy measures.
You simply need client-side decryption for that case, which can be done in a transparent sandbox with audited open source code.
EME can be used to communicate with proprietary DRM components, but those DRM components are not part of the standard, and there is nothing that I've seen in EME that makes DRM the only thing it can be used for.
For instance, couldn't EME be used to make a system to protect the privacy of people sharing personal videos? Encrypt the video and upload to a web server that all the parties sharing have access to. Distribute the decryption keys to the people intended to share the video. Use EME to interface the browser to a component that uses that key to decrypt the video on the fly.
From the browser's point of view there is not really any significant difference between a video that is encrypted for DRM and one that is encrypted for privacy. In the former case those who encrypted it want to keep the key secret from the viewer, whereas in the latter case they want to keep the key secret from third parties. To the browser, these look the same: there is encrypted video, and the browser needs something to decrypt that and hand it the decrypted data for it to display.