[EME] Bug 24213 - MediaKeyNeededEvent's type attribute conflicts with Event's type attribute
authorAdrian Bateman <adrianba@microsoft.com>
Tue, 07 Jan 2014 09:19:07 -0800
changeset 231 1cbd047358a4
parent 230 5356bcc1bf3a
child 232 413d03f8655c
[EME] Bug 24213 - MediaKeyNeededEvent's type attribute conflicts with Event's type attribute
encrypted-media/encrypted-media.html
encrypted-media/encrypted-media.xml
--- a/encrypted-media/encrypted-media.html	Tue Jan 07 09:05:30 2014 -0800
+++ b/encrypted-media/encrypted-media.html	Tue Jan 07 09:19:07 2014 -0800
@@ -263,10 +263,10 @@
 interface <dfn id="dom-mediakeys">MediaKeys</dfn> {
   readonly attribute DOMString <a href="#dom-keysystem">keySystem</a>;
 
-  <a href="#dom-mediakeysession">MediaKeySession</a> <a href="#dom-createsession">createSession</a>(DOMString type, Uint8Array initData);
+  <a href="#dom-mediakeysession">MediaKeySession</a> <a href="#dom-createsession">createSession</a>(DOMString contentType, Uint8Array initData);
   <a href="#dom-mediakeysession">MediaKeySession</a> <a href="#dom-loadsession">loadSession</a>(DOMString sessionId);
 
-  static bool <a href="#dom-istypesupported">isTypeSupported</a>(DOMstring <a href="#key-system">keySystem</a>, DOMString? type);
+  static bool <a href="#dom-istypesupported">isTypeSupported</a>(DOMstring <a href="#key-system">keySystem</a>, DOMString? contentType);
 };
 
 interface <dfn id="dom-mediakeysession">MediaKeySession</dfn> : <a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#eventtarget">EventTarget</a> {
@@ -338,17 +338,17 @@
 
     <p>The <dfn id="dom-keysystem"><code>keySystem</code></dfn> attribute is an identifier for the <a href="#key-system">Key System</a> being used.</p>
 
-    <p>The <dfn id="dom-createsession"><code>createSession(type, initData)</code></dfn> method must run the following steps:</p>
+    <p>The <dfn id="dom-createsession"><code>createSession(contentType, initData)</code></dfn> method must run the following steps:</p>
     <p class="non-normative">Note: The contents of <var title="true">initData</var> are container-specific <a href="#initialization-data">Initialization Data</a>.
-    <var title="true">type</var> specifies the container type and thus how to interpret <var title="true">initData</var>. 
+    <var title="true">contentType</var> specifies the container type and thus how to interpret <var title="true">initData</var>. 
     </p>
-    <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and these should be included in <var title="true">type</var> as appropriate.
+    <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and these should be included in <var title="true">contentType</var> as appropriate.
     However, user agents and <a href="#cdm">CDMs</a> should not treat sessions created with "audio/" differently than those created with "video/".
     That is, there is no such thing as an "audio session" or a "video session" - all sessions are used for all media streams processed by <var title="true">cdm</var>.
     </p>
 
     <ol>
-      <li><p>If <var title="true">type</var> contains a MIME type that is not supported or is not supported by the <code><a href="#dom-keysystem">keySystem</a></code>, throw a <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-not_supported_err">NOT_SUPPORTED_ERR</a></code> exception and abort these steps.</p></li>
+      <li><p>If <var title="true">contentType</var> contains a MIME type that is not supported or is not supported by the <code><a href="#dom-keysystem">keySystem</a></code>, throw a <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-not_supported_err">NOT_SUPPORTED_ERR</a></code> exception and abort these steps.</p></li>
 
       <li>Create a new <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.
         <ol>
@@ -360,7 +360,7 @@
       <li><p>Add the new object to an internal list of session objects.</p></li>
 
       <li>
-<p>Schedule a task to initialize the session, providing <var title="true">type</var>, <var title="true">initData</var>, and the new object.</p>
+<p>Schedule a task to initialize the session, providing <var title="true">contentType</var>, <var title="true">initData</var>, and the new object.</p>
         <p>The user agent will asynchronously execute the following steps in the task:</p>
         <ol>
           <li><p>Let <var title="true">request</var> be null.</p></li>
@@ -375,8 +375,8 @@
 <p>Use <var title="true">cdm</var> to execute the following steps:</p>
             <ol>
               <li>
