[Bug 25923] isTypeSupported should be asynchronous

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25923

--- Comment #22 from Jerry Smith <jdsmith@microsoft.com> ---
I agree the UA should be responsible for indicating CDM install progress.

I looked at two other specs that have permission aspects:

1.  The Geolocation API Spec puts responsibility on the UA to get user
permissions before specific APIs can be called.  The mechanism for doing that
is not defined in the spec.  Presumably, an app attempting to access these APIs
would trigger the UA to request access permission.
2.  The Web Notifications spec has a requestPermission command that must be
completed with a "granted" response before notification APIs may be used.

One reason we want to keep IsTypeSupported synchronous is that in the general
case it should execute quickly and simply, so that media download can be
started quickly.  A synchronous command assures that.

One possible solution that retains this synchronous nature is to have
IsTypeSupported return a "maybe" (or perhaps a new response) for cases where
the keySystem is nominally supported, but not available.  Media could be
speculatively downloaded to start playback while user permissions are requested
and obtained.  This would require we add a command specifically to activate the
CDM.  Perhaps:

Promise<void> ActivateCDM((DOMstring keySystem);

The processing steps for this might be something like this:

1.  Confirm the keySystem is valid, supported and allowed.  If not, return
DOMExceptions.
2.  Let promise be a new promise
3.  Process the CDM activation
4.  Resolve promise with activation outcome
5.  Return promise.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 12 September 2014 20:06:22 UTC