[EME] Fixed typos and other minor issues.
BUG=19585,19615,19616,19791
--- a/encrypted-media/encrypted-media.html Mon Oct 29 18:05:10 2012 +0100
+++ b/encrypted-media/encrypted-media.html Wed Oct 31 17:47:58 2012 +0100
@@ -20,7 +20,7 @@
<div class="head">
<p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48"></a></p>
<h1>Encrypted Media Extensions</h1>
- <h2>W3C Editor's Draft 29 October 2012</h2>
+ <h2>W3C Editor's Draft 31 October 2012</h2>
<h2><font color="red">Work in progress. For the latest stable revision, see <a href="http://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1b/encrypted-media/encrypted-media.html">v0.1b</a>.</font></h2>
<dl>
<dt>Latest published version:</dt>
@@ -171,14 +171,14 @@
<h4 id="key-system">1.2.2. Key System</h4>
<p>A Key System is a generic term for a decryption mechanism and/or content protection provider.
Key System strings provide unique identification of a Key System.
- They used by the user agent to select the <a href="#cdm">Content Decryption Modules</a> and identify the source of a key-related event.
+ They are used by the user agent to select the <a href="#cdm">Content Decryption Modules</a> and identify the source of a key-related event.
<a href="#simple-decryption">Simple Decryption</a> Key Systems are supported by all user agents. User agents may also provide additional CDMs with corresponding Key System strings.
</p>
- <p>Key System strings are always a reverse domain name. <span class="non-normative">For example, "com.example.somesystem".</span>
+ <p>A Key System string is always a reverse domain name. <span class="non-normative">For example, "com.example.somesystem".</span>
Within a given system <span class="non-normative">("somesystem" in the example)</span>, subsystems may be defined as determined by the key system provider.
<span class="non-normative">For example, "com.example.somesystem.1" and "com.example.somesystem.1_5".</span>
- <span class="non-normative">Key system providers should keep in mind that these will be used for comparison and discovery, so they should be easy to compare and the structure should remain reasonably simple.</span>
+ <span class="non-normative">Key System providers should keep in mind that these will be used for comparison and discovery, so they should be easy to compare and the structure should remain reasonably simple.</span>
</p>
<p>If a user agent returns "maybe" or "probably" for any subsystem string, it must return "maybe" when a parent system string is passed to <code><a href="#dom-canplaytype">canPlayType()</a></code>.
@@ -192,19 +192,17 @@
If supported by the <a href="#key-system">Key System</a>, it is generated by the user agent/CDM and provided to the application in the <code><a href="#dom-keymessage">keymessage</a></code> event.
<span class="non-normative">(Session IDs need not necessarily be supported by the underlying content protection client or server.)</span>
</p>
- <p>Each successful call to <code><a href="#dom-createsession">createSession()</a></code> generates a new Session ID.</p>
+
+ <p>If Session IDs are supported, a new one will be generated each time <code><a href="#dom-createsession">createSession()</a></code> successfully creates a <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.
+ The user agent/CDM manage the lifetime of Session IDs.
+ All Session IDs are cleared from the <a href="#media-element">media element</a> when a load occurs, although the CDM may retain them for longer periods.
+ </p>
<p class="non-normative">Applications should always provide the session ID from an event in subsequent calls for this key or license.
(This is a best practice, even if the current Key System does not support session IDs.)
This may mean that the application must associate a server response with the session ID and provide them both to <code><a href="#dom-addkey">addKey()</a></code>.
</p>
- <p>If Session IDs are supported, a new one will be created each time <code><a href="#dom-createsession">createSession()</a></code> is called.
- The user agent/CDM manage the lifetime of Session IDs.
- All Session IDs are cleared from the <a href="#media-element">media element</a> when a load occurs, although
- the CDM may retain them for longer.
- </p>
-
<h4 id="initialization-data">1.2.4. Initialization Data</h4>
<p><i>This section is non-normative.</i></p>
<p>Initialization Data is a generic term for container-specific data that is used by <a href="#cdm">Content Decryption Modules</a> to generate a key request.
@@ -359,10 +357,12 @@
<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>
+
<li>Create a new <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.
<ol>
<li><p>Let the <code><a href="#dom-keysystem">keySystem</a></code> attribute be <var title="true">keySystem</var>.</p></li>
- <li><p>Let the <code><a href="#dom-sessionid">sessionId</a></code> attribute be a unique <a href="#session-id">Session ID</a> string. It may be generated by <var title="true">cdm</var>.</p></li>
+ <li><p>Let the <code><a href="#dom-sessionid">sessionId</a></code> attribute be a unique <a href="#session-id">Session ID</a> string. <span class="non-normative">It may be generated by <var title="true">cdm</var>.</span></p></li>
</ol>
</li>
@@ -372,8 +372,6 @@
<p>Schedule a task to generate a key request, providing <var title="true">type</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">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>Let <var title="true">defaultURL</var> be null.</p></li>
<li>
<p>Use <var title="true">cdm</var> to generate a key request and follow the steps for the first matching condition from the following list:</p>
@@ -423,7 +421,7 @@
<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-sessionid"><code>sessionId</code></dfn> attribute is the <a href="#session-id">Session ID</a> for this objects and the associated key(s) or license(s).</p>
+ <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-addkey"><code>addKey(key)</code></dfn> method must run the following steps:</p>
<p class="non-normative">Note: The contents of <var title="true">key</var> are <var title="true"><a href="#key-system">keySystem</a></var>-specific.
@@ -431,14 +429,13 @@
The contents may also vary depending on the container, key length, etc.</p>
<ol>
- <li><p>If the first or second argument is null or an empty array, 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>.</p></li>
+ <li><p>If the argument is null or an empty array, 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>.</p></li>
<li>
<p>Schedule a task to handle the call, providing <var title="true">key</var>.</p>
<p>The user agent will asynchronously execute the following steps in the task:</p>
<ol>
<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>Let <var title="true">did store key</var> be false.</p></li>
<li><p>Let <var title="true">next message</var> be null.</p></li>
<li>
@@ -472,7 +469,7 @@
</dl>
<p class="non-normative">At most one key may be stored if key IDs are not used.</p>
<p class="non-normative">Clearing keys avoids needing to handle a mixture of keys with and without IDs in the <a href="#algorithms-enrypted-block">Encrypted Block Encountered algorithm</a>.</p>
- <p class="non-normative">Note: It is recommended that CDMs support a standard and reasonably high minimum number of cached keys/licenses (with IDs) per media element as well as a standard replacement algorithm.
+ <p class="non-normative">Note: It is recommended that CDMs support a standard and reasonably high minimum number of cached keys/licenses (with IDs) per <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object as well as a standard replacement algorithm.
This enables a reasonable number of key rotation algorithms to be implemented across user agents and may reduce the likelihood of playback interruptions in use cases that involve various streams in the same element (i.e. adaptive streams, various audio and video tracks) using different keys.
</p>
</li>
@@ -581,7 +578,7 @@
</dl>
<div class="impl">
- <p>The <dfn id="dom-code"><code>code</code></dfn> attribute of a <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object must return the code for the error, which must be one of the following:</p>
+ <p>The <dfn id="dom-code"><code>code</code></dfn> attribute of a <code><a href="#dom-mediakeyerror">MediaKeyError</a></code> object must return the code for the error, which must be one of the following:</p>
<dl>
<dt>
<dfn id="dom-media_keyerr_unknown"><code>MEDIA_KEYERR_UNKNOWN</code></dfn> (numeric value 1)</dt>
--- a/encrypted-media/encrypted-media.xml Mon Oct 29 18:05:10 2012 +0100
+++ b/encrypted-media/encrypted-media.xml Wed Oct 31 17:47:58 2012 +0100
@@ -19,7 +19,7 @@
<div class="head">
<p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48" /></a></p>
<h1>Encrypted Media Extensions</h1>
- <h2>W3C Editor's Draft 29 October 2012</h2>
+ <h2>W3C Editor's Draft 31 October 2012</h2>
<h2><font color="red">Work in progress. For the latest stable revision, see <a href="http://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1b/encrypted-media/encrypted-media.html">v0.1b</a>.</font></h2>
<dl>
<dt>Latest published version:</dt>
@@ -167,14 +167,14 @@
<h4 id="key-system">1.2.2. Key System</h4>
<p>A Key System is a generic term for a decryption mechanism and/or content protection provider.
Key System strings provide unique identification of a Key System.
- They used by the user agent to select the <a href="#cdm">Content Decryption Modules</a> and identify the source of a key-related event.
+ They are used by the user agent to select the <a href="#cdm">Content Decryption Modules</a> and identify the source of a key-related event.
<a href="#simple-decryption">Simple Decryption</a> Key Systems are supported by all user agents. User agents may also provide additional CDMs with corresponding Key System strings.
</p>
- <p>Key System strings are always a reverse domain name. <span class="non-normative">For example, "com.example.somesystem".</span>
+ <p>A Key System string is always a reverse domain name. <span class="non-normative">For example, "com.example.somesystem".</span>
Within a given system <span class="non-normative">("somesystem" in the example)</span>, subsystems may be defined as determined by the key system provider.
<span class="non-normative">For example, "com.example.somesystem.1" and "com.example.somesystem.1_5".</span>
- <span class="non-normative">Key system providers should keep in mind that these will be used for comparison and discovery, so they should be easy to compare and the structure should remain reasonably simple.</span>
+ <span class="non-normative">Key System providers should keep in mind that these will be used for comparison and discovery, so they should be easy to compare and the structure should remain reasonably simple.</span>
</p>
<p>If a user agent returns "maybe" or "probably" for any subsystem string, it must return "maybe" when a parent system string is passed to <methodref>canPlayType</methodref>.
@@ -188,19 +188,17 @@
If supported by the <a href="#key-system">Key System</a>, it is generated by the user agent/CDM and provided to the application in the <coderef>keymessage</coderef> event.
<span class="non-normative">(Session IDs need not necessarily be supported by the underlying content protection client or server.)</span>
</p>
- <p>Each successful call to <methodref>createSession</methodref> generates a new Session ID.</p>
+
+ <p>If Session IDs are supported, a new one will be generated each time <methodref>createSession</methodref> successfully creates a <coderef>MediaKeySession</coderef> object.
+ The user agent/CDM manage the lifetime of Session IDs.
+ All Session IDs are cleared from the <a href="#media-element">media element</a> when a load occurs, although the CDM may retain them for longer periods.
+ </p>
<p class="non-normative">Applications should always provide the session ID from an event in subsequent calls for this key or license.
(This is a best practice, even if the current Key System does not support session IDs.)
This may mean that the application must associate a server response with the session ID and provide them both to <methodref>addKey</methodref>.
</p>
- <p>If Session IDs are supported, a new one will be created each time <methodref>createSession</methodref> is called.
- The user agent/CDM manage the lifetime of Session IDs.
- All Session IDs are cleared from the <a href="#media-element">media element</a> when a load occurs, although
- the CDM may retain them for longer.
- </p>
-
<h4 id="initialization-data">1.2.4. Initialization Data</h4>
<non-normative-section/>
<p>Initialization Data is a generic term for container-specific data that is used by <a href="#cdm">Content Decryption Modules</a> to generate a key request.
@@ -350,10 +348,12 @@
<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>
+
<li>Create a new <coderef>MediaKeySession</coderef> object.
<ol>
<li><p>Let the <coderef>keySystem</coderef> attribute be <var title="true">keySystem</var>.</p></li>
- <li><p>Let the <coderef>sessionId</coderef> attribute be a unique <a href="#session-id">Session ID</a> string. It may be generated by <var title="true">cdm</var>.</p></li>
+ <li><p>Let the <coderef>sessionId</coderef> attribute be a unique <a href="#session-id">Session ID</a> string. <span class="non-normative">It may be generated by <var title="true">cdm</var>.</span></p></li>
</ol>
</li>
@@ -362,8 +362,6 @@
<li><p>Schedule a task to generate a key request, providing <var title="true">type</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">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>Let <var title="true">defaultURL</var> be null.</p></li>
<li><p>Use <var title="true">cdm</var> to generate a key request and follow the steps for the first matching condition from the following list:</p>
<dl class="switch">
@@ -409,7 +407,7 @@
<p>The <codedfn>keySystem</codedfn> attribute is an identifier for the <a href="#key-system">Key System</a> being used.</p>
- <p>The <codedfn>sessionId</codedfn> attribute is the <a href="#session-id">Session ID</a> for this objects and the associated key(s) or license(s).</p>
+ <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 <methoddfn name="addKey">addKey(<var title="true">key</var>)</methoddfn> method must run the following steps:</p>
<p class="non-normative">Note: The contents of <var title="true">key</var> are <var title="true"><a href="#key-system">keySystem</a></var>-specific.
@@ -417,13 +415,12 @@
The contents may also vary depending on the container, key length, etc.</p>
<ol>
- <li><p>If the first or second argument is null or an empty array, throw an <invalid-access-err/>.</p></li>
+ <li><p>If the argument is null or an empty array, throw an <invalid-access-err/>.</p></li>
<li><p>Schedule a task to handle the call, providing <var title="true">key</var>.</p>
<p>The user agent will asynchronously execute the following steps in the task:</p>
<ol>
<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>Let <var title="true">did store key</var> be false.</p></li>
<li><p>Let <var title="true">next message</var> be null.</p></li>
<li><p>Use <var title="true">cdm</var> to handle <var title="true">key</var>.</p>
@@ -454,7 +451,7 @@
</dl>
<p class="non-normative">At most one key may be stored if key IDs are not used.</p>
<p class="non-normative">Clearing keys avoids needing to handle a mixture of keys with and without IDs in the <a href="#algorithms-enrypted-block">Encrypted Block Encountered algorithm</a>.</p>
- <p class="non-normative">Note: It is recommended that CDMs support a standard and reasonably high minimum number of cached keys/licenses (with IDs) per media element as well as a standard replacement algorithm.
+ <p class="non-normative">Note: It is recommended that CDMs support a standard and reasonably high minimum number of cached keys/licenses (with IDs) per <coderef>MediaKeySession</coderef> object as well as a standard replacement algorithm.
This enables a reasonable number of key rotation algorithms to be implemented across user agents and may reduce the likelihood of playback interruptions in use cases that involve various streams in the same element (i.e. adaptive streams, various audio and video tracks) using different keys.
</p>
</li>
@@ -554,7 +551,7 @@
</dl>
<div class="impl">
- <p>The <codedfn>code</codedfn> attribute of a <coderef>MediaKeySession</coderef> object must return the code for the error, which must be one of the following:</p>
+ <p>The <codedfn>code</codedfn> attribute of a <coderef>MediaKeyError</coderef> object must return the code for the error, which must be one of the following:</p>
<dl>
<dt><codedfn>MEDIA_KEYERR_UNKNOWN</codedfn> (numeric value 1)</dt>
<dd>An unspecified error occurred. This value is used for errors that don't match any of the following codes.</dd>