-<p>Process <var title="true">type</var> and <var title="true">initData</var>.</p>
-              <p class="non-normative">Note: <var title="true">type</var> should be used to determine how to interpret <var title="true">initData</var>.</p>
+<p>Process <var title="true">contentType</var> and <var title="true">initData</var>.</p>
+              <p class="non-normative">Note: <var title="true">contentType</var> should be used to determine how to interpret <var title="true">initData</var>.</p>
               </li>
               <li>
 <p>If a message exchange <span class="non-normative">(e.g. a license request)</span> is required:</p>
@@ -525,7 +525,7 @@
       <li><p>Return the new object to the caller.</p></li>
     </ol>
 
-    <p>The <dfn id="dom-istypesupported"><code>isTypeSupported(keySystem, type)</code></dfn> method returns whether <var title="true">keySystem</var> is supported with the specified container and codec <var title="true">type</var>(s).</p>
+    <p>The <dfn id="dom-istypesupported"><code>isTypeSupported(keySystem, contentType)</code></dfn> method returns whether <var title="true">keySystem</var> is supported with the specified container and codec <var title="true">contentType</var>(s).</p>
     <div class="example">
       <p>The following list shows some examples.</p>
       <dl>
@@ -542,8 +542,8 @@
     
     <ol>
       <li><p>If <var title="true">keySystem</var> contains an unrecognized or unsupported <a href="#key-system">Key System</a>, return false and abort these steps. Key system string comparison is case-sensitive.</p></li>
-      <li><p>If <var title="true">type</var> is null or an empty string, return true and abort these steps.</p></li>
-      <li><p>If the <a href="#key-system">Key System</a> specified by <var title="true">keySystem</var> does not support decrypting the container and/or codec specified by <var title="true">type</var>, return false and abort these steps.</p></li>
+      <li><p>If <var title="true">contentType</var> is null or an empty string, return true and abort these steps.</p></li>
+      <li><p>If the <a href="#key-system">Key System</a> specified by <var title="true">keySystem</var> does not support decrypting the container and/or codec specified by <var title="true">contentType</var>, return false and abort these steps.</p></li>
       <li><p>Return true.</p></li>
     </ol>
 
@@ -765,12 +765,12 @@
     <pre class="idl">
 [Constructor(DOMString type, optional <a href="#dom-mediakeyneededeventinit">MediaKeyNeededEventInit</a> eventInitDict)]
 interface <dfn id="dom-mediakeyneededevent">MediaKeyNeededEvent</dfn> : <a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event">Event</a> {
-  readonly attribute DOMString <a href="#dom-type">type</a>;
+  readonly attribute DOMString <a href="#dom-contenttype">contentType</a>;
   readonly attribute Uint8Array? <a href="#dom-initdata">initData</a>;
 };
 
 dictionary <dfn id="dom-mediakeyneededeventinit">MediaKeyNeededEventInit</dfn> : <a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#eventinit">EventInit</a> {
-  DOMString <a href="#dom-type">type</a>;
+  DOMString <a href="#dom-contenttype">contentType</a>;
   Uint8Array? <a href="#dom-initdata">initData</a>;
 };</pre>
 
@@ -788,7 +788,7 @@
 
     <dl class="domintro">
      <dt>
-<var title="">event</var> . <code><a href="#dom-type">type</a></code>
+<var title="">event</var> . <code><a href="#dom-contenttype">contentType</a></code>
 </dt>
      <dd>
        <p>Returns the MIME type of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> related to the event.</p>
@@ -813,8 +813,8 @@
      </dd>
     </dl>
     <div class="impl">
-    <p>The <dfn id="dom-type"><code>type</code></dfn> attribute contains the MIME type of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> specific to the event. The format of the <code><a href="#dom-initdata">initData</a></code> will depend on the <code><a href="#dom-type">type</a></code>.</p>
-    <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and user agents should include these in <var title="true">type</var> as appropriate.
+    <p>The <dfn id="dom-contenttype"><code>contentType</code></dfn> attribute contains the MIME type of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> specific to the event. The format of the <code><a href="#dom-initdata">initData</a></code> will depend on the <code><a href="#dom-contenttype">contentType</a></code>.</p>
+    <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and user agents should include these in <var title="true">contentType</var> as appropriate.
     However, either variant may be returned for any stream of a given MIME type, and this is does not reflect the type(s) of stream(s) in the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.
     Applications processing this attribute should handle all such variants.
     </p>
