[EME] Bug 16857 - Only report MEDIA_ERR_ENCRYPTED when the application does not support encrypted content.
authorDavid Dorwin <ddorwin@google.com>
Fri, 24 May 2013 16:17:20 -0700
changeset 127 80be415b8be1
parent 126 85fbfad2339e
child 128 b96bdeaf7857
[EME] Bug 16857 - Only report MEDIA_ERR_ENCRYPTED when the application does not support encrypted content.
encrypted-media/encrypted-media.html
encrypted-media/encrypted-media.xml
--- a/encrypted-media/encrypted-media.html	Fri May 24 15:42:16 2013 -0700
+++ b/encrypted-media/encrypted-media.html	Fri May 24 16:17:20 2013 -0700
@@ -581,12 +581,12 @@
 <dfn id="dom-media_err_encrypted"><code>MEDIA_ERR_ENCRYPTED</code></dfn> (numeric value 5)</dt>
       <dd>The stream could not be played because it is encrypted and one of the following:
         <ol>
-          <li>No key was provided and no <code><a href="#dom-needkey">needkey</a></code> handler was provided</li>
-          <li>The provided key could not be successfully applied</li>
-          <li>The user agent does not support decryption of this <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>
-</li>
+          <li>The media element does not have a <code><a href="#dom-needkey">needkey</a></code> handler</li>
+          <li>The media element's <code><a href="#dom-keys">keys</a></code> attribute is null</li>
         </ol>
       </dd>
+      <p class="non-normative">Applications that support encrypted media should provide a <code><a href="#dom-needkey">needkey</a></code> handle and/or call <code><a href="#dom-setmediakeys">setMediaKeys()</a></code> no later than when <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> is provided.</p>
+      <p class="non-normative">If the user agent does not support decryption of this <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>, it should report the same error it would for any other unsupported media data (e.g. <code>MEDIA_ERR_SRC_NOT_SUPPORTED</code>).</p>
     </dl>
 
     <div class="impl">
--- a/encrypted-media/encrypted-media.xml	Fri May 24 15:42:16 2013 -0700
+++ b/encrypted-media/encrypted-media.xml	Fri May 24 16:17:20 2013 -0700
@@ -551,11 +551,12 @@
       <dt><codedfn>MEDIA_ERR_ENCRYPTED</codedfn> (numeric value 5)</dt>
       <dd>The stream could not be played because it is encrypted and one of the following:
         <ol>
-          <li>No key was provided and no <coderef>needkey</coderef> handler was provided</li>
-          <li>The provided key could not be successfully applied</li>
-          <li>The user agent does not support decryption of this <videoanchor name="media-data">media data</videoanchor></li>
+          <li>The media element does not have a <coderef>needkey</coderef> handler</li>
+          <li>The media element's <coderef>keys</coderef> attribute is null</li>
         </ol>
       </dd>
+      <p class="non-normative">Applications that support encrypted media should provide a <coderef>needkey</coderef> handle and/or call <methodref>setMediaKeys</methodref> no later than when <videoanchor name="media-data">media data</videoanchor> is provided.</p>
+      <p class="non-normative">If the user agent does not support decryption of this <videoanchor name="media-data">media data</videoanchor>, it should report the same error it would for any other unsupported media data (e.g. <code>MEDIA_ERR_SRC_NOT_SUPPORTED</code>).</p>
     </dl>
 
     <div class="impl">