[Bug 26575] New: Separate creation of the MediaKeySession from "message" event generation

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

            Bug ID: 26575
           Summary: Separate creation of the MediaKeySession from
                    "message" event generation
           Product: HTML WG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Encrypted Media Extensions
          Assignee: ddorwin@google.com
          Reporter: ddorwin@google.com
        QA Contact: public-html-bugzilla@w3.org
                CC: domenic@domenicdenicola.com, jdsmith@microsoft.com,
                    mike@w3.org, public-html-media@w3.org,
                    watsonm@netflix.com

The current APIs assume the following model for creating sessions:
  mediaKeys.createSession(initDataType, initData).then(
    function(keySession) {
      keySession.addEventListener("message", licenseRequestReady, false);
    }
  );

This requires that the "message" event not be fired until the resolve function
is run. Unfortunately, there is nothing that guarantees this ordering. We could
try to make the ordering more likely by introducing artificial delays, but that
is really just bandaging over the problem.

The same applies to loadSession() and messages it might generate.

Unless we want to abandon the use of the "message" event for these initial
messages (e.g. license requests), we need to separate the creation of the
MediaKeySession object from anything that might generate a "message" event.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Thursday, 14 August 2014 00:02:38 UTC