[EME] Bug 25409 - Clarify that the CDM must be certain a key is usable.
authorDavid Dorwin <ddorwin@google.com>
Wed, 07 May 2014 16:13:46 -0700
changeset 307 d426f69d04bc
parent 306 5a3cac55ca65
child 308 3e43535939f2
[EME] Bug 25409 - Clarify that the CDM must be certain a key is usable.
encrypted-media/encrypted-media.html
encrypted-media/encrypted-media.xml
--- a/encrypted-media/encrypted-media.html	Wed May 07 15:48:37 2014 -0700
+++ b/encrypted-media/encrypted-media.html	Wed May 07 16:13:46 2014 -0700
@@ -355,6 +355,10 @@
   // session properties
   readonly attribute DOMString <a href="#dom-sessionkeysystem">keySystem</a>;
   readonly attribute DOMString <a href="#dom-sessionid">sessionId</a>;
+  <div class="issue">
+<div class="issue-title"><span>Issue 7</span></div>
+<p class=""><a href="#dom-usablekeyids">usableKeyIds</a> is not WebIDL-compliant. See <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25594">Bug 25594</a>.</p>
+</div>
   readonly attribute Array&lt;Uint8Array&gt; <a href="#dom-usablekeyids">usableKeyIds</a>;
   readonly attribute Promise&lt;any&gt; <a href="#dom-closed">closed</a>;
 
@@ -554,8 +558,8 @@
               <li><p>Set the <code><a href="#dom-sessionkeysystem">keySystem</a></code> attribute to the value of the <code><a href="#dom-mediakeys">MediaKeys</a></code> object's <code><a href="#dom-keysystem">keySystem</a></code> attribute.</p></li>
               <li><p>Set the <code><a href="#dom-sessionid">sessionId</a></code> attribute to <var title="true">sessionId</var>.</p></li>
               <li>
-<p>Set the <code><a href="#dom-usablekeyids">usableKeyIds</a></code> attribute to an Array containing the set of key IDs for which the session contains a currently usable key.</p>
-                <p>The <a href="#algorithms-update-usable-key-ids">Update Usable Key IDs</a> algorithm may also be run later should additional processing be necessary.</p>
+<p>Set the <code><a href="#dom-usablekeyids">usableKeyIds</a></code> attribute to an Array containing the set of key IDs for which the session contains a key the CDM <em>knows</em> is currently usable.</p>
+                <p>The <a href="#algorithms-update-usable-key-ids">Update Usable Key IDs</a> algorithm may also be run later should additional processing be necessary to determine with certainty whether one or more keys is usable.</p>
               </li>
               <li><p>Let <code><a href="#dom-closed">closed</a></code> be a new promise.</p></li>
               <li><p>Let the session type be "<code><a href="#dom-sessiontypepersistent">persistent</a></code>".</p></li>
@@ -700,7 +704,8 @@
 
     <p>The <dfn id="dom-sessionid"><code>sessionId</code></dfn> attribute is the <a href="#session-id">Session ID</a> for this object and the associated key(s) or license(s).</p>
 
-    <p>The <dfn id="dom-usablekeyids"><code>usableKeyIds</code></dfn> attribute is an array of key IDs for keys in the session that are currently usable to decrypt <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.
+    <p>The <dfn id="dom-usablekeyids"><code>usableKeyIds</code></dfn> attribute is an array of key IDs for keys in the session that the CDM <em>knows</em> are currently usable usable to decrypt <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.
+      It must not contain IDs for keys that <em>may not</em> currently be usable.
       Each element must be unique.
     </p>
 
@@ -743,7 +748,7 @@
               </li> 
               <li>
 <p>If the set of usable keys changed, run the <a href="#algorithms-update-usable-key-ids">Update Usable Key IDs</a> algorithm on the <var title="true">session</var>.</p>
-                <p>The algorithm may also be run later should additional processing be necessary.</p>
+                <p>The algorithm may also be run later should additional processing be necessary to determine with certainty whether one or more keys is usable.</p>
               </li>
               <li>
 <p>If another message needs to be sent to the server, execute the following steps:</p>
@@ -1249,7 +1254,7 @@
     <p>The following steps are run:</p>
     <ol>
       <li><p>Let the <var title="true">session</var> be the associated <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</p></li>
-      <li><p>Let <var title="true">usable key ids</var> be an Array containing the set of key IDs for which the session contains a currently usable key.</p></li>
+      <li><p>Let <var title="true">usable key ids</var> be an Array containing the set of key IDs for which the session contains a key the CDM <em>knows</em> is currently usable.</p></li>
       <li><p>Set the <var title="true">session</var>'s <code><a href="#dom-usablekeyids">usableKeyIds</a></code> attribute to <var title="true">usable key ids</var>.</p></li>
       <li><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-eventkeyschange">keyschange</a></code> at the <var title="true">session</var>.</p></li>
     </ol>
