W3C home > Mailing lists > Public > public-html@w3.org > March 2012

[Bug 16548] New: Require generateKeyRequest() in all cases for all Key Systems

From: <bugzilla@jessica.w3.org>
Date: Wed, 28 Mar 2012 00:13:22 +0000
To: public-html@w3.org
Message-ID: <bug-16548-2495@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16548

           Summary: Require generateKeyRequest() in all cases for all Key
                    Systems
           Product: HTML WG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Encrypted Media Extensions
        AssignedTo: adrianba@microsoft.com
        ReportedBy: ddorwin@google.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


>From v0.1:
The proposal currently allows addKey() to be called without calling
generateKeyRequest(). This has the advantages that simple use cases, especially
for Clear Key Simple Decryption, are fairly straightforward and simple. The
disadvantages are that user agents need to support multiple flows and
applications written for the simple case are different than those written for
the more general case. In addition, some container formats may not support the
simple case (i.e. if initData is not easily-parsable to obtain a key ID).

It is an open question whether allowing the simple solutions is worth the
effects. See this example
<http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html#issue-disallow-addkey-only-example>
for an illustration of the impact on simple applications.

---------------------------------

With this change, the example in 7.1 would go from:

  <script>
    function load() {
      var video = document.getElementById("video");
      var key = new Uint8Array([ 0xaa, 0xbb, 0xcc, ... ]);
      video.addKey("org.w3.clearkey", key, null);
    }
  </script>

  <body onload="load()">
    <video src="foo.webm" autoplay id="video"></video>
  </body>

to:

  <script>
    function load() {
      var video = document.getElementById("video");

      video.generateKeyRequest("org.w3.clearkey", null);
    }

    function handleMessage(event) {
      if (event.keySystem != "org.w3.clearkey")
        throw "Unhandled keySystem in event";
      var video = event.target;

      var key = new Uint8Array([ 0xaa, 0xbb, 0xcc, ... ]);
      video.addKey("org.w3.clearkey", key, null, event.sessionId);
    }
  </script>

  <body onload="load()">
    <video src="foo.webm" autoplay id="video"
onkeymessage="handleMessage(event)"></video>
  </body>

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Wednesday, 28 March 2012 02:17:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:47 GMT