[Bug 25923] isTypeSupported should be asynchronous

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

--- Comment #24 from David Dorwin <ddorwin@google.com> ---
(In reply to Anne from comment #23)
> (In reply to Jerry Smith from comment #22)
> > 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.
> 
> Given that a promise's handlers would execute end-of-task and a download
> would at best be next-task, the quickness seems equal.

Neither task could be executed until the user has responded - this would add an
unknown delay. (You could argue that this is once per user, but we also want to
handle any other permission dialogs in the same way.)

> > Promise<void> ActivateCDM((DOMstring keySystem);
> 
> Would we require this to be always invoked, for all implementations? Also,
> how can you activate it if isTypeSupported returns "maybe"?

This is basically the same signature as create():
  Promise<MediaKeys> create(DOMString keySystem);

Why do we need an additional method when we already have one that all
applications must call on all implementations?

Reusing "maybe" and create() also avoids leaking state, including whether the
CDM was previous installed (by another origin).

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

Received on Monday, 15 September 2014 17:38:21 UTC