@@ -914,7 +914,7 @@
         <p><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-needkey">needkey</a></code> at the <a href="#media-element">media element</a>.</p>
         <p>The event is of type <code><a href="#dom-mediakeyneededevent">MediaKeyNeededEvent</a></code> and has:</p>
         <ul style="list-style-type:none"><li>
-          <code><a href="#dom-type">type</a></code> = the MIME type of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> container format<br>
+          <code><a href="#dom-contenttype">contentType</a></code> = the MIME type of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> container format<br>
           <code><a href="#dom-initdata">initData</a></code> = <var title="">initData</var>
         </li></ul>
         <p class="non-normative">Firing this event allows the application to begin acquiring the key process before it is needed.</p>
@@ -1311,7 +1311,7 @@
     if (!video.<a href="#dom-attrmediakeys">mediaKeys</a>)
       throw "Could not create MediaKeys";
 
-    var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-type">type</a>, event.<a href="#dom-initdata">initData</a>);
+    var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-contenttype">contentType</a>, event.<a href="#dom-initdata">initData</a>);
     if (!keySession)
       throw "Could not create key session";
 
@@ -1351,7 +1351,7 @@
     if (!video.<a href="#dom-attrmediakeys">mediaKeys</a>)
       throw "Could not create MediaKeys";
 
-    var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-type">type</a>, event.<a href="#dom-initdata">initData</a>);
+    var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-contenttype">contentType</a>, event.<a href="#dom-initdata">initData</a>);
     if (!keySession)
       throw "Could not create key session";
 
@@ -1411,7 +1411,7 @@
     if (!video.<a href="#dom-attrmediakeys">mediaKeys</a>)
       throw "Could not create MediaKeys";
 
-    var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-type">type</a>, event.<a href="#dom-initdata">initData</a>);
+    var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-contenttype">contentType</a>, event.<a href="#dom-initdata">initData</a>);
     if (!keySession)
       throw "Could not create key session";
 
@@ -1490,7 +1490,7 @@
     if (!video.<a href="#dom-attrmediakeys">mediaKeys</a>)
       throw "Could not create MediaKeys";
 
-    var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-type">type</a>, event.<a href="#dom-initdata">initData</a>);
+    var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-contenttype">contentType</a>, event.<a href="#dom-initdata">initData</a>);
     if (!keySession)
       throw "Could not create key session";
 
