<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>19078</bug_id>
          
          <creation_ts>2012-09-26 16:55:56 +0000</creation_ts>
          <short_desc>syntax error in handleKeyNeeded examples</short_desc>
          <delta_ts>2012-10-29 17:06:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>Encrypted Media Extensions</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Soukup">martin.soukup</reporter>
          <assigned_to name="David Dorwin">ddorwin</assigned_to>
          <cc>ddorwin</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-media</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>74556</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Soukup">martin.soukup</who>
    <bug_when>2012-09-26 16:55:56 +0000</bug_when>
    <thetext>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(&quot;org.w3.clearkey&quot;);
    if (!video.keys)
      throw &quot;Could not create MediaKeys&quot;;

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

    keySession.onkeymessage=&quot;handleMessage(event)&quot;;
  }

&quot;mediaKeys&quot; does not map to a valid variable in this context and I assume should be &quot;video.keys&quot; since this matches the final example using MediaKeys in 8.4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77309</commentid>
    <comment_count>1</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2012-10-29 17:06:32 +0000</bug_when>
    <thetext>Fixed in http://dvcs.w3.org/hg/html-media/rev/b2f27fc0f5f6</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>