[EME] Bug 20691 - Make both createSession() parameters required.
authorDavid Dorwin <ddorwin@google.com>
Fri, 24 May 2013 15:31:11 -0700
changeset 125 4a8be9f80c1a
parent 124 7114209313a8
child 126 85fbfad2339e
[EME] Bug 20691 - Make both createSession() parameters required.
encrypted-media/encrypted-media.html
encrypted-media/encrypted-media.xml
--- a/encrypted-media/encrypted-media.html	Fri May 24 14:12:02 2013 -0700
+++ b/encrypted-media/encrypted-media.html	Fri May 24 15:31:11 2013 -0700
@@ -60,11 +60,11 @@
       <h2 id="draft-date">W3C Editor's Draft 6 May 2013</h2>
       <dl>
         <dt>This Version:</dt>
-        <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html</a></dd>
+        <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html</a></dd>
         <dt>Latest Published Version:</dt>
         <dd><a href="http://www.w3.org/TR/encrypted-media/">http://www.w3.org/TR/encrypted-media/</a></dd>
         <dt>Latest editor's draft:</dt>
-        <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html</a></dd>
+        <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html</a></dd>
         <dt>Editors:</dt>
         <dd>David Dorwin, Google, Inc.</dd>
         <dd>Adrian Bateman, Microsoft Corporation</dd>
@@ -273,7 +273,7 @@
 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 type, Uint8Array initData);
 
   static bool <a href="#dom-istypesupported">isTypeSupported</a>(DOMString type, DOMstring <a href="#key-system">keySystem</a>);
 };
@@ -357,8 +357,6 @@
     <p class="non-normative">Note: The contents of <var title="true">initData</var> are container-specific <a href="#initialization-data">Initialization Data</a>.</p>
 
     <ol>
-      <li><p>If <var title="true">type</var> is null or an empty string and <var title="true">initData</var> is <em>not</em> null or an empty string, throw an <code><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception and abort these steps.</p></li>
-      
       <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="http://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>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>
@@ -388,7 +386,7 @@
                   <p>Note: <var title="true">cdm</var> must not use any stream-specific data, including <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>, not provided via <var title="true">initData</var>.</p>
                   <p class="non-normative"><var title="true">type</var> may be used to determine how to interpret <var title="true">initData</var>.</p>
                 </li>
-                <li><p>If <var title="true">initData</var> is not null and contains a default URL for <var title="true">keySystem</var>, let <var title="true">defaultURL</var> be that URL.</p></li> 
+                <li><p>If <var title="true">initData</var> contains a default URL for <var title="true">keySystem</var>, let <var title="true">defaultURL</var> be that URL.</p></li> 
               </ol>
               </dd>
               <dt>Otherwise</dt>
--- a/encrypted-media/encrypted-media.xml	Fri May 24 14:12:02 2013 -0700
+++ b/encrypted-media/encrypted-media.xml	Fri May 24 15:31:11 2013 -0700
@@ -59,11 +59,11 @@
       <h2 id="draft-date">W3C Editor's Draft 6 May 2013</h2>
       <dl>
         <dt>This Version:</dt>
-        <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html</a></dd>
+        <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html</a></dd>
         <dt>Latest Published Version:</dt>
         <dd><a href="http://www.w3.org/TR/encrypted-media/">http://www.w3.org/TR/encrypted-media/</a></dd>
         <dt>Latest editor's draft:</dt>
-        <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html</a></dd>
+        <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html</a></dd>
         <dt>Editors:</dt>
         <dd>David Dorwin, Google, Inc.</dd>
         <dd>Adrian Bateman, Microsoft Corporation</dd>
@@ -269,7 +269,7 @@
 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 type, Uint8Array initData);
 
   static bool <premethodref>isTypeSupported</premethodref>(DOMString type, DOMstring <a href="#key-system">keySystem</a>);
 };
@@ -347,8 +347,6 @@
     <p class="non-normative">Note: The contents of <var title="true">initData</var> are container-specific <a href="#initialization-data">Initialization Data</a>.</p>
 
     <ol>
-      <li><p>If <var title="true">type</var> is null or an empty string and <var title="true">initData</var> is <em>not</em> null or an empty string, throw an <invalid-access-err/> exception and abort these steps.</p></li>
-      
       <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>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>
@@ -375,7 +373,7 @@
                   <p>Note: <var title="true">cdm</var> must not use any stream-specific data, including <videoanchor name="media-data">media data</videoanchor>, not provided via <var title="true">initData</var>.</p>
                   <p class="non-normative"><var title="true">type</var> may be used to determine how to interpret <var title="true">initData</var>.</p>
                 </li>
-                <li><p>If <var title="true">initData</var> is not null and contains a default URL for <var title="true">keySystem</var>, let <var title="true">defaultURL</var> be that URL.</p></li> 
+                <li><p>If <var title="true">initData</var> contains a default URL for <var title="true">keySystem</var>, let <var title="true">defaultURL</var> be that URL.</p></li> 
               </ol>
               </dd>
               <dt>Otherwise</dt>