[EME] Clean up the 'Queue a "message" Event' algorithm and calls.
--- a/encrypted-media/encrypted-media.html Fri Jan 24 17:40:34 2014 -0800
+++ b/encrypted-media/encrypted-media.html Fri Jan 24 18:19:46 2014 -0800
@@ -453,8 +453,11 @@
<dl class="switch">
<dt>If <var title="true">request</var> is not null</dt>
<dd>
- <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm with the <var title="true">request</var>
- and <var title="true">defaultURL</var>.</p>
+ <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm on the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object with:</p>
+ <ul style="list-style-type:none"><li>
+ <code><a href="#dom-message">message</a></code> = <var title="true">request</var><br>
+ <code><a href="#dom-destinationurl">destinationURL</a></code> = <var title="true">defaultURL</var>
+ </li></ul>
</dd>
<dt>Otherwise</dt>
<dd>
@@ -499,6 +502,8 @@
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 during the loading the <a href="#dom-media-keys-constructor"><code>MediaKeys</code> constructor</a> task
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><p>Let <var title="true">request</var> be null.</p></li>
+ <li><p>Let <var title="true">destinationURL</var> be null.</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>
<p>Use <var title="true">cdm</var> to execute the following steps:</p>
@@ -508,7 +513,7 @@
<p>If a message exchange <span class="non-normative">(e.g. a license request)</span> is required:</p>
<ol>
<li><p>Let <var title="true">request</var> be a request generated by the <a href="#cdm">CDM</a> using <var title="true">sessionId</var>.</p></li>
- <li><p>If the stored data for <var title="true">sessionId</var> indicates a default URL relevant to <var title="true">keySystem</var>, let <var title="true">defaultURL</var> be that URL.</p></li>
+ <li><p>If the stored data for <var title="true">sessionId</var> indicates a destination URL relevant to <var title="true">keySystem</var>, let <var title="true">destinationURL</var> be that URL.</p></li>
</ol>
</li>
</ol>
@@ -540,8 +545,11 @@
<dl class="switch">
<dt>If <var title="true">request</var> is not null</dt>
<dd>
- <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm with the <var title="true">request</var>
- and <var title="true">defaultURL</var>.</p>
+ <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm on the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object with:</p>
+ <ul style="list-style-type:none"><li>
+ <code><a href="#dom-message">message</a></code> = <var title="true">request</var><br>
+ <code><a href="#dom-destinationurl">destinationURL</a></code> = <var title="true">destinationURL</var>
+ </li></ul>
</dd>
<dt>Otherwise</dt>
<dd>
@@ -640,13 +648,11 @@
<dl class="switch">
<dt>If <var title="true">request</var> is not null</dt>
<dd>
- <ol>
- <li><p>Let <var title="true">defaultURL</var> be null.</p></li>
- <li>
- <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm with the <var title="true">request</var>
- and <var title="true">defaultURL</var>.</p>
- </li>
- </ol>
+ <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm on the <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object with:</p>
+ <ul style="list-style-type:none"><li>
+ <code><a href="#dom-message">message</a></code> = <var title="true">request</var><br>
+ <code><a href="#dom-destinationurl">destinationURL</a></code> = null
+ </li></ul>
</dd>
<dt>Otherwise</dt>
<dd>
@@ -1076,16 +1082,18 @@
<p>At any point while decrypting content, the user agent may determine that a <code><a href="#dom-mediakeysession">MediaKeySession</a></code> is no longer needed. It should run the <a href="#algorithms-session-close">Session Close</a> algorithm on the session.</p>
<h3 id="algorithms-queue-message">4.3. Queue a "message" Event</h3>
- <p>The Queue a "message" Event algorithm is run when the CDM needs to queue a message event to a <code><a href="#dom-mediakeysession">MediaKeySession</a></code>.
- The message event includes a <var title="true">request</var> and a <var title="true">defaultURL</var>. The following steps are run:</p>
+ <p>The Queue a "message" Event algorithm is run when the CDM needs to queue a message event to a <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.
+ Requests to run this algorithm include a target <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object, a <var title="true">request</var>, and a <var title="true">destinationURL</var>.
+ The following steps are run:</p>
<ol>
- <li><p>Let the state of the session be <code><a href="#dom-statepending">PENDING</a></code>.</p></li>
+ <li><p>Let <var title="true">session</var> be the specified <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</p></li>
+ <li><p>Let the state of <var title="true">session</var> 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-eventmessage">message</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 <var title="true">session</var>.</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>
- <code><a href="#dom-destinationurl">destinationURL</a></code> = <var title="true">defaultURL</var>
+ <code><a href="#dom-message">message</a></code> = the specified <var title="true">request</var><br>
+ <code><a href="#dom-destinationurl">destinationURL</a></code> = the specified <var title="true">destinationURL</var>
</li></ul>
</li>
</ol>
--- a/encrypted-media/encrypted-media.xml Fri Jan 24 17:40:34 2014 -0800
+++ b/encrypted-media/encrypted-media.xml Fri Jan 24 18:19:46 2014 -0800
@@ -441,8 +441,11 @@
<dl class="switch">
<dt>If <var title="true">request</var> is not null</dt>
<dd>
- <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm with the <var title="true">request</var>
- and <var title="true">defaultURL</var>.</p>
+ <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm on the <coderef>MediaKeySession</coderef> object with:</p>
+ <ul style="list-style-type:none"><li>
+ <coderef>message</coderef> = <var title="true">request</var><br></br>
+ <coderef>destinationURL</coderef> = <var title="true">defaultURL</var>
+ </li></ul>
</dd>
<dt>Otherwise</dt>
<dd>
@@ -485,6 +488,8 @@
If there is a <coderef>MediaKeyError</coderef> stored with the <coderef>MediaKeys</coderef> object that occurred because of an error during the loading the <a href="#dom-media-keys-constructor"><code>MediaKeys</code> constructor</a> task
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>Let <var title="true">request</var> be null.</p></li>
+ <li><p>Let <var title="true">destinationURL</var> be null.</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><p>Use <var title="true">cdm</var> to execute the following steps:</p>
<ol>
@@ -492,7 +497,7 @@
<li><p>If a message exchange <span class="non-normative">(e.g. a license request)</span> is required:</p>
<ol>
<li><p>Let <var title="true">request</var> be a request generated by the <a href="#cdm">CDM</a> using <var title="true">sessionId</var>.</p></li>
- <li><p>If the stored data for <var title="true">sessionId</var> indicates a default URL relevant to <var title="true">keySystem</var>, let <var title="true">defaultURL</var> be that URL.</p></li>
+ <li><p>If the stored data for <var title="true">sessionId</var> indicates a destination URL relevant to <var title="true">keySystem</var>, let <var title="true">destinationURL</var> be that URL.</p></li>
</ol>
</li>
</ol>
@@ -521,8 +526,11 @@
<dl class="switch">
<dt>If <var title="true">request</var> is not null</dt>
<dd>
- <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm with the <var title="true">request</var>
- and <var title="true">defaultURL</var>.</p>
+ <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm on the <coderef>MediaKeySession</coderef> object with:</p>
+ <ul style="list-style-type:none"><li>
+ <coderef>message</coderef> = <var title="true">request</var><br></br>
+ <coderef>destinationURL</coderef> = <var title="true">destinationURL</var>
+ </li></ul>
</dd>
<dt>Otherwise</dt>
<dd>
@@ -615,13 +623,11 @@
<dl class="switch">
<dt>If <var title="true">request</var> is not null</dt>
<dd>
- <ol>
- <li><p>Let <var title="true">defaultURL</var> be null.</p></li>
- <li>
- <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm with the <var title="true">request</var>
- and <var title="true">defaultURL</var>.</p>
- </li>
- </ol>
+ <p>Run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm on the <coderef>MediaKeySession</coderef> object with:</p>
+ <ul style="list-style-type:none"><li>
+ <coderef>message</coderef> = <var title="true">request</var><br></br>
+ <coderef>destinationURL</coderef> = null
+ </li></ul>
</dd>
<dt>Otherwise</dt>
<dd>
@@ -1016,16 +1022,18 @@
<p>At any point while decrypting content, the user agent may determine that a <coderef>MediaKeySession</coderef> is no longer needed. It should run the <a href="#algorithms-session-close">Session Close</a> algorithm on the session.</p>
<h3 id="algorithms-queue-message">4.3. Queue a "message" Event</h3>
- <p>The Queue a "message" Event algorithm is run when the CDM needs to queue a message event to a <coderef>MediaKeySession</coderef>.
- The message event includes a <var title="true">request</var> and a <var title="true">defaultURL</var>. The following steps are run:</p>
+ <p>The Queue a "message" Event algorithm is run when the CDM needs to queue a message event to a <coderef>MediaKeySession</coderef> object.
+ Requests to run this algorithm include a target <coderef>MediaKeySession</coderef> object, a <var title="true">request</var>, and a <var title="true">destinationURL</var>.
+ The following steps are run:</p>
<ol>
- <li><p>Let the state of the session be <coderef prefix="state">PENDING</coderef>.</p></li>
+ <li><p>Let <var title="true">session</var> be the specified <coderef>MediaKeySession</coderef> object.</p></li>
+ <li><p>Let the state of <var title="true">session</var> be <coderef prefix="state">PENDING</coderef>.</p></li>
<li>
- <p><Queue-a-task/> to <fire-a-simple-event/> named <coderef prefix="event">message</coderef> at the new object.</p>
+ <p><Queue-a-task/> to <fire-a-simple-event/> named <coderef prefix="event">message</coderef> at <var title="true">session</var>.</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>
- <coderef>destinationURL</coderef> = <var title="true">defaultURL</var>
+ <coderef>message</coderef> = the specified <var title="true">request</var><br></br>
+ <coderef>destinationURL</coderef> = the specified <var title="true">destinationURL</var>
</li></ul>
</li>
</ol>