--- a/encrypted-media/encrypted-media.html Tue Oct 29 14:59:33 2013 -0700
+++ b/encrypted-media/encrypted-media.html Wed Oct 30 17:32:14 2013 -0700
@@ -56,7 +56,7 @@
<div class="head">
<p><a href="http://www.w3.org/"><img src="https://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48"></a></p>
<h1>Encrypted Media Extensions</h1>
- <h2 id="draft-date">W3C Editor's Draft 28 October 2013</h2>
+ <h2 id="draft-date">W3C Editor's Draft 30 October 2013</h2>
<dl>
<dt>This Version:</dt>
<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>
@@ -216,7 +216,7 @@
</p>
<p>A new Session ID is generated each time the user agent successfully initializes a <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.
- It must be valid before the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> enters the <code><a href="#dom-pending">PENDING</a></code> or <code><a href="#dom-ready">READY</a></code> states and the user agent fires the associated events.
+ It must be valid before the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> enters the <code><a href="#dom-statepending">PENDING</a></code> or <code><a href="#dom-stateready">READY</a></code> states and the user agent fires the associated events.
</p>
<p>Each Session ID shall be unique within the browsing context in which it was created.
@@ -241,7 +241,7 @@
<h4 id="cross-origin-support">1.1.6. Cross Origin Support</h4>
<p>During playback, embedded media data is exposed to script in the embedding origin. In order for the API to fire <code><a href="#dom-needkey">needkey</a></code>
- and <code><a href="#dom-keymessage">keymessage</a></code> events, <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> must be <a href="http://www.w3.org/TR/html5/infrastructure.html#cors-same-origin">CORS-same-origin</a> with the embedding page.
+ and <code><a href="#dom-eventmessage">message</a></code> events, <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> must be <a href="http://www.w3.org/TR/html5/infrastructure.html#cors-same-origin">CORS-same-origin</a> with the embedding page.
If <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> is cross-origin with the embedding document, authors should use the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#attr-media-crossorigin">crossorigin</a> attribute
on the <a href="#media-element">media element</a> and CORS headers on the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> response to make it <a href="http://www.w3.org/TR/html5/infrastructure.html#cors-same-origin">CORS-same-origin</a>.
</p>
@@ -356,7 +356,7 @@
<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 state of the session be <code><a href="#dom-created">CREATED</a></code>.</p></li>
+ <li><p>Let the state of the session be <code><a href="#dom-statecreated">CREATED</a></code>.</p></li>
</ol>
</li>
@@ -364,7 +364,7 @@
<li><p>
If there is a <code><a href="#dom-mediakeyerror">MediaKeyError</a></code> stored with the <code><a href="#dom-mediakeys">MediaKeys</a></code> object that occurred because of an error loading the <var title="true">cdm</var>
- then <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-keyerror">keyerror</a></code> at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object and abort these steps.
+ then <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-eventerror">error</a></code> at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object and abort these steps.
</p></li>
<li>
@@ -406,7 +406,7 @@
</li>
<li><p>Set the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object's <code><a href="#dom-error">error</a></code> attribute to the error object created in the previous step.</p></li>
<li><p>Let the state of the session be <code><a href="#dom-stateerror">ERROR</a></code>.</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-keyerror">keyerror</a></code> at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</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-eventerror">error</a></code> at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</p></li>
<li><p>Abort the task.</p></li>
</ol>
</li>
@@ -416,9 +416,9 @@
<dt>If <var title="true">request</var> is not null</dt>
<dd>
<ol>
- <li><p>Let the state of the session be <code><a href="#dom-pending">PENDING</a></code>.</p></li>
+ <li><p>Let the state of the session be <code><a href="#dom-statepending">PENDING</a></code>.</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-keymessage">keymessage</a></code> at the new object.</p>
+ <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-eventmessage">message</a></code> at the new object.</p>
<p>The event is of type <code><a href="#dom-mediakeymessageevent">MediaKeyMessageEvent</a></code> and has:</p>
<ul style="list-style-type:none"><li>
<code><a href="#dom-message">message</a></code> = <var title="true">request</var><br>
@@ -430,8 +430,8 @@
<dt>Otherwise</dt>
<dd>
<ol>
- <li><p>Let the state of the session be <code><a href="#dom-ready">READY</a></code>.</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-keyready">keyready</a></code> at the new object.</p></li>
+ <li><p>Let the state of the session be <code><a href="#dom-stateready">READY</a></code>.</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-eventready">ready</a></code> at the new object.</p></li>
</ol>
</dd>
</dl>
@@ -474,7 +474,7 @@
<ol>
<li><p>If the argument is null or an empty array, throw an <code><a href="https://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 session is not in the <code><a href="#dom-pending">PENDING</a></code> state, throw an <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code>.</p></li>
+ <li><p>If the session is not in the <code><a href="#dom-statepending">PENDING</a></code> state, throw an <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code>.</p></li>
<li>
<p>Schedule a task to handle the call, providing <var title="true">key</var>.</p>
@@ -525,7 +525,7 @@
</li>
<li><p>Set the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object's <code><a href="#dom-error">error</a></code> attribute to the error object created in the previous step.</p></li>
<li><p>Let the state of the session be <code><a href="#dom-stateerror">ERROR</a></code>.</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-keyerror">keyerror</a></code> at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</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-eventerror">error</a></code> at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</p></li>
<li><p>Abort the task.</p></li>
</ol>
</li>
@@ -535,9 +535,9 @@
<dt>If <var title="true">request</var> is not null</dt>
<dd>
<ol>
- <li><p>Let the state of the session be <code><a href="#dom-pending">PENDING</a></code>.</p></li>
+ <li><p>Let the state of the session be <code><a href="#dom-statepending">PENDING</a></code>.</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-keymessage">keymessage</a></code> at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</p>
+ <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-eventmessage">message</a></code> at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</p>
<p>The event is of type <code><a href="#dom-mediakeymessageevent">MediaKeyMessageEvent</a></code> and has:</p>
<ul style="list-style-type:none"><li>
<code><a href="#dom-message">message</a></code> = <var title="true">request</var><br>
@@ -549,8 +549,8 @@
<dt>Otherwise</dt>
<dd>
<ol>
- <li><p>Let the state of the session be <code><a href="#dom-ready">READY</a></code>.</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-keyready">keyready</a></code> at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</p></li>
+ <li><p>Let the state of the session be <code><a href="#dom-stateready">READY</a></code>.</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-eventready">ready</a></code> at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</p></li>
</ol>
</dd>
</dl>
@@ -667,20 +667,20 @@
</thead>
<tbody>
<tr>
- <td><dfn id="dom-created"><code>CREATED</code></dfn></td>
+ <td><dfn id="dom-statecreated"><code>CREATED</code></dfn></td>
<td>The <code><a href="#dom-mediakeysession">MediaKeySession</a></code> has been created with a <code><a href="#dom-createsession">createSession()</a></code> call.</td>
</tr>
<tr>
- <td><dfn id="dom-pending"><code>PENDING</code></dfn></td>
- <td>A <code><a href="#dom-keymessage">keymessage</a></code> event has been fired at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code>. A call to <code><a href="#dom-update">update()</a></code> is expected next. The <a href="#media-element">media element</a> may block waiting for a key if encrypted data is encountered.</td>
+ <td><dfn id="dom-statepending"><code>PENDING</code></dfn></td>
+ <td>A <code><a href="#dom-eventmessage">message</a></code> event has been fired at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code>. A call to <code><a href="#dom-update">update()</a></code> is expected next. The <a href="#media-element">media element</a> may block waiting for a key if encrypted data is encountered.</td>
</tr>
<tr>
- <td><dfn id="dom-ready"><code>READY</code></dfn></td>
- <td>A <code><a href="#dom-keyready">keyready</a></code> event has been fired at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code>. The <a href="#media-element">media element</a> should not need to block waiting for a key if encrypted data associated with this session is encountered.</td>
+ <td><dfn id="dom-stateready"><code>READY</code></dfn></td>
+ <td>A <code><a href="#dom-eventready">ready</a></code> event has been fired at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code>. The <a href="#media-element">media element</a> should not need to block waiting for a key if encrypted data associated with this session is encountered.</td>
</tr>
<tr>
<td><dfn id="dom-stateerror"><code>ERROR</code></dfn></td>
- <td>A <code><a href="#dom-keyerror">keyerror</a></code> event has been fired at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code>. The <code><a href="#dom-error">error</a></code> attribute of the session holds information about the most recent error.</td>
+ <td>A <code><a href="#dom-eventerror">error</a></code> event has been fired at the <code><a href="#dom-mediakeysession">MediaKeySession</a></code>. The <code><a href="#dom-error">error</a></code> attribute of the session holds information about the most recent error.</td>
</tr>
</tbody>
</table>
@@ -776,26 +776,26 @@
</thead>
<tbody>
<tr>
- <td><dfn id="dom-keyerror"><code>keyerror</code></dfn></td>
+ <td><dfn id="dom-eventerror"><code>error</code></dfn></td>
<td><code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event">Event</a></code></td>
<td>An error occurs in the session. The session moves to the <code><a href="#dom-stateerror">ERROR</a></code> state.</td>
<td></td>
</tr>
<tr>
- <td><dfn id="dom-keymessage"><code>keymessage</code></dfn></td>
+ <td><dfn id="dom-eventmessage"><code>message</code></dfn></td>
<td><code><a href="#dom-mediakeymessageevent">MediaKeyMessageEvent</a></code></td>
<td>
A message has been generated <span class="non-normative">(and likely needs to be sent to a server)</span>.
<span class="non-normative">For example, a key request has been generated as the result of a <code><a href="#dom-createsession">createSession()</a></code> call or another message must be sent in response to an <code><a href="#dom-update">update()</a></code> call.</span>
- The session moves to the <code><a href="#dom-pending">PENDING</a></code> state.
+ The session moves to the <code><a href="#dom-statepending">PENDING</a></code> state.
</td>
<td></td>
</tr>
<tr>
- <td><dfn id="dom-keyready"><code>keyready</code></dfn></td>
+ <td><dfn id="dom-eventready"><code>ready</code></dfn></td>
<td><code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event">Event</a></code></td>
<td>
- The media element should not be blocked if encrypted data is encountered associated with the initData used to create the session. The session moves to the <code><a href="#dom-ready">READY</a></code> state.
+ The media element should not be blocked if encrypted data is encountered associated with the initData used to create the session. The session moves to the <code><a href="#dom-stateready">READY</a></code> state.
</td>
<td></td>
</tr>
@@ -1172,7 +1172,7 @@
if (!keySession)
throw "Could not create key session";
- keySession.addEventListener("<a href="#dom-keymessage">keymessage</a>",handleMessage,false);
+ keySession.addEventListener("<a href="#dom-eventmessage">message</a>",handleMessage,false);
}
function handleMessage(event) {
@@ -1212,7 +1212,7 @@
if (!keySession)
throw "Could not create key session";
- keySession.addEventListener("<a href="#dom-keymessage">keymessage</a>",handleMessage,false);
+ keySession.addEventListener("<a href="#dom-eventmessage">message</a>",handleMessage,false);
}
function handleMessage(event) {
@@ -1253,7 +1253,7 @@
if (!keySession)
throw "Could not create key session";
- keySession.addEventListener("<a href="#dom-keymessage">keymessage</a>",licenseRequestReady,false);
+ keySession.addEventListener("<a href="#dom-eventmessage">message</a>",licenseRequestReady,false);
}
function licenseRequestReady(event) {
@@ -1314,7 +1314,7 @@
if (!keySession)
throw "Could not create key session";
- keySession.addEventListener("<a href="#dom-keymessage">keymessage</a>",licenseRequestReady,false);
+ keySession.addEventListener("<a href="#dom-eventmessage">message</a>",licenseRequestReady,false);
}
function licenseRequestReady(event) {
@@ -1340,7 +1340,7 @@
<h3 id="example-using-all-events" class="exampleheader">10.4. Using All Events</h3>
<p class="exampledescription">This is a more complete example showing all events being used.</p>
- <p class="exampledescription">Note that <code>handleKeyMessage</code> could be called multiple times, including in response to the <code><a href="#dom-update">update()</a></code> call if multiple round trips are required and for any other reason the Key System might need to send a message.</p>
+ <p class="exampledescription">Note that <code>handleMessage</code> could be called multiple times, including in response to the <code><a href="#dom-update">update()</a></code> call if multiple round trips are required and for any other reason the Key System might need to send a message.</p>
<div class="example">
<pre class="code">
@@ -1361,7 +1361,7 @@
xmlhttp.send(message);
}
- function handleKeyMessage(event) {
+ function handleMessage(event) {
var keySession = event.target;
var message = event.<a href="#dom-message">message</a>;
if (!message)
@@ -1370,11 +1370,11 @@
sendMessage(message, keySession);
}
- function handleKeyReady(event) {
+ function handleReady(event) {
// Do some bookkeeping with event.target.<a href="#dom-sessionid">sessionId</a> if necessary.
}
- function handleKeyError(event) {
+ function handleError(event) {
// Report event.target.error.<a href="#dom-code">code</a> and event.target.error.<a href="#dom-systemcode">systemCode</a>,
// and do some bookkeeping with event.target.<a href="#dom-sessionid">sessionId</a> if necessary.
}
@@ -1394,9 +1394,9 @@
if (!keySession)
throw "Could not create key session";
- keySession.addEventListener("<a href="#dom-keymessage">keymessage</a>",handleKeyMessage,false);
- keySession.addEventListener("<a href="#dom-keyready">keyready</a>",handleKeyReady,false);
- keySession.addEventListener("<a href="#dom-keyerror">keyerror</a>",handleKeyError,false);
+ keySession.addEventListener("<a href="#dom-eventmessage">message</a>",handleMessage,false);
+ keySession.addEventListener("<a href="#dom-eventready">ready</a>",handleReady,false);
+ keySession.addEventListener("<a href="#dom-eventerror">error</a>",handleError,false);
}
</script>
--- a/encrypted-media/encrypted-media.xml Tue Oct 29 14:59:33 2013 -0700
+++ b/encrypted-media/encrypted-media.xml Wed Oct 30 17:32:14 2013 -0700
@@ -55,7 +55,7 @@
<div class="head">
<p><a href="http://www.w3.org/"><img src="https://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48" /></a></p>
<h1>Encrypted Media Extensions</h1>
- <h2 id="draft-date">W3C Editor's Draft 28 October 2013</h2>
+ <h2 id="draft-date">W3C Editor's Draft 30 October 2013</h2>
<dl>
<dt>This Version:</dt>
<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>
@@ -213,7 +213,7 @@
</p>
<p>A new Session ID is generated each time the user agent successfully initializes a <coderef>MediaKeySession</coderef> object.
- It must be valid before the <coderef>MediaKeySession</coderef> enters the <coderef>PENDING</coderef> or <coderef>READY</coderef> states and the user agent fires the associated events.
+ It must be valid before the <coderef>MediaKeySession</coderef> enters the <coderef prefix="state">PENDING</coderef> or <coderef prefix="state">READY</coderef> states and the user agent fires the associated events.
</p>
<p>Each Session ID shall be unique within the browsing context in which it was created.
@@ -238,7 +238,7 @@
<h4 id="cross-origin-support">1.1.6. Cross Origin Support</h4>
<p>During playback, embedded media data is exposed to script in the embedding origin. In order for the API to fire <coderef>needkey</coderef>
- and <coderef>keymessage</coderef> events, <videoanchor name="media-data">media data</videoanchor> must be <cors-same-origin/> with the embedding page.
+ and <coderef prefix="event">message</coderef> events, <videoanchor name="media-data">media data</videoanchor> must be <cors-same-origin/> with the embedding page.
If <videoanchor name="media-data">media data</videoanchor> is cross-origin with the embedding document, authors should use the <videoanchor name="attr-media-crossorigin">crossorigin</videoanchor> attribute
on the <a href="#media-element">media element</a> and CORS headers on the <videoanchor name="media-data">media data</videoanchor> response to make it <cors-same-origin/>.
</p>
@@ -351,7 +351,7 @@
<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 state of the session be <coderef>CREATED</coderef>.</p></li>
+ <li><p>Let the state of the session be <coderef prefix="state">CREATED</coderef>.</p></li>
</ol>
</li>
@@ -359,7 +359,7 @@
<li><p>
If there is a <coderef>MediaKeyError</coderef> stored with the <coderef>MediaKeys</coderef> object that occurred because of an error loading the <var title="true">cdm</var>
- then <queue-a-task/> to <fire-a-simple-event/> named <coderef>keyerror</coderef> at the <coderef>MediaKeySession</coderef> object and abort these steps.
+ then <queue-a-task/> to <fire-a-simple-event/> named <coderef prefix="event">error</coderef> at the <coderef>MediaKeySession</coderef> object and abort these steps.
</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>
@@ -394,7 +394,7 @@
</li>
<li><p>Set the <coderef>MediaKeySession</coderef> object's <coderef>error</coderef> attribute to the error object created in the previous step.</p></li>
<li><p>Let the state of the session be <coderef prefix="state">ERROR</coderef>.</p></li>
- <li><p><queue-a-task/> to <fire-a-simple-event/> named <coderef>keyerror</coderef> at the <coderef>MediaKeySession</coderef> object.</p></li>
+ <li><p><queue-a-task/> to <fire-a-simple-event/> named <coderef prefix="event">error</coderef> at the <coderef>MediaKeySession</coderef> object.</p></li>
<li><p>Abort the task.</p></li>
</ol>
</li>
@@ -403,9 +403,9 @@
<dt>If <var title="true">request</var> is not null</dt>
<dd>
<ol>
- <li><p>Let the state of the session be <coderef>PENDING</coderef>.</p></li>
+ <li><p>Let the state of the session be <coderef prefix="state">PENDING</coderef>.</p></li>
<li>
- <p><queue-a-task/> to <fire-a-simple-event/> named <coderef>keymessage</coderef> at the new object.</p>
+ <p><queue-a-task/> to <fire-a-simple-event/> named <coderef prefix="event">message</coderef> at the new object.</p>
<p>The event is of type <coderef>MediaKeyMessageEvent</coderef> and has:</p>
<ul style="list-style-type:none"><li>
<coderef>message</coderef> = <var title="true">request</var><br></br>
@@ -417,8 +417,8 @@
<dt>Otherwise</dt>
<dd>
<ol>
- <li><p>Let the state of the session be <coderef>READY</coderef>.</p></li>
- <li><p><queue-a-task/> to <fire-a-simple-event/> named <coderef>keyready</coderef> at the new object.</p></li>
+ <li><p>Let the state of the session be <coderef prefix="state">READY</coderef>.</p></li>
+ <li><p><queue-a-task/> to <fire-a-simple-event/> named <coderef prefix="event">ready</coderef> at the new object.</p></li>
</ol>
</dd>
</dl>
@@ -461,7 +461,7 @@
<ol>
<li><p>If the argument is null or an empty array, throw an <invalid-access-err/>.</p></li>
- <li><p>If the session is not in the <coderef>PENDING</coderef> state, throw an <invalid-state-err/>.</p></li>
+ <li><p>If the session is not in the <coderef prefix="state">PENDING</coderef> state, throw an <invalid-state-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>
@@ -505,7 +505,7 @@
</li>
<li><p>Set the <coderef>MediaKeySession</coderef> object's <coderef>error</coderef> attribute to the error object created in the previous step.</p></li>
<li><p>Let the state of the session be <coderef prefix="state">ERROR</coderef>.</p></li>
- <li><p><queue-a-task/> to <fire-a-simple-event/> named <coderef>keyerror</coderef> at the <coderef>MediaKeySession</coderef> object.</p></li>
+ <li><p><queue-a-task/> to <fire-a-simple-event/> named <coderef prefix="event">error</coderef> at the <coderef>MediaKeySession</coderef> object.</p></li>
<li><p>Abort the task.</p></li>
</ol>
</li>
@@ -514,9 +514,9 @@
<dt>If <var title="true">request</var> is not null</dt>
<dd>
<ol>
- <li><p>Let the state of the session be <coderef>PENDING</coderef>.</p></li>
+ <li><p>Let the state of the session be <coderef prefix="state">PENDING</coderef>.</p></li>
<li>
- <p><queue-a-task/> to <fire-a-simple-event/> named <coderef>keymessage</coderef> at the <coderef>MediaKeySession</coderef> object.</p>
+ <p><queue-a-task/> to <fire-a-simple-event/> named <coderef prefix="event">message</coderef> at the <coderef>MediaKeySession</coderef> object.</p>
<p>The event is of type <coderef>MediaKeyMessageEvent</coderef> and has:</p>
<ul style="list-style-type:none"><li>
<coderef>message</coderef> = <var title="true">request</var><br></br>
@@ -528,8 +528,8 @@
<dt>Otherwise</dt>
<dd>
<ol>
- <li><p>Let the state of the session be <coderef>READY</coderef>.</p></li>
- <li><p><queue-a-task/> to <fire-a-simple-event/> named <coderef>keyready</coderef> at the <coderef>MediaKeySession</coderef> object.</p></li>
+ <li><p>Let the state of the session be <coderef prefix="state">READY</coderef>.</p></li>
+ <li><p><queue-a-task/> to <fire-a-simple-event/> named <coderef prefix="event">ready</coderef> at the <coderef>MediaKeySession</coderef> object.</p></li>
</ol>
</dd>
</dl>
@@ -631,20 +631,20 @@
</thead>
<tbody>
<tr>
- <td><codedfn>CREATED</codedfn></td>
+ <td><codedfn prefix="state">CREATED</codedfn></td>
<td>The <coderef>MediaKeySession</coderef> has been created with a <methodref>createSession</methodref> call.</td>
</tr>
<tr>
- <td><codedfn>PENDING</codedfn></td>
- <td>A <coderef>keymessage</coderef> event has been fired at the <coderef>MediaKeySession</coderef>. A call to <methodref>update</methodref> is expected next. The <a href="#media-element">media element</a> may block waiting for a key if encrypted data is encountered.</td>
+ <td><codedfn prefix="state">PENDING</codedfn></td>
+ <td>A <coderef prefix="event">message</coderef> event has been fired at the <coderef>MediaKeySession</coderef>. A call to <methodref>update</methodref> is expected next. The <a href="#media-element">media element</a> may block waiting for a key if encrypted data is encountered.</td>
</tr>
<tr>
- <td><codedfn>READY</codedfn></td>
- <td>A <coderef>keyready</coderef> event has been fired at the <coderef>MediaKeySession</coderef>. The <a href="#media-element">media element</a> should not need to block waiting for a key if encrypted data associated with this session is encountered.</td>
+ <td><codedfn prefix="state">READY</codedfn></td>
+ <td>A <coderef prefix="event">ready</coderef> event has been fired at the <coderef>MediaKeySession</coderef>. The <a href="#media-element">media element</a> should not need to block waiting for a key if encrypted data associated with this session is encountered.</td>
</tr>
<tr>
<td><codedfn prefix="state">ERROR</codedfn></td>
- <td>A <coderef>keyerror</coderef> event has been fired at the <coderef>MediaKeySession</coderef>. The <coderef>error</coderef> attribute of the session holds information about the most recent error.</td>
+ <td>A <coderef prefix="event">error</coderef> event has been fired at the <coderef>MediaKeySession</coderef>. The <coderef>error</coderef> attribute of the session holds information about the most recent error.</td>
</tr>
</tbody>
</table>
@@ -732,26 +732,26 @@
</thead>
<tbody>
<tr>
- <td><codedfn>keyerror</codedfn></td>
+ <td><codedfn prefix="event">error</codedfn></td>
<td><code><dom4ref name="event">Event</dom4ref></code></td>
<td>An error occurs in the session. The session moves to the <coderef prefix="state">ERROR</coderef> state.</td>
<td><!-- No Preconditions. --></td>
</tr>
<tr>
- <td><codedfn>keymessage</codedfn></td>
+ <td><codedfn prefix="event">message</codedfn></td>
<td><coderef>MediaKeyMessageEvent</coderef></td>
<td>
A message has been generated <span class="non-normative">(and likely needs to be sent to a server)</span>.
<span class="non-normative">For example, a key request has been generated as the result of a <methodref>createSession</methodref> call or another message must be sent in response to an <methodref>update</methodref> call.</span>
- The session moves to the <coderef>PENDING</coderef> state.
+ The session moves to the <coderef prefix="state">PENDING</coderef> state.
</td>
<td><!-- No Preconditions. --></td>
</tr>
<tr>
- <td><codedfn>keyready</codedfn></td>
+ <td><codedfn prefix="event">ready</codedfn></td>
<td><code><dom4ref name="event">Event</dom4ref></code></td>
<td>
- The media element should not be blocked if encrypted data is encountered associated with the initData used to create the session. The session moves to the <coderef>READY</coderef> state.
+ The media element should not be blocked if encrypted data is encountered associated with the initData used to create the session. The session moves to the <coderef prefix="state">READY</coderef> state.
</td>
<td><!-- No Preconditions. --></td>
</tr>
@@ -1107,7 +1107,7 @@
if (!keySession)
throw "Could not create key session";
- keySession.addEventListener("<precoderef>keymessage</precoderef>",handleMessage,false);
+ keySession.addEventListener("<precoderef prefix="event">message</precoderef>",handleMessage,false);
}
function handleMessage(event) {
@@ -1147,7 +1147,7 @@
if (!keySession)
throw "Could not create key session";
- keySession.addEventListener("<precoderef>keymessage</precoderef>",handleMessage,false);
+ keySession.addEventListener("<precoderef prefix="event">message</precoderef>",handleMessage,false);
}
function handleMessage(event) {
@@ -1188,7 +1188,7 @@
if (!keySession)
throw "Could not create key session";
- keySession.addEventListener("<precoderef>keymessage</precoderef>",licenseRequestReady,false);
+ keySession.addEventListener("<precoderef prefix="event">message</precoderef>",licenseRequestReady,false);
}
function licenseRequestReady(event) {
@@ -1249,7 +1249,7 @@
if (!keySession)
throw "Could not create key session";
- keySession.addEventListener("<precoderef>keymessage</precoderef>",licenseRequestReady,false);
+ keySession.addEventListener("<precoderef prefix="event">message</precoderef>",licenseRequestReady,false);
}
function licenseRequestReady(event) {
@@ -1275,7 +1275,7 @@
<h3 id="example-using-all-events" class="exampleheader">10.4. Using All Events</h3>
<p class="exampledescription">This is a more complete example showing all events being used.</p>
- <p class="exampledescription">Note that <code>handleKeyMessage</code> could be called multiple times, including in response to the <methodref>update</methodref> call if multiple round trips are required and for any other reason the Key System might need to send a message.</p>
+ <p class="exampledescription">Note that <code>handleMessage</code> could be called multiple times, including in response to the <methodref>update</methodref> call if multiple round trips are required and for any other reason the Key System might need to send a message.</p>
<div class="example">
<pre class="code">
@@ -1296,7 +1296,7 @@
xmlhttp.send(message);
}
- function handleKeyMessage(event) {
+ function handleMessage(event) {
var keySession = event.target;
var message = event.<precoderef>message</precoderef>;
if (!message)
@@ -1305,11 +1305,11 @@
sendMessage(message, keySession);
}
- function handleKeyReady(event) {
+ function handleReady(event) {
// Do some bookkeeping with event.target.<precoderef>sessionId</precoderef> if necessary.
}
- function handleKeyError(event) {
+ function handleError(event) {
// Report event.target.error.<precoderef>code</precoderef> and event.target.error.<precoderef>systemCode</precoderef>,
// and do some bookkeeping with event.target.<precoderef>sessionId</precoderef> if necessary.
}
@@ -1329,9 +1329,9 @@
if (!keySession)
throw "Could not create key session";
- keySession.addEventListener("<precoderef>keymessage</precoderef>",handleKeyMessage,false);
- keySession.addEventListener("<precoderef>keyready</precoderef>",handleKeyReady,false);
- keySession.addEventListener("<precoderef>keyerror</precoderef>",handleKeyError,false);
+ keySession.addEventListener("<precoderef prefix="event">message</precoderef>",handleMessage,false);
+ keySession.addEventListener("<precoderef prefix="event">ready</precoderef>",handleReady,false);
+ keySession.addEventListener("<precoderef prefix="event">error</precoderef>",handleError,false);
}
</script>
--- a/encrypted-media/session_state.svg Tue Oct 29 14:59:33 2013 -0700
+++ b/encrypted-media/session_state.svg Wed Oct 30 17:32:14 2013 -0700
@@ -63,16 +63,16 @@
<text x="29.59" y="563.4" class="st4">READY</text> </g>
<g id="shape8-19" transform="translate(423,-517.5)">
<title>Dynamic connector</title>
- <desc>KEYREADY</desc>
+ <desc>READY</desc>
<path d="M9 612 L180 612 L180 1021.5 L23.04 1021.5" class="st5"/>
<rect x="142.132" y="805.95" width="75.7354" height="21.5999" class="st7"/>
- <text x="142.13" y="822.15" class="st8">KEYREADY</text> </g>
+ <text x="142.13" y="822.15" class="st8">READY</text> </g>
<g id="shape10-27" transform="translate(369,-463.5)">
<title>Dynamic connector.10</title>
- <desc>KEYMESSAGE</desc>
+ <desc>MESSAGE</desc>
<path d="M9 612 L9 692.46" class="st5"/>
<rect x="-40.0957" y="648.45" width="98.1914" height="21.5999" class="st7"/>
- <text x="-40.1" y="664.65" class="st8">KEYMESSAGE</text> </g>
+ <text x="-40.1" y="664.65" class="st8">MESSAGE</text> </g>
<g id="shape23-34" transform="translate(72,-261)">
<title>Square.23</title>
<desc>ERROR</desc>
@@ -83,33 +83,33 @@
<text x="28.99" y="563.4" class="st4">ERROR</text> </g>
<g id="shape13-40" transform="translate(324,-517.5)">
<title>Dynamic connector.13</title>
- <desc>KEYERROR</desc>
+ <desc>ERROR</desc>
<path d="M0 612 L-198 612 L-198 746.46" class="st5"/>
<rect x="-211.72" y="601.2" width="76.9395" height="21.5999" class="st7"/>
- <text x="-211.72" y="617.4" class="st8">KEYERROR</text> </g>
+ <text x="-211.72" y="617.4" class="st8">ERROR</text> </g>
<g id="shape14-47" transform="translate(324,-306)">
<title>Dynamic connector.14</title>
- <desc>KEYERROR</desc>
+ <desc>ERROR</desc>
<path d="M0 603 L-129.96 603" class="st5"/>
<rect x="-110.47" y="592.2" width="76.9395" height="21.5999" class="st7"/>
- <text x="-110.47" y="608.4" class="st8">KEYERROR</text> </g>
+ <text x="-110.47" y="608.4" class="st8">ERROR</text> </g>
<g id="shape28-54" transform="translate(1017,351) rotate(90)">
<title>Sheet.28</title>
- <desc>KEYREADY</desc>
+ <desc>READY</desc>
<path d="M0 612 L84.96 612" class="st5"/>
<rect x="-636.368" y="47.7002" width="75.7354" height="21.5999" transform="rotate(-90)" class="st7"/>
- <text x="-636.37" y="63.9" transform="rotate(-90)" class="st8">KEYREADY</text> </g>
+ <text x="-636.37" y="63.9" transform="rotate(-90)" class="st8">READY</text> </g>
<g id="shape29-61" transform="translate(963,351) rotate(90)">
<title>Sheet.29</title>
- <desc>KEYMESSAGE</desc>
+ <desc>MESSAGE</desc>
<path d="M13.68 612 L14.04 612 L99 612" class="st9"/>
<rect x="-676.846" y="25.2002" width="98.1914" height="21.5999" transform="rotate(-90)" class="st7"/>
- <text x="-676.85" y="41.4" transform="rotate(-90)" class="st8">KEYMESSAGE</text> </g>
+ <text x="-676.85" y="41.4" transform="rotate(-90)" class="st8">MESSAGE</text> </g>
<g id="shape30-69" transform="translate(423,-351)">
<title>Dynamic connector.30</title>
- <desc>KEYMESSAGE</desc>
+ <desc>MESSAGE</desc>
<path d="M9 612 L69.48 612 L69.48 684 L23.04 684" class="st5"/>
<rect x="20.3843" y="637.2" width="98.1914" height="21.5999" class="st7"/>
- <text x="20.38" y="653.4" class="st10">KEYMESSAGE</text> </g>
+ <text x="20.38" y="653.4" class="st10">MESSAGE</text> </g>
</g>
</svg>