[Bug 19078] New: syntax error in handleKeyNeeded examples

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

           Summary: syntax error in handleKeyNeeded examples
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Encrypted Media Extensions
        AssignedTo: adrianba@microsoft.com
        ReportedBy: martin.soukup@irdeto.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-media@w3.org


Current spec has examples in 8.2.1, 8.2.2, and 8.3 with invalid syntax. 8.2.1
example:

  function handleKeyNeeded(event) {
    var video = event.target;
    var initData = event.initData;

    if (!video.keys)
      video.keys = MediaKeys("org.w3.clearkey");
    if (!video.keys)
      throw "Could not create MediaKeys";

    var keySession = mediaKeys.createSession(mimeType, initData);
    if (!keySession)
      throw "Could not create key session";

    keySession.onkeymessage="handleMessage(event)";
  }

"mediaKeys" does not map to a valid variable in this context and I assume
should be "video.keys" since this matches the final example using MediaKeys in
8.4

-- 
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, 26 September 2012 16:56:03 UTC