--- a/encrypted-media/encrypted-media.xml	Tue Jan 07 09:05:30 2014 -0800
+++ b/encrypted-media/encrypted-media.xml	Tue Jan 07 09:19:07 2014 -0800
@@ -260,10 +260,10 @@
 interface <precodedfn>MediaKeys</precodedfn> {
   readonly attribute DOMString <precoderef>keySystem</precoderef>;
 
-  <precoderef>MediaKeySession</precoderef> <premethodref>createSession</premethodref>(DOMString type, Uint8Array initData);
+  <precoderef>MediaKeySession</precoderef> <premethodref>createSession</premethodref>(DOMString contentType, Uint8Array initData);
   <precoderef>MediaKeySession</precoderef> <premethodref>loadSession</premethodref>(DOMString sessionId);
 
-  static bool <premethodref>isTypeSupported</premethodref>(DOMstring <a href="#key-system">keySystem</a>, DOMString? type);
+  static bool <premethodref>isTypeSupported</premethodref>(DOMstring <a href="#key-system">keySystem</a>, DOMString? contentType);
 };
 
 interface <precodedfn>MediaKeySession</precodedfn> : <dom4ref name="eventtarget">EventTarget</dom4ref> {
@@ -334,17 +334,17 @@
 
     <p>The <codedfn>keySystem</codedfn> attribute is an identifier for the <a href="#key-system">Key System</a> being used.</p>
 
-    <p>The <methoddfn name="createSession">createSession(<var title="true">type</var>, <var title="true">initData</var>)</methoddfn> method must run the following steps:</p>
+    <p>The <methoddfn name="createSession">createSession(<var title="true">contentType</var>, <var title="true">initData</var>)</methoddfn> method must run the following steps:</p>
     <p class="non-normative">Note: The contents of <var title="true">initData</var> are container-specific <a href="#initialization-data">Initialization Data</a>.
-    <var title="true">type</var> specifies the container type and thus how to interpret <var title="true">initData</var>. 
+    <var title="true">contentType</var> specifies the container type and thus how to interpret <var title="true">initData</var>. 
     </p>
-    <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and these should be included in <var title="true">type</var> as appropriate.
+    <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and these should be included in <var title="true">contentType</var> as appropriate.
     However, user agents and <a href="#cdm">CDMs</a> should not treat sessions created with "audio/" differently than those created with "video/".
     That is, there is no such thing as an "audio session" or a "video session" - all sessions are used for all media streams processed by <var title="true">cdm</var>.
     </p>
 
     <ol>
-      <li><p>If <var title="true">type</var> contains a MIME type that is not supported or is not supported by the <coderef>keySystem</coderef>, throw a <not-supported-err/> exception and abort these steps.</p></li>
+      <li><p>If <var title="true">contentType</var> contains a MIME type that is not supported or is not supported by the <coderef>keySystem</coderef>, throw a <not-supported-err/> exception and abort these steps.</p></li>
 
       <li>Create a new <coderef>MediaKeySession</coderef> object.
         <ol>
@@ -355,7 +355,7 @@
       
       <li><p>Add the new object to an internal list of session objects.</p></li>
 
-      <li><p>Schedule a task to initialize the session, providing <var title="true">type</var>, <var title="true">initData</var>, and the new object.</p>
+      <li><p>Schedule a task to initialize the session, providing <var title="true">contentType</var>, <var title="true">initData</var>, and the new object.</p>
         <p>The user agent will asynchronously execute the following steps in the task:</p>
         <ol>
           <li><p>Let <var title="true">request</var> be null.</p></li>
@@ -368,8 +368,8 @@
           <li><p>Let <var title="true">cdm</var> be the <var title="true">cdm</var> loaded in the <a href="#dom-media-keys-constructor"><code>MediaKeys</code> constructor</a>.</p></li>
           <li><p>Use <var title="true">cdm</var> to execute the following steps:</p>
             <ol>
-              <li><p>Process <var title="true">type</var> and <var title="true">initData</var>.</p>
-              <p class="non-normative">Note: <var title="true">type</var> should be used to determine how to interpret <var title="true">initData</var>.</p>
+              <li><p>Process <var title="true">contentType</var> and <var title="true">initData</var>.</p>
+              <p class="non-normative">Note: <var title="true">contentType</var> should be used to determine how to interpret <var title="true">initData</var>.</p>
               </li>
               <li><p>If a message exchange <span class="non-normative">(e.g. a license request)</span> is required:</p>
                 <ol>
@@ -506,7 +506,7 @@
       <li><p>Return the new object to the caller.</p></li>
     </ol>
 
-    <p>The <methoddfn name="isTypeSupported">isTypeSupported(<var title="true">keySystem</var>, <var title="true">type</var>)</methoddfn> method returns whether <var title="true">keySystem</var> is supported with the specified container and codec <var title="true">type</var>(s).</p>
+    <p>The <methoddfn name="isTypeSupported">isTypeSupported(<var title="true">keySystem</var>, <var title="true">contentType</var>)</methoddfn> method returns whether <var title="true">keySystem</var> is supported with the specified container and codec <var title="true">contentType</var>(s).</p>
     <div class="example">
       <p>The following list shows some examples.</p>
       <dl>
@@ -523,8 +523,8 @@
     
     <ol>
       <li><p>If <var title="true">keySystem</var> contains an unrecognized or unsupported <a href="#key-system">Key System</a>, return false and abort these steps. Key system string comparison is case-sensitive.</p></li>
-      <li><p>If <var title="true">type</var> is null or an empty string, return true and abort these steps.</p></li>
-      <li><p>If the <a href="#key-system">Key System</a> specified by <var title="true">keySystem</var> does not support decrypting the container and/or codec specified by <var title="true">type</var>, return false and abort these steps.</p></li>
+      <li><p>If <var title="true">contentType</var> is null or an empty string, return true and abort these steps.</p></li>
+      <li><p>If the <a href="#key-system">Key System</a> specified by <var title="true">keySystem</var> does not support decrypting the container and/or codec specified by <var title="true">contentType</var>, return false and abort these steps.</p></li>
       <li><p>Return true.</p></li>
     </ol>
 
@@ -726,12 +726,12 @@
     <pre class="idl">
 [Constructor(DOMString type, optional <precoderef>MediaKeyNeededEventInit</precoderef> eventInitDict)]
 interface <precodedfn>MediaKeyNeededEvent</precodedfn> : <dom4ref name="event">Event</dom4ref> {
-  readonly attribute DOMString <precoderef>type</precoderef>;
+  readonly attribute DOMString <precoderef>contentType</precoderef>;
   readonly attribute Uint8Array? <precoderef>initData</precoderef>;
 };
 
 dictionary <precodedfn>MediaKeyNeededEventInit</precodedfn> : <dom4ref name="eventinit">EventInit</dom4ref> {
-  DOMString <precoderef>type</precoderef>;
+  DOMString <precoderef>contentType</precoderef>;
   Uint8Array? <precoderef>initData</precoderef>;
 };</pre>
 
@@ -748,7 +748,7 @@
 };</pre>
 
     <dl class="domintro">
