[EME] Bug 24951 - Use a string to identify the initData format instead of a MIME/content type
--- a/encrypted-media/encrypted-media.html Wed Mar 19 16:06:22 2014 -0700
+++ b/encrypted-media/encrypted-media.html Tue Apr 01 07:38:23 2014 -0700
@@ -91,7 +91,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 25 March 2014</h2>
+ <h2 id="draft-date">W3C Editor's Draft 1 April 2014</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>
@@ -278,6 +278,11 @@
<a href="#containers">Container Guidelines</a> provides specific information for common containers.
</p>
+ <p>The format of the initialization data depends upon the type of container. Containers may support more than one format
+ of initialization data. The <dfn id="initialization-data-type">initialization data type</dfn> is a string that indicates what
+ format the initialization data is provided in.
+ </p>
+
<p>
This initialization information may be obtained in some application-specific way or provided with the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.
Initialization data found with the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> is provided to the application in the <code><a href="#dom-initdata">initData</a></code> attribute of the <code><a href="#dom-needkey">needkey</a></code> event.
@@ -310,7 +315,7 @@
interface <dfn id="dom-mediakeys">MediaKeys</dfn> {
readonly attribute DOMString <a href="#dom-keysystem">keySystem</a>;
- <a href="#dom-mediakeysession">MediaKeySession</a> <a href="#dom-createsession">createSession</a>(DOMString contentType, Uint8Array initData);
+ <a href="#dom-mediakeysession">MediaKeySession</a> <a href="#dom-createsession">createSession</a>(DOMString initDataType, Uint8Array initData);
<a href="#dom-mediakeysession">MediaKeySession</a> <a href="#dom-loadsession">loadSession</a>(DOMString sessionId);
static bool <a href="#dom-istypesupported">isTypeSupported</a>(DOMstring <a href="#key-system">keySystem</a>, optional DOMString contentType);
@@ -376,21 +381,19 @@
<p>The <dfn id="dom-keysystem"><code>keySystem</code></dfn> attribute identifies the <a href="#key-system">Key System</a> being used.</p>
- <p>The <dfn id="dom-createsession"><code>createSession(contentType, initData)</code></dfn> method must run the following steps:</p>
+ <p>The <dfn id="dom-createsession"><code>createSession(initDataType, initData)</code></dfn> method must run the following steps:</p>
<p class="non-normative">Note: The contents of <var title="true">initData</var> are container-specific <a href="#initialization-data">Initialization Data</a>.
- <var title="true">contentType</var> specifies the container type and thus how to interpret <var title="true">initData</var>.
+ <var title="true">initDataType</var> is the <a href="#initialization-data-type">initialization data type</a> that indicates how to interpret <var title="true">initData</var>.
</p>
- <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and these should be included in <var title="true">contentType</var> as appropriate.
- However, user agents and <a href="#cdm">CDMs</a> should not treat sessions created with "audio/" differently than those created with "video/".
+ <p class="non-normative">Note: User agents and <a href="#cdm">CDMs</a> should not treat sessions created with audio data differently than those created with video data.
That is, there is no such thing as an "audio session" or a "video session" - all sessions are used for all media streams processed by <var title="true">cdm</var>.
</p>
<ol>
- <li><p>If <var title="true">contentType</var> is an empty string, throw an <code><a href="http://www.w3.org/TR/dom/#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception and abort these steps.</p></li>
+ <li><p>If <var title="true">initDataType</var> is an empty string, throw an <code><a href="http://www.w3.org/TR/dom/#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception and abort these steps.</p></li>
<li><p>If <var title="true">initData</var> is null or an empty array, throw an <code><a href="http://www.w3.org/TR/dom/#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception and abort these steps.</p></li>
- <li><p>If <var title="true">contentType</var> contains an invalid or unrecognized MIME type, throw a <code><a href="http://www.w3.org/TR/dom/#dom-domexception-not_supported_err">NOT_SUPPORTED_ERR</a></code> exception and abort these steps.</p></li>
- <li><p>Let <var title="true">initDataFormat</var> be the container type specified by <var title="true">contentType</var>.</p></li>
- <li><p>If the <a href="#cdm">content decryption module</a> corresponding to the <code><a href="#dom-keysystem">keySystem</a></code> attribute does not support the <a href="#initialization-data">Initialization Data</a> format <var title="true">initDataFormat</var>, throw a <code><a href="http://www.w3.org/TR/dom/#dom-domexception-not_supported_err">NOT_SUPPORTED_ERR</a></code> exception and abort these steps.</p></li>
+ <li><p>If <var title="true">initDataType</var> contains an invalid or unrecognized <a href="#initialization-data-type">initialization data type</a>, throw a <code><a href="http://www.w3.org/TR/dom/#dom-domexception-not_supported_err">NOT_SUPPORTED_ERR</a></code> exception and abort these steps.</p></li>
+ <li><p>If the <a href="#cdm">content decryption module</a> corresponding to the <code><a href="#dom-keysystem">keySystem</a></code> attribute does not support the <a href="#initialization-data">Initialization Data</a> format <var title="true">initDataType</var>, throw a <code><a href="http://www.w3.org/TR/dom/#dom-domexception-not_supported_err">NOT_SUPPORTED_ERR</a></code> exception and abort these steps.</p></li>
<li>Let <var title="true">session</var> be a new <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object, and initialize it as follows:
<ol>
<li><p>Set the <code><a href="#dom-error">error</a></code> attribute to null.</p></li>
@@ -400,7 +403,7 @@
</ol>
</li>
<li>
-<p>Schedule a task to process the <var title="true">initData</var>, providing <var title="true">session</var>, <var title="true">initDataFormat</var>, and <var title="true">initData</var>.</p>
+<p>Schedule a task to process the <var title="true">initData</var>, providing <var title="true">session</var>, <var title="true">initDataType</var>, and <var title="true">initData</var>.</p>
<p>The user agent will asynchronously execute the following steps in the task:</p>
<ol>
<li><p>Wait for the <a href="#dom-mediakeys-constructor"><code>MediaKeys</code> constructor</a> task to complete.</p></li>
@@ -418,7 +421,7 @@
<li>
<p>Use the <var title="true">cdm</var> to execute the following steps:</p>
<ol>
- <li><p>Process the <var title="true">initData</var>, interpreting it per <var title="true">initDataFormat</var>.</p></li>
+ <li><p>Process the <var title="true">initData</var>, interpreting it per <var title="true">initDataType</var>.</p></li>
<li>
<p>If a message exchange <span class="non-normative">(e.g. a license request)</span> is required:</p>
<ol>
@@ -580,7 +583,13 @@
<li><p>If <var title="true">keySystem</var> contains an unrecognized or unsupported <a href="#key-system">Key System</a>, return false and abort these steps. Key system string comparison is case-sensitive.</p></li>
<li><p>If <var title="true">contentType</var> was not provided or is an empty string, return true and abort these steps.</p></li>
<li><p>If <var title="true">contentType</var> contains an invalid or unrecognized MIME type, return false and abort these steps.</p></li>
- <li><p>Let <var title="true">initDataFormat</var> be the container type specified by <var title="true">contentType</var>.</p></li>
+ <li>
+ <div class="issue">
+<div class="issue-title"><span>Issue 5</span></div>
+<p class="">isTypeSupported needs to be updated including using initDataType. This includes the discussion in <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=24873">Bug 24873</a>.</p>
+</div>
+ <p>Let <var title="true">initDataFormat</var> be the container type specified by <var title="true">contentType</var>.</p>
+ </li>
<li><p>If the user agent does not support the <a href="#initialization-data">Initialization Data</a> format <var title="true">initDataFormat</var>, return false and abort these steps.</p></li>
<li><p>If the CDM specified by <var title="true">keySystem</var> does not support the <a href="#initialization-data">Initialization Data</a> format <var title="true">initDataFormat</var>, return false and abort these steps.</p></li>
<li><p>If neither the CDM specified by <var title="true">keySystem</var> nor the user agent support all codec(s) specified by <var title="true">contentType</var>, return false and abort these steps.</p></li>
@@ -769,12 +778,12 @@
<pre class="idl">
[Constructor(DOMString type, optional <a href="#dom-mediakeyneededeventinit">MediaKeyNeededEventInit</a> eventInitDict)]
interface <dfn id="dom-mediakeyneededevent">MediaKeyNeededEvent</dfn> : <a href="http://www.w3.org/TR/dom/#event">Event</a> {
- readonly attribute DOMString <a href="#dom-contenttype">contentType</a>;
+ readonly attribute DOMString <a href="#dom-initdatatype">initDataType</a>;
readonly attribute Uint8Array? <a href="#dom-initdata">initData</a>;
};
dictionary <dfn id="dom-mediakeyneededeventinit">MediaKeyNeededEventInit</dfn> : <a href="http://www.w3.org/TR/dom/#eventinit">EventInit</a> {
- DOMString <a href="#dom-contenttype">contentType</a>;
+ DOMString <a href="#dom-initdatatype">initDataType</a>;
Uint8Array? <a href="#dom-initdata">initData</a>;
};</pre>
@@ -792,10 +801,10 @@
<dl class="domintro">
<dt>
-<var title="">event</var> . <code><a href="#dom-contenttype">contentType</a></code>
+<var title="">event</var> . <code><a href="#dom-initdatatype">initDataType</a></code>
</dt>
<dd>
- <p>Returns the MIME type of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> related to the event.</p>
+ <p>Returns a string indicating the <a href="#initialization-data-type">initialization data type</a> of the <a href="#initialization-data">Initialization Data</a> related to the event.</p>
</dd>
<dt>
<var title="">event</var> . <code><a href="#dom-initdata">initData</a></code>
@@ -817,11 +826,7 @@
</dd>
</dl>
<div class="impl">
- <p>The <dfn id="dom-contenttype"><code>contentType</code></dfn> attribute contains the MIME type of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> specific to the event. The format of the <code><a href="#dom-initdata">initData</a></code> will depend on the <code><a href="#dom-contenttype">contentType</a></code>.</p>
- <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and user agents should include these in <var title="true">contentType</var> as appropriate.
- However, either variant may be returned for any stream of a given MIME type, and this is does not reflect the type(s) of stream(s) in the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.
- Applications processing this attribute should handle all such variants.
- </p>
+ <p>The <dfn id="dom-initdatatype"><code>initDataType</code></dfn> attribute contains a string indicating the <a href="#initialization-data-type">initialization data type</a> specific to the event. The format of the <code><a href="#dom-initdata">initData</a></code> will vary according to the <code><a href="#dom-initdatatype">initDataType</a></code>.</p>
<p>The <dfn id="dom-initdata"><code>initData</code></dfn> attribute contains <a href="#initialization-data">Initialization Data</a> specific to the event.</p>
<p>The <dfn id="dom-message"><code>message</code></dfn> attribute contains a message from the CDM. Messages are Key System-specific. <span class="non-normative">In most cases, it should be sent to a key server.</span></p>
<p>The <dfn id="dom-destinationurl"><code>destinationURL</code></dfn> is the URL to send the <code><a href="#dom-message">message</a></code> to.
@@ -914,12 +919,12 @@
<ol>
<li><p>Let <var title="">initData</var> be null.</p></li>
- <li><p>If <a href="#initialization-data">Initialization Data</a> was encountered and if the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> is <a href="http://www.w3.org/TR/html5/infrastructure.html#cors-same-origin">CORS-same-origin</a>, let <var title="">initData</var> be that initialization data.</p></li>
+ <li><p>If <a href="#initialization-data">Initialization Data</a> was encountered and if the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> is <a href="http://www.w3.org/TR/html5/infrastructure.html#cors-same-origin">CORS-same-origin</a>, let <var title="">initData</var> be that initialization data. Let <var title="">initDataType</var> be the string representing the <a href="#initialization-data-type">initialization data type</a>.</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-needkey">needkey</a></code> at the <a href="#media-element">media element</a>.</p>
<p>The event is of type <code><a href="#dom-mediakeyneededevent">MediaKeyNeededEvent</a></code> and has:</p>
<ul style="list-style-type:none"><li>
- <code><a href="#dom-contenttype">contentType</a></code> = the MIME type corresponding to the container type of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a><br>
+ <code><a href="#dom-initdatatype">initDataType</a></code> = <var title="">initDataType</var><br>
<code><a href="#dom-initdata">initData</a></code> = <var title="">initData</var>
</li></ul>
<p class="non-normative">Firing this event allows the application to begin acquiring the key process before it is needed.</p>
@@ -1365,7 +1370,7 @@
if (!video.<a href="#dom-attrmediakeys">mediaKeys</a>)
throw "Could not create MediaKeys";
- var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-contenttype">contentType</a>, event.<a href="#dom-initdata">initData</a>);
+ var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-initdatatype">initDataType</a>, event.<a href="#dom-initdata">initData</a>);
if (!keySession)
throw "Could not create key session";
@@ -1405,7 +1410,7 @@
if (!video.<a href="#dom-attrmediakeys">mediaKeys</a>)
throw "Could not create MediaKeys";
- var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-contenttype">contentType</a>, event.<a href="#dom-initdata">initData</a>);
+ var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-initdatatype">initDataType</a>, event.<a href="#dom-initdata">initData</a>);
if (!keySession)
throw "Could not create key session";
@@ -1465,7 +1470,7 @@
if (!video.<a href="#dom-attrmediakeys">mediaKeys</a>)
throw "Could not create MediaKeys";
- var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-contenttype">contentType</a>, event.<a href="#dom-initdata">initData</a>);
+ var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-initdatatype">initDataType</a>, event.<a href="#dom-initdata">initData</a>);
if (!keySession)
throw "Could not create key session";
@@ -1544,7 +1549,7 @@
if (!video.<a href="#dom-attrmediakeys">mediaKeys</a>)
throw "Could not create MediaKeys";
- var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-contenttype">contentType</a>, event.<a href="#dom-initdata">initData</a>);
+ var keySession = video.<a href="#dom-attrmediakeys">mediaKeys</a>.<a href="#dom-createsession">createSession</a>(event.<a href="#dom-initdatatype">initDataType</a>, event.<a href="#dom-initdata">initData</a>);
if (!keySession)
throw "Could not create key session";
--- a/encrypted-media/encrypted-media.xml Wed Mar 19 16:06:22 2014 -0700
+++ b/encrypted-media/encrypted-media.xml Tue Apr 01 07:38:23 2014 -0700
@@ -90,7 +90,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 25 March 2014</h2>
+ <h2 id="draft-date">W3C Editor's Draft 1 April 2014</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>
@@ -275,6 +275,11 @@
<a href="#containers">Container Guidelines</a> provides specific information for common containers.
</p>
+ <p>The format of the initialization data depends upon the type of container. Containers may support more than one format
+ of initialization data. The <dfn id="initialization-data-type">initialization data type</dfn> is a string that indicates what
+ format the initialization data is provided in.
+ </p>
+
<p>
This initialization information may be obtained in some application-specific way or provided with the <videoanchor name="media-data">media data</videoanchor>.
Initialization data found with the <videoanchor name="media-data">media data</videoanchor> is provided to the application in the <coderef>initData</coderef> attribute of the <coderef>needkey</coderef> event.
@@ -307,7 +312,7 @@
interface <precodedfn>MediaKeys</precodedfn> {
readonly attribute DOMString <precoderef>keySystem</precoderef>;
- <precoderef>MediaKeySession</precoderef> <premethodref>createSession</premethodref>(DOMString contentType, Uint8Array initData);
+ <precoderef>MediaKeySession</precoderef> <premethodref>createSession</premethodref>(DOMString initDataType, Uint8Array initData);
<precoderef>MediaKeySession</precoderef> <premethodref>loadSession</premethodref>(DOMString sessionId);
static bool <premethodref>isTypeSupported</premethodref>(DOMstring <a href="#key-system">keySystem</a>, optional DOMString contentType);
@@ -373,21 +378,19 @@
<p>The <codedfn>keySystem</codedfn> attribute identifies the <a href="#key-system">Key System</a> being used.</p>
- <p>The <methoddfn name="createSession">createSession(<var title="true">contentType</var>, <var title="true">initData</var>)</methoddfn> method must run the following steps:</p>
+ <p>The <methoddfn name="createSession">createSession(<var title="true">initDataType</var>, <var title="true">initData</var>)</methoddfn> method must run the following steps:</p>
<p class="non-normative">Note: The contents of <var title="true">initData</var> are container-specific <a href="#initialization-data">Initialization Data</a>.
- <var title="true">contentType</var> specifies the container type and thus how to interpret <var title="true">initData</var>.
+ <var title="true">initDataType</var> is the <a href="#initialization-data-type">initialization data type</a> that indicates how to interpret <var title="true">initData</var>.
</p>
- <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and these should be included in <var title="true">contentType</var> as appropriate.
- However, user agents and <a href="#cdm">CDMs</a> should not treat sessions created with "audio/" differently than those created with "video/".
+ <p class="non-normative">Note: User agents and <a href="#cdm">CDMs</a> should not treat sessions created with audio data differently than those created with video data.
That is, there is no such thing as an "audio session" or a "video session" - all sessions are used for all media streams processed by <var title="true">cdm</var>.
</p>
<ol>
- <li><p>If <var title="true">contentType</var> is an empty string, throw an <invalid-access-err/> exception and abort these steps.</p></li>
+ <li><p>If <var title="true">initDataType</var> is an empty string, throw an <invalid-access-err/> exception and abort these steps.</p></li>
<li><p>If <var title="true">initData</var> is null or an empty array, throw an <invalid-access-err/> exception and abort these steps.</p></li>
- <li><p>If <var title="true">contentType</var> contains an invalid or unrecognized MIME type, throw a <not-supported-err/> exception and abort these steps.</p></li>
- <li><p>Let <var title="true">initDataFormat</var> be the container type specified by <var title="true">contentType</var>.</p></li>
- <li><p>If the <a href="#cdm">content decryption module</a> corresponding to the <coderef>keySystem</coderef> attribute does not support the <a href="#initialization-data">Initialization Data</a> format <var title="true">initDataFormat</var>, throw a <not-supported-err/> exception and abort these steps.</p></li>
+ <li><p>If <var title="true">initDataType</var> contains an invalid or unrecognized <a href="#initialization-data-type">initialization data type</a>, throw a <not-supported-err/> exception and abort these steps.</p></li>
+ <li><p>If the <a href="#cdm">content decryption module</a> corresponding to the <coderef>keySystem</coderef> attribute does not support the <a href="#initialization-data">Initialization Data</a> format <var title="true">initDataType</var>, throw a <not-supported-err/> exception and abort these steps.</p></li>
<li>Let <var title="true">session</var> be a new <coderef>MediaKeySession</coderef> object, and initialize it as follows:
<ol>
<li><p>Set the <coderef>error</coderef> attribute to null.</p></li>
@@ -396,7 +399,7 @@
<li><p>Let the state be <coderef prefix="state">CREATED</coderef>.</p></li>
</ol>
</li>
- <li><p>Schedule a task to process the <var title="true">initData</var>, providing <var title="true">session</var>, <var title="true">initDataFormat</var>, and <var title="true">initData</var>.</p>
+ <li><p>Schedule a task to process the <var title="true">initData</var>, providing <var title="true">session</var>, <var title="true">initDataType</var>, and <var title="true">initData</var>.</p>
<p>The user agent will asynchronously execute the following steps in the task:</p>
<ol>
<li><p>Wait for the <a href="#dom-mediakeys-constructor"><code>MediaKeys</code> constructor</a> task to complete.</p></li>
@@ -412,7 +415,7 @@
<li><p>Let <var title="true">cdm</var> be the <var title="true">cdm</var> loaded in the <a href="#dom-mediakeys-constructor"><code>MediaKeys</code> constructor</a>.</p></li>
<li><p>Use the <var title="true">cdm</var> to execute the following steps:</p>
<ol>
- <li><p>Process the <var title="true">initData</var>, interpreting it per <var title="true">initDataFormat</var>.</p></li>
+ <li><p>Process the <var title="true">initData</var>, interpreting it per <var title="true">initDataType</var>.</p></li>
<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 the <var title="true">initData</var>.</p>
@@ -562,7 +565,10 @@
<li><p>If <var title="true">keySystem</var> contains an unrecognized or unsupported <a href="#key-system">Key System</a>, return false and abort these steps. Key system string comparison is case-sensitive.</p></li>
<li><p>If <var title="true">contentType</var> was not provided or is an empty string, return true and abort these steps.</p></li>
<li><p>If <var title="true">contentType</var> contains an invalid or unrecognized MIME type, return false and abort these steps.</p></li>
- <li><p>Let <var title="true">initDataFormat</var> be the container type specified by <var title="true">contentType</var>.</p></li>
+ <li>
+ <div class="issue"><div class="issue-title"><span>Issue 5</span></div><p class="">isTypeSupported needs to be updated including using initDataType. This includes the discussion in <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=24873">Bug 24873</a>.</p></div>
+ <p>Let <var title="true">initDataFormat</var> be the container type specified by <var title="true">contentType</var>.</p>
+ </li>
<li><p>If the user agent does not support the <a href="#initialization-data">Initialization Data</a> format <var title="true">initDataFormat</var>, return false and abort these steps.</p></li>
<li><p>If the CDM specified by <var title="true">keySystem</var> does not support the <a href="#initialization-data">Initialization Data</a> format <var title="true">initDataFormat</var>, return false and abort these steps.</p></li>
<li><p>If neither the CDM specified by <var title="true">keySystem</var> nor the user agent support all codec(s) specified by <var title="true">contentType</var>, return false and abort these steps.</p></li>
@@ -741,12 +747,12 @@
<pre class="idl">
[Constructor(DOMString type, optional <precoderef>MediaKeyNeededEventInit</precoderef> eventInitDict)]
interface <precodedfn>MediaKeyNeededEvent</precodedfn> : <dom4ref name="event">Event</dom4ref> {
- readonly attribute DOMString <precoderef>contentType</precoderef>;
+ readonly attribute DOMString <precoderef>initDataType</precoderef>;
readonly attribute Uint8Array? <precoderef>initData</precoderef>;
};
dictionary <precodedfn>MediaKeyNeededEventInit</precodedfn> : <dom4ref name="eventinit">EventInit</dom4ref> {
- DOMString <precoderef>contentType</precoderef>;
+ DOMString <precoderef>initDataType</precoderef>;
Uint8Array? <precoderef>initData</precoderef>;
};</pre>
@@ -763,9 +769,9 @@
};</pre>
<dl class="domintro">
- <dt><var title="">event</var> . <coderef>contentType</coderef></dt>
+ <dt><var title="">event</var> . <coderef>initDataType</coderef></dt>
<dd>
- <p>Returns the MIME type of the <videoanchor name="media-data">media data</videoanchor> related to the event.</p>
+ <p>Returns a string indicating the <a href="#initialization-data-type">initialization data type</a> of the <a href="#initialization-data">Initialization Data</a> related to the event.</p>
</dd>
<dt><var title="">event</var> . <coderef>initData</coderef></dt>
<dd>
@@ -781,11 +787,7 @@
</dd>
</dl>
<div class="impl">
- <p>The <codedfn>contentType</codedfn> attribute contains the MIME type of the <videoanchor name="media-data">media data</videoanchor> specific to the event. The format of the <coderef>initData</coderef> will depend on the <coderef>contentType</coderef>.</p>
- <p class="non-normative">Note: MIME types usually include "audio/" or "video/", and user agents should include these in <var title="true">contentType</var> as appropriate.
- However, either variant may be returned for any stream of a given MIME type, and this is does not reflect the type(s) of stream(s) in the <videoanchor name="media-data">media data</videoanchor>.
- Applications processing this attribute should handle all such variants.
- </p>
+ <p>The <codedfn>initDataType</codedfn> attribute contains a string indicating the <a href="#initialization-data-type">initialization data type</a> specific to the event. The format of the <coderef>initData</coderef> will vary according to the <coderef>initDataType</coderef>.</p>
<p>The <codedfn>initData</codedfn> attribute contains <a href="#initialization-data">Initialization Data</a> specific to the event.</p>
<p>The <codedfn>message</codedfn> attribute contains a message from the CDM. Messages are Key System-specific. <span class="non-normative">In most cases, it should be sent to a key server.</span></p>
<p>The <codedfn>destinationURL</codedfn> is the URL to send the <coderef>message</coderef> to.
@@ -877,12 +879,12 @@
<ol>
<li><p>Let <var title="">initData</var> be null.</p></li>
- <li><p>If <a href="#initialization-data">Initialization Data</a> was encountered and if the <videoanchor name="media-data">media data</videoanchor> is <cors-same-origin/>, let <var title="">initData</var> be that initialization data.</p></li>
+ <li><p>If <a href="#initialization-data">Initialization Data</a> was encountered and if the <videoanchor name="media-data">media data</videoanchor> is <cors-same-origin/>, let <var title="">initData</var> be that initialization data. Let <var title="">initDataType</var> be the string representing the <a href="#initialization-data-type">initialization data type</a>.</p></li>
<li>
<p><Queue-a-task/> to <fire-a-simple-event/> named <coderef>needkey</coderef> at the <a href="#media-element">media element</a>.</p>
<p>The event is of type <coderef>MediaKeyNeededEvent</coderef> and has:</p>
<ul style="list-style-type:none"><li>
- <coderef>contentType</coderef> = the MIME type corresponding to the container type of the <videoanchor name="media-data">media data</videoanchor><br></br>
+ <coderef>initDataType</coderef> = <var title="">initDataType</var><br></br>
<coderef>initData</coderef> = <var title="">initData</var>
</li></ul>
<p class="non-normative">Firing this event allows the application to begin acquiring the key process before it is needed.</p>
@@ -1316,7 +1318,7 @@
if (!video.<precoderef prefix="attr">mediaKeys</precoderef>)
throw "Could not create MediaKeys";
- var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>contentType</precoderef>, event.<precoderef>initData</precoderef>);
+ var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>initDataType</precoderef>, event.<precoderef>initData</precoderef>);
if (!keySession)
throw "Could not create key session";
@@ -1356,7 +1358,7 @@
if (!video.<precoderef prefix="attr">mediaKeys</precoderef>)
throw "Could not create MediaKeys";
- var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>contentType</precoderef>, event.<precoderef>initData</precoderef>);
+ var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>initDataType</precoderef>, event.<precoderef>initData</precoderef>);
if (!keySession)
throw "Could not create key session";
@@ -1416,7 +1418,7 @@
if (!video.<precoderef prefix="attr">mediaKeys</precoderef>)
throw "Could not create MediaKeys";
- var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>contentType</precoderef>, event.<precoderef>initData</precoderef>);
+ var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>initDataType</precoderef>, event.<precoderef>initData</precoderef>);
if (!keySession)
throw "Could not create key session";
@@ -1495,7 +1497,7 @@
if (!video.<precoderef prefix="attr">mediaKeys</precoderef>)
throw "Could not create MediaKeys";
- var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>contentType</precoderef>, event.<precoderef>initData</precoderef>);
+ var keySession = video.<precoderef prefix="attr">mediaKeys</precoderef>.<premethodref>createSession</premethodref>(event.<precoderef>initDataType</precoderef>, event.<precoderef>initData</precoderef>);
if (!keySession)
throw "Could not create key session";