--- a/encrypted-media/encrypted-media.xml	Wed May 07 15:48:37 2014 -0700
+++ b/encrypted-media/encrypted-media.xml	Wed May 07 16:13:46 2014 -0700
@@ -352,6 +352,7 @@
   // session properties
   readonly attribute DOMString <precoderef prefix="session">keySystem</precoderef>;
   readonly attribute DOMString <precoderef>sessionId</precoderef>;
+  <div class="issue"><div class="issue-title"><span>Issue 7</span></div><p class=""><precoderef>usableKeyIds</precoderef> is not WebIDL-compliant. See <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25594">Bug 25594</a>.</p></div>
   readonly attribute Array&lt;Uint8Array&gt; <precoderef>usableKeyIds</precoderef>;
   readonly attribute Promise&lt;any&gt; <precoderef>closed</precoderef>;
 
@@ -531,8 +532,8 @@
               <li><p>Set the <coderef>error</coderef> attribute to null.</p></li>
               <li><p>Set the <coderef prefix="session">keySystem</coderef> attribute to the value of the <coderef>MediaKeys</coderef> object's <coderef>keySystem</coderef> attribute.</p></li>
               <li><p>Set the <coderef>sessionId</coderef> attribute to <var title="true">sessionId</var>.</p></li>
-              <li><p>Set the <coderef>usableKeyIds</coderef> attribute to an Array containing the set of key IDs for which the session contains a currently usable key.</p>
-                <p>The <a href="#algorithms-update-usable-key-ids">Update Usable Key IDs</a> algorithm may also be run later should additional processing be necessary.</p>
+              <li><p>Set the <coderef>usableKeyIds</coderef> attribute to an Array containing the set of key IDs for which the session contains a key the CDM <em>knows</em> is currently usable.</p>
+                <p>The <a href="#algorithms-update-usable-key-ids">Update Usable Key IDs</a> algorithm may also be run later should additional processing be necessary to determine with certainty whether one or more keys is usable.</p>
               </li>
               <li><p>Let <coderef>closed</coderef> be a new promise.</p></li>
               <li><p>Let the session type be "<coderef prefix="sessiontype">persistent</coderef>".</p></li>
@@ -662,7 +663,8 @@
 
     <p>The <codedfn>sessionId</codedfn> attribute is the <a href="#session-id">Session ID</a> for this object and the associated key(s) or license(s).</p>
 
-    <p>The <codedfn>usableKeyIds</codedfn> attribute is an array of key IDs for keys in the session that are currently usable to decrypt <videoanchor name="media-data">media data</videoanchor>.
+    <p>The <codedfn>usableKeyIds</codedfn> attribute is an array of key IDs for keys in the session that the CDM <em>knows</em> are currently usable usable to decrypt <videoanchor name="media-data">media data</videoanchor>.
+      It must not contain IDs for keys that <em>may not</em> currently be usable.
       Each element must be unique.
     </p>
 
@@ -701,7 +703,7 @@
                 </p>
               </li> 
               <li><p>If the set of usable keys changed, run the <a href="#algorithms-update-usable-key-ids">Update Usable Key IDs</a> algorithm on the <var title="true">session</var>.</p>
-                <p>The algorithm may also be run later should additional processing be necessary.</p>
+                <p>The algorithm may also be run later should additional processing be necessary to determine with certainty whether one or more keys is usable.</p>
               </li>
               <li><p>If another message needs to be sent to the server, execute the following steps:</p>
                 <ol>
@@ -1177,7 +1179,7 @@
     <p>The following steps are run:</p>
     <ol>
       <li><p>Let the <var title="true">session</var> be the associated <coderef>MediaKeySession</coderef> object.</p></li>
-      <li><p>Let <var title="true">usable key ids</var> be an Array containing the set of key IDs for which the session contains a currently usable key.</p></li>
+      <li><p>Let <var title="true">usable key ids</var> be an Array containing the set of key IDs for which the session contains a key the CDM <em>knows</em> is currently usable.</p></li>
       <li><p>Set the <var title="true">session</var>'s <coderef>usableKeyIds</coderef> attribute to <var title="true">usable key ids</var>.</p></li>
       <li><p><Queue-a-task/> to <fire-a-simple-event/> named <coderef prefix="event">keyschange</coderef> at the <var title="true">session</var>.</p></li>
     </ol>