-     <dt><var title="">event</var> . <coderef>type</coderef></dt>
+     <dt><var title="">event</var> . <coderef>contentType</coderef></dt>
      <dd>
        <p>Returns the MIME type of the <videoanchor name="media-data">media data</videoanchor> related to the event.</p>
      </dd>
@@ -766,8 +766,8 @@
      </dd>
     </dl>
     <div class="impl">
-    <p>The <codedfn>type</codedfn> attribute contains the MIME type of the <videoanchor name="media-data">media data</videoanchor> specific to the event. The format of the <coderef>initData</coderef> will depend on the <coderef>type</coderef>.</p>
-    <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and user agents should include these in <var title="true">type</var> as appropriate.
+    <p>The <codedfn>contentType</codedfn> attribute contains the MIME type of the <videoanchor name="media-data">media data</videoanchor> specific to the event. The format of the <coderef>initData</coderef> will depend on the <coderef>contentType</coderef>.</p>
+    <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and user agents should include these in <var title="true">contentType</var> as appropriate.
     However, either variant may be returned for any stream of a given MIME type, and this is does not reflect the type(s) of stream(s) in the <videoanchor name="media-data">media data</videoanchor>.
     Applications processing this attribute should handle all such variants.
     </p>
@@ -866,7 +866,7 @@
         <p><Queue-a-task/> to <fire-a-simple-event/> named <coderef>needkey</coderef> at the <a href="#media-element">media element</a>.</p>
         <p>The event is of type <coderef>MediaKeyNeededEvent</coderef> and has:</p>
         <ul style="list-style-type:none"><li>
-          <coderef>type</coderef> = the MIME type of the <videoanchor name="media-data">media data</videoanchor> container format<br></br>
+          <coderef>contentType</coderef> = the MIME type of the <videoanchor name="media-data">media data</videoanchor> container format<br></br>
           <coderef>initData</coderef> = <var title="">initData</var>
         </li></ul>
         <p class="non-normative">Firing this event allows the application to begin acquiring the key process before it is needed.</p>
@@ -1250,7 +1250,7 @@
     if (!video.<precoderef prefix="attr">mediaKeys</precoderef>)
       throw "Could not create MediaKeys";
 
-    var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>type</precoderef>, event.<precoderef>initData</precoderef>);
+    var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>contentType</precoderef>, event.<precoderef>initData</precoderef>);
     if (!keySession)
       throw "Could not create key session";
 
@@ -1290,7 +1290,7 @@
     if (!video.<precoderef prefix="attr">mediaKeys</precoderef>)
       throw "Could not create MediaKeys";
 
-    var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>type</precoderef>, event.<precoderef>initData</precoderef>);
+    var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>contentType</precoderef>, event.<precoderef>initData</precoderef>);
     if (!keySession)
       throw "Could not create key session";
 
@@ -1350,7 +1350,7 @@
     if (!video.<precoderef prefix="attr">mediaKeys</precoderef>)
       throw "Could not create MediaKeys";
 
-    var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>type</precoderef>, event.<precoderef>initData</precoderef>);
+    var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>contentType</precoderef>, event.<precoderef>initData</precoderef>);
     if (!keySession)
       throw "Could not create key session";
 
@@ -1429,7 +1429,7 @@
     if (!video.<precoderef prefix="attr">mediaKeys</precoderef>)
       throw "Could not create MediaKeys";
 
-    var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>type</precoderef>, event.<precoderef>initData</precoderef>);
+    var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>contentType</precoderef>, event.<precoderef>initData</precoderef>);
     if (!keySession)
       throw "Could not create key session";