[Bug 23955] New: Add optional MediaKeys.loadSession(DOMString sessionId) method

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

            Bug ID: 23955
           Summary: Add optional MediaKeys.loadSession(DOMString
                    sessionId) method
           Product: HTML WG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Encrypted Media Extensions
          Assignee: ddorwin@google.com
          Reporter: ddorwin@google.com
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-media@w3.org

Various use cases involving loading data from storage have been discussed.
While I still think it’s best for interop (and UA implementors) to avoid this
as much as possible, it’s probably better to provide a logical mechanism than
to have non-standard hacks using createSession() parameters or implicit
loading. It also allows the spec to guide such use cases, such as requiring
that same origin be enforced. Defining something (even tentatively) will also
allow us to focus discussion and explore related issues.

I propose adding an optional loadSession(DOMString sessionId) method that is a
peer to createSession(). When supported, it creates a MediaKeySession object
for the previously created session - specified by |sessionId| - and populates
it with data from CDM storage. The new session object follows the same state
transitions as other sessions, including possibly firing a message event or
moving directly to READY.

Since this method is not required for most use cases, it is optional and need
not be implemented by user agents or CDMs. Feature detection is simple:
* If the user agent does not support loading sessions or knows the keySystem
does not, throw NOT_SUPPORTED_ERR.
* If the CDM does not support loading sessions (but the user agent did not know
this above) fire an error event with NOT_SUPPORTED_ERR at the new session.

If the sessionId is not found within the current origin, fire an error event
with “NotFoundError” at the new session.

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

Received on Monday, 2 December 2013 19:04:51 UTC