Bug 20622 - SessionID may be assigned asynchronously in MediaKeys.createSession
Summary: SessionID may be assigned asynchronously in MediaKeys.createSession
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Encrypted Media Extensions (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: David Dorwin
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on: 20688 21854
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-09 21:27 UTC by Mark Watson
Modified: 2013-10-29 00:41 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Watson 2013-01-09 21:27:13 UTC
It's noted in createSession() step 4.2 that the session ID may be assigned by the CDM. It is also assigned by the CDM in the proposed method for retrieval of sessions associated with deleted keys (see https://www.w3.org/Bugs/Public/show_bug.cgi?id=17199).

This means the assignment of the sessionID may happen asynchronously.

I propose we specify that the sessionId may be null when the MediaKeySession is first created and MUST be assigned before the first event is fired on the MediaKeySession.
Comment 1 David Dorwin 2013-01-09 21:36:15 UTC
Even ignoring bug 17199, there may be concern about synchronously generating the session ID in the CDM. It is nice to have a simple rule (sessionId is always valid), but I don't know how practical that is for implementations.

Barring that, maybe we can say it must be valid before the first event is fired at the object.
Comment 2 David Dorwin 2013-03-26 15:23:57 UTC
Agreed on in the 3/26 call. Mark to update the draft to state that session ID will be set before the first keymessage. In other words, it may be set asynchronously.
Comment 3 David Dorwin 2013-04-24 18:55:31 UTC
March 26th telecon minutes: http://www.w3.org/2013/03/26-html-media-minutes.html#item05

The discussion included discussion of state(s) and event(s). I think we should resolve the state/event discussion in bug 20688 before defining when sessionId is valid.
Comment 4 Adrian Bateman [MSFT] 2013-04-24 22:46:59 UTC
I think that the "initialized" state that we discussed as part of the session life cycle discussion in the F2F might be the one where sessionID is established.
Comment 5 David Dorwin 2013-04-27 00:55:38 UTC
The states and session life cycle are tracked in bug 21854. We will address this after or as part of that bug.
Comment 6 David Dorwin 2013-10-26 01:02:33 UTC
I have changes to address this.
Comment 7 David Dorwin 2013-10-28 20:17:18 UTC
I made sessionID assignment asynchronous in https://dvcs.w3.org/hg/html-media/rev/cc4f10560960
Comment 8 David Dorwin 2013-10-29 00:41:09 UTC
More tweaks in https://dvcs.w3.org/hg/html-media/rev/7c4bb47218ce