Re: [EME] Spec now uses promises

Hi Jerry,

I'm not sure exactly what you mean. I did implement resolving the
createSession() promise with to address
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25268. Are you asking if I
considered returning an existing object instead? I think such ambiguity
might be confusing, and I'm not sure what the application would intend to
do with an existing session.

However, the problem I was referring to in my original email is related to
the asynchronous creation of the MediaKeys object more than whether there
is an existing session.

David


On Thu, May 1, 2014 at 5:16 PM, Jerry Smith (WINDOWS) <jdsmith@microsoft.com
> wrote:

>  Hi David;
>
>
>
> I’ve been pondering have promise return null on an existing session.  This
> conveys that no new session was needed, and limits any subsequent
> handling.  Did you consider returning the current session instead?
>
>
>
> Jerry
>
>
>
> *From:* David Dorwin [mailto:ddorwin@google.com]
> *Sent:* Monday, April 14, 2014 3:53 PM
> *To:* public-html-media@w3.org
> *Subject:* [EME] Spec now uses promises
>
>
>
> I just committed a large changeset<https://dvcs.w3.org/hg/html-media/rev/9842af174b80>that implements promises per bug
> 25199 <http://bug%2025199>.
>
>
>
> The examples<https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#examples>are also updated*, and that is possibly the most interesting change.
> MediaKeys and MediaKeySession creation is more complex, especially when
> supporting more than one session in response to needkey events  as in example
> 8.2<https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#examples-selecting-key-system>.
> Since there may not be a MediaKeys object, initData must be queued. Also,
> we need an additional variable to determine whether there is a pending
> MediaKeys creation because video.mediaKeys is asynchronously set sometime
> after MediaKeys.create() asynchronously completes.
>
>
>
> There will be more changes soon as I resolve bugs that were dependent on
> promises.
>
>
>
> David
>
>
>
> * Please let me know if there are errors or better solutions.
>

Received on Friday, 2 May 2014 00:47:28 UTC