[Bug 24081] The READY state is too limiting and should be more like the PENDING state

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

David Dorwin <ddorwin@google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from David Dorwin <ddorwin@google.com> ---
The issues in this bug are resolved by the implementation of promises (bug
25199) and removal of states.

(In reply to David Dorwin from comment #4)
> *** PROPOSAL ***
> Since createSession() and loadSession() are asynchronous (and must wait for
> the CDM to be initialized), it seems useful to always have an indication
> that those functions have completed and are initialized/opened. For
> discussion purposes, I propose we fire an 'open' event to transition to the
> OPEN state. The 'open' event would be fired unless there is a failure to
> create/load the session, in which case the 'error' event is fired. The
> 'open' event also serves as an indication that update() may be called.

createSession() and loadSession() now return a promise that is resolved when
the algorithms complete (equivalent of the 'open' event above) and rejected
when an error occurs ('error' event above). The resolve function receives the
session object, which allows update() to be called.

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

Received on Tuesday, 15 April 2014 21:21:38 UTC