[EME] Bug 25923 - Add requestMediaKeySystemAccess() and MediaKeySystemAccess.
authorDavid Dorwin <ddorwin@google.com>
Mon, 13 Oct 2014 16:23:29 -0700
changeset 468 5e1803bb51e7
parent 467 3a6a8c4ed5ca
child 469 a162640cb5b7
[EME] Bug 25923 - Add requestMediaKeySystemAccess() and MediaKeySystemAccess.
encrypted-media/encrypted-media-respec.html
encrypted-media/encrypted-media.html
encrypted-media/encrypted-media.js
--- a/encrypted-media/encrypted-media-respec.html	Mon Oct 13 12:14:02 2014 -0700
+++ b/encrypted-media/encrypted-media-respec.html	Mon Oct 13 16:23:29 2014 -0700
@@ -264,16 +264,198 @@
 
 
     <section>
+      <h2>Obtaining Access to Key Systems</h2>
+
+      <section>
+        <h2 id="requestMediaKeySystemAccess">requestMediaKeySystemAccess()</h2>
+
+        <dl title="partial interface Navigator" class="idl">
+          <dt>Promise&lt;MediaKeySystemAccess&gt; requestMediaKeySystemAccess()</dt>
+          <dd>
+            <p>Requests access to the specified <a def-id="keysystem"></a>.
+              When <code>supportedConfigurations</code> is specified, the combination specified by at least one of its elements must be supported.
+              The resulting <a>MediaKeySystemAccess</a> will correspond to the first such elment.
+            </p>
+            <p>Any permission checks or user interaction, such as a prompt, SHOULD be performed before resolving the promise.</p>
+            <p>If the <code>keySystem</code> is not supported or not allowed (in one at least one of the <code>supportedConfigurations</code>, if specified), the promise is rejected.
+              Otherwise, it is resolved with a new MediaKeySystemAccess object.
+            </p>
+
+            <dl class='parameters'>
+              <dt>DOMString keySystem</dt>
+              <dd>
+                The <a def-id="keysystem"></a> for which access is being requested.
+              </dd>
+              <!-- TODO: The template type is lost! 'Promise' is handled correctly. -->
+              <dt>optional Sequence&lt;<a>MediaKeySystemOptions</a>&gt; supportedConfigurations</dt>
+              <dd>
+                A Sequence of <a>MediaKeySystemOptions</a> configurations to try in order.
+                The first element with a satisfiable combination will be used. 
+              </dd>
+            </dl>
+
+            <ol class="method-algorithm">
+              <li><p>If <var title="true">keySystem</var> is an empty string, return a promise rejected with <a def-id="new-domexception-named"></a> <a def-id="InvalidAccessError"></a>.</p></li>
+              <li><p>If <var title="true">supportedConfigurations</var> was provided and is empty, return a promise rejected with <a def-id="new-domexception-named"></a> <a def-id="InvalidAccessError"></a>.</p></li>
+              <li><p>If <var title="true">keySystem</var> is not one of the <a def-id="keysystems"></a> supported by the user agent, return a promise rejected with <a def-id="new-domexception-named"></a> <a def-id="NotSupportedError"></a>. String comparison is case-sensitive.</p></li>
+              <li><p>Let <var>promise</var> be a new promise.</p></li>
+              <li><p>Run the following steps asynchronously:</p>
+                <ol>
+                  <li><p>If <var title="true">keySystem</var> is not supported or not allowed in the <a def-id="origin"></a> of the calling context's <a def-id="document-concept"></a>, return a promise rejected with <a def-id="new-domexception-named"></a> <a def-id="NotSupportedError"></a>.</p>
+                    <p class="issue"><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25923">Bug 25923</a> - It is TBD whether rejecting the promise is the correct behavior or whether the promise should instead be resolved with <code>null</code>.</p>
+                  </li>
+                  <li><p>If <code>supportedConfigurations</code> was not provided, resolve the promise with a new <a>MediaKeySystemAccess</a> object, execute the following steps:</p>
+                    <ol>
+                      <li>
+                        <p>Let <var title="true">access</var> be a new <a>MediaKeySystemAccess</a> object, and initialize it as follows:</p>
+                        <ol>
+                          <li><p>Set the <a def-id="keySystem-attribute"></a> attribute to <var title="true">keySystem</var>.</p></li>
+                        </ol>
+                      </li>
+                      <li><p>Resolve <var>promise</var> with <var title="true">access</var> and abort these steps.</p></li>
+                    </ol>
+                  </li>
+                  <li>
+                    <p>For each element of <code>supportedConfigurations</code>:</p>
+                    <ol>
+                      <li><p>Let <var>combination</var> be the element.</p></li>
+                      <li>
+                        <p>For each dictionary member in <var>combination</var>:</p>
+                        <ol>
+                          <li><p>If the member’s value cannot be satisfied together in combination with the previous members, continue to the next iteration of the loop.</p></li>
+                        </ol>
+                        <p class="note">Unrecognized dictionary members are ignored per [[WebIDL]], and will never reach this algorith. Thus, they cannot be considered as part of the combination.</p>
+                        <li>
+                          <p>If <var title="true">keySystem</var> is supported and allowed in the <a def-id="origin"></a> of the calling context's <a def-id="document-concept"></a> in the configuration specified by the combination of the values in <var>combination</var>, execute the following steps:</p>
+                          <ol>
+                            <li>
+                              <p>Let <var title="true">access</var> be a new <a>MediaKeySystemAccess</a> object, and initialize it as follows:</p>
+                              <ol>
+                                <li><p>Set the <a def-id="keySystem-attribute"></a> attribute to <var title="true">keySystem</var>.</p></li>
+                                <!-- TODO: Initialize the object further if necessary. -->
+                              </ol>
+                            </li>
+                            <li><p>Resolve <var>promise</var> with <var title="true">access</var> and abort these steps.</p></li>
+                          </ol>
+                        </li>
+                      </li>
+                    </ol>
+                  </li>
+                  <li><p>Reject <var>promise</var> with <a def-id="new-domexception-named"></a> <a def-id="NotSupportedError"></a>.</p> 
+                    <p class="note">There were no supported combinations in <code>supportedConfigurations</code>.</p>
+                  </li>
+                </ol>
+              </li>
+              <li><p>Return <var>promise</var>.</p></li>
+            </ol>
+          </dd>
+        </dl>
+      </section>
+
+      <section>
+        <h2><a>MediaKeySystemOptions</a> dictionary</h2>
+  
+        <dl title="enum MediaKeysRequirement" class="idl">
+          <dt>required</dt>
+          <dd>
+            The returned object MUST support this feature.
+          <dt>optional</dt>
+          <dd>
+            The returned object MAY support this feature.
+          <dt>disallowed</dt>
+          <dd>
+            The returned object MUST NOT support this feature.
+          </dd>
+        </dl>
+
+        <dl title="dictionary MediaKeySystemOptions" class='idl'>
+          <dt>DOMString initDataType = ""</dt>
+          <dd>
+            The required <a def-id="initialization-data-type"></a>.
+          </dd>
+          <dt>DOMString audioType = ""</dt>
+          <dd>
+            The required audio content type.
+          </dd>
+          <dt>DOMString audioCapability = ""</dt>
+          <dd>
+            The required audio capability.
+          </dd>
+          <dt>DOMString videoType = ""</dt>
+          <dd>
+            The required video content type.
+          </dd>
+          <dt>DOMString videoCapability = ""</dt>
+          <dd>
+            The required video capability.
+          </dd>
+          <dt>MediaKeysRequirement uniqueidentifier = "optional"</dt>
+          <dd>
+            Whether a unique identifier is required.
+          </dd>
+          <dt>MediaKeysRequirement stateful = "optional"</dt>
+          <dd>
+            Whether the ability to persist state is required. This includes session data and any other type of state.<br/>
+            Only <a def-id="temporary-session"></a> sessions may be created when statefulness is not supported.
+            <p class="note">
+              Except for <a def-id="persistent-session"></a> sessions, the need and ability to store state is Key System implementation-specific and may vary by feature used.</p>
+          </dd>
+        </dl>
+  
+        <p class="issue"><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25923">Bug 25923</a> - The structure of the <code>DOMString</code> members may change. If it is, other methods may be added.</p>
+  
+        <p>Implementations SHOULD NOT add members to the this dictionary.
+          Should member(s) be added, they MUST be of type MediaKeysRequirement, and it is RECOMMENED that they have default values of <a def-id="requirement-optional"></a> to support the widest range of application and client combinations.
+        </p>
+        <p>This dictionary MUST NOT be used to pass state or data to the CDM.</p>
+
+      </section>
+    </section>
+
+        
+    <section>
+      <h2><a>MediaKeySystemAccess</a> Interface</h2>
+      <p>The MediaKeySystemAccess object provides access to a <a def-id="keysystem"></a>.</p>
+
+      <dl title="interface MediaKeySystemAccess" class='idl'>
+        <dt>readonly attribute DOMString keySystem</dt>
+        <dd>
+          Identifies the <a def-id="keysystem"></a> being used.
+        </dd>
+  
+        <dt>Promise&lt;MediaKeys&gt; createMediaKeys()</dt>
+        <dd>
+          <p>Creates a new <a def-id="mediakeys"></a> object for <var title="true">keySystem</var>.</p>
+      
+          <ol class="method-algorithm">
+            <li><p>Let <var>promise</var> be a new promise.</p></li>
+            <li><p>Run the following steps asynchronously:</p>
+              <ol>
+                <li><p>Let <var title="true">cdm</var> be the <a def-id="cdm"></a> corresponding to this object.</p></li>
+                <li><p>Load and initialize the <var title="true">cdm</var> if necessary.</p></li>
+                <li><p>If <var title="true">cdm</var> fails to load or initialize, reject <var>promise</var> with <a def-id="new-domexception-named"></a> <a def-id="appropriate-error-name"></a>.</p></li>
+                <li><p>Let <var title="true">media keys</var> be a new <a def-id="mediakeys"></a> object.</p></li>
+                <li><p>Resolve <var>promise</var> with <var title="true">media keys</var>.</p></li>
+              </ol>
+            </li>
+            <li><p>Return <var>promise</var>.</p></li>
+          </ol>
+        </dd>
+      </dl>
+    </section>
+
+
+    <section>
       <h2><a>MediaKeys</a> Interface</h2>
       <p>The MediaKeys object represents a set of keys that an associated HTMLMediaElement can use for decryption of <a def-id="media-data"></a> during playback.
         It also represents a CDM instance.
       </p>
-      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
+      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes [[!WebIDL]] type mapping errors.</p>
       <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
       
-      <p class="issue"><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25923">Bug 25923</a> - Feature detection, including isTypeSupported(), and MediaKeys creation may change significantly.</p>
+  <!-- TODO: Move or remove depending on the outcome of Bug 25923.
       <dl title="enum IsTypeSupportedResult" class="idl">
-        <dt>/* empty string */</dt><!-- TODO: Fix. -->
+        <dt>/* empty string */</dt><!-- TODO: Fix. -- >
         <dd>
           The combination is not supported.
         </dd>
@@ -286,6 +468,7 @@
           The combination is likely supported.
         </dd>
       </dl>
+-->
   
       <dl title="enum SessionType" class="idl">
         <dt>temporary</dt>
@@ -302,17 +485,14 @@
       </dl>
   
       <dl title="interface MediaKeys" class='idl'>
-        <dt>readonly attribute DOMString keySystem</dt>
-        <dd>
-          Identifies the <a def-id="keysystem"></a> being used.
-        </dd>
-  
         <dt>MediaKeySession createSession(optional SessionType sessionType = "temporary")</dt>
         <dd>
           <p>Returns a new <a def-id="mediakeysession"></a> object.</p>
       
           <ol class="method-algorithm">
-            <!-- TODO: Reference the CDM loaded during initialization instead of "<a def-id="cdm"></a> corresponding to the <a def-id="keySystem-attribute"></a> attribute". Here and elsewhere. -->
+            <!-- TODO: Find a better way to reference MediaKeySystemAccess attributes, including the outcome vs. what was specified. -->
+            <li><p>If this object was created by a <a>MediaKeySystemAccess</a> object that was created with a <a def-id="option-stateful"></a> value of <a def-id="requirement-disallowed"></a> and <var title="true">sessionType</var> is not <a def-id="temporary-session"></a>, throw <a def-id="new-domexception-named"></a> <a def-id="NotSupportedError"></a>.</p></li>
+            <!-- TODO: Reference the CDM loaded during initialization instead of "<a def-id="cdm"></a> corresponding to the <a def-id="keySystem-attribute"></a> attribute", especially since it is now a member of MediaKeySystemAccess. Here and elsewhere. -->
             <li><p>If <var title="true">sessionType</var> is not supported by the <a def-id="cdm"></a> corresponding to the <a def-id="keySystem-attribute"></a> attribute, throw <a def-id="new-domexception-named"></a> <a def-id="NotSupportedError"></a>.</p></li>
             <li><p>Let <var title="true">session</var> be a new <a def-id="mediakeysession"></a> object, and initialize it as follows:</p>
               <ol>
@@ -351,34 +531,7 @@
           </ol>
         </dd>
   
-        <dt>static Promise&lt;MediaKeys&gt; create(DOMString keySystem)</dt>
-        <dd>
-          <p>Creates a new <a def-id="mediakeys"></a> object for <var title="true">keySystem</var>.</p>
-      
-          <ol class="method-algorithm">
-            <li><p>If <var title="true">keySystem</var> is an empty string, return a promise rejected with <a def-id="new-domexception-named"></a> <a def-id="InvalidAccessError"></a>.</p></li>
-            <li><p>If <var title="true">keySystem</var> is not one of the <a def-id="keysystems"></a> supported by the user agent, return a promise rejected with <a def-id="new-domexception-named"></a> <a def-id="NotSupportedError"></a>. String comparison is case-sensitive.</p></li>
-            <li><p>If <var title="true">keySystem</var> is not supported or not allowed in the <a def-id="origin"></a> of the calling context's <a def-id="document-concept"></a>, return a promise rejected with <a def-id="new-domexception-named"></a> <a def-id="NotSupportedError"></a>.</p></li>
-            <li><p>Let <var>promise</var> be a new promise.</p></li>
-            <li><p>Run the following steps asynchronously:</p>
-              <ol>
-                <li><p>Let <var title="true">cdm</var> be the <a def-id="cdm"></a> corresponding to <var title="true">keySystem</var>.</p></li>
-                <li><p>Load and initialize the <var title="true">cdm</var> if necessary.</p></li>
-                <li><p>If <var title="true">cdm</var> fails to load or initialize, reject <var>promise</var> with <a def-id="new-domexception-named"></a> <a def-id="appropriate-error-name"></a>.</p></li>
-      
-                <li>
-                  <p>Let <var title="true">media keys</var> be a new <a def-id="mediakeys"></a> object, and initialize it as follows:</p>
-                  <ol>
-                    <li><p>Set the <a def-id="keySystem-attribute"></a> attribute to <var title="true">keySystem</var>.</p></li>
-                  </ol>
-                </li>
-                <li><p>Resolve <var>promise</var> with <var title="true">media keys</var>.</p></li>
-              </ol>
-            </li>
-            <li><p>Return <var>promise</var>.</p></li>
-          </ol>
-        </dd>
-  
+  <!-- TODO: Move or remove depending on the outcome of Bug 25923.
         <dt>static IsTypeSupportedResult isTypeSupported(DOMstring keySystem, optional DOMString initDataType, optional DOMString contentType, optional DOMString capability)</dt>
         <dd>
           <p>Returns whether <var title="true">keySystem</var> is supported with the <var title="true">initDataType</var>, container and codec(s) specified by <var title="true">contentType</var>, and <var title="true">capability</var>.</p>
@@ -407,7 +560,7 @@
             <li><p>If the <var title="true">keySystem</var> implementation is not available and usable, return <a def-id="IsTypeSupportedResult-empty"></a> and abort these steps.</p></li>
             <li><p>Follow the steps for the first matching condition from the following list:</p>
               <dl class="switch">
-                <dt>If <var title="true">keySystem</var> is a value that may be successfully passed to <a def-id="mediakeys-create"></a></dt>
+                <dt>If <var title="true">keySystem</var> is a value that may be successfully passed to <a def-id="createMediaKeys"></a></dt>
                 <dd>Let <var title="true">probably result</var> be <a def-id="IsTypeSupportedResult-probably"></a>.</dd>
                 <dt>Otherwise</dt>
                 <dd>Let <var title="true">probably result</var> be <a def-id="IsTypeSupportedResult-maybe"></a>.
@@ -472,6 +625,7 @@
             </li>
           </ol>
         </dd>
+-->
       </dl>
 
     </section>
@@ -481,7 +635,7 @@
       <h2><a>MediaKeySession</a> Interface</h2>
       <p>The MediaKeySession object represents a <a href="#key-session">key session</a>.</p>
   
-      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
+      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes [[!WebIDL]] type mapping errors.</p>
       <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
   
       <dl title="interface MediaKeySession : EventTarget" class='idl'>
@@ -934,7 +1088,7 @@
       <section>
         <h3>Exceptions</h3>
         <p id="error-names">The methods report errors by rejecting the returned promise with a <a def-id="domexception"></a>.
-        The following <a def-id="domexception-names">DOMException names from WebIDL</a> are used in the algorithms.
+        The following <a def-id="domexception-names">DOMException names from WebIDL</a> [[!WebIDL]] are used in the algorithms.
         Causes specified specified in the algorithms are listed alongside each name, though these names MAY be used for other reasons as well.
         </p>
     
@@ -1014,7 +1168,7 @@
       <h2><a>HTMLMediaElement</a> Extensions</h2>
       <p>This section specifies additions to and modifications of the <a def-id="htmlmediaelement"></a> [[!HTML5]] when the Encrypted Media Extensions are supported.</p>
   
-      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
+      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes [[!WebIDL]] type mapping errors.</p>
       <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
   
       <dl title="enum MediaWaitingFor" class="idl">
@@ -1364,7 +1518,7 @@
           <ul>
             <li><p>The <a def-id="setMediaKeys"></a> method: Implementations MAY support associating the <a def-id="mediakeys"></a> object with more than one <a def-id="htmlmediaelement"></a>.</p></li>
             <li><p>The <a def-id="setServerCertificate"></a> method: Not supported.</p></li>
-            <li><p>The <a def-id="isTypeSupported"></a> method: There are no supported <var title="true">capability</var> values.</p></li>
+            <li><p>The <a>MediaKeySystemOptions</a>: There are no supported capability values.</p></li>
             <li><p>The <a def-id="persistent-session"></a> <a def-id="sessiontype"></a>: Implementations MAY support this type.</p></li>
           </ul>
         </section>
@@ -1654,28 +1808,32 @@
     var video = document.getElementById("video");
 
     if (!video.<a def-id="mediaKeys-attribute"></a>) {
-      var promise = <a def-id="mediakeys"></a>.<a def-id="mediakeys-create-call"></a>("org.w3.clearkey");
-      promise.catch(
-        console.error.bind(console, "Unable to create MediaKeys")
-      );
-      promise.then(
-        function(createdMediaKeys) {
-          return video.<a def-id="setMediaKeys-call"></a>(createdMediaKeys);
+      navigator.<a def-id="requestMediaKeySystemAccess-call"></a>("org.w3.clearkey").then(
+        function(keySystemAccess) {
+          var promise =  keySystemAccess.<a def-id="createMediaKeys-call"></a>();
+          promise.catch(
+            console.error.bind(console, "Unable to create MediaKeys")
+          );
+          promise.then(
+            function(createdMediaKeys) {
+              return video.<a def-id="setMediaKeys-call"></a>(createdMediaKeys);
+            }
+          ).catch(
+            console.error.bind(console, "Unable to set MediaKeys")
+          );
+          promise.then(
+            function(createdMediaKeys) {
+              var initData = new Uint8Array([ ... ]);
+              var keySession = createdMediaKeys.<a def-id="createSession-call"></a>();
+              keySession.addEventListener("<a def-id="message"></a>", handleMessage, false);
+              return keySession.<a def-id="generateRequest-call"></a>("webm", initData);
+            }
+          ).catch(
+            console.error.bind(console, "Unable to create or initialize key session")
+          );
         }
-      ).catch(
-        console.error.bind(console, "Unable to set MediaKeys")
-      );
-      promise.then(
-        function(createdMediaKeys) {
-          var initData = new Uint8Array([ ... ]);
-          var keySession = createdMediaKeys.<a def-id="createSession-call"></a>();
-          keySession.addEventListener("<a def-id="message"></a>", handleMessage, false);
-          return keySession.<a def-id="generateRequest-call"></a>("webm", initData);
-        }
-      ).catch(
-        console.error.bind(console, "Unable to create or initialize key session")
-      );
-    }
+      }
+    );
   }
 
   function handleMessage(event) {
@@ -1696,7 +1854,7 @@
   
       <section id="example-selecting-key-system">
         <h3>Selecting a Supported Key System and Using Initialization Data from the "encrypted" Event</h3>
-        <p class="exampledescription">This example selects a supported <a def-id="keysystem"></a> using the <a def-id="isTypeSupported"></a> method then uses
+        <p class="exampledescription">This example selects a supported <a def-id="keysystem"></a> using the <a def-id="requestMediaKeySystemAccess"></a> method then uses
         the <a def-id="initialization-data"></a> from the <a def-id="media-data"></a> to generate the license request and send it to the appropriate license server.
         One of the supported key systems uses a serverCertificate, which is provided proactively.
         </p>
@@ -1707,42 +1865,67 @@
   var licenseUrl;
   var serverCertificate;
 
+  // TODO: The structure of the original example makes this overly complex. Fix this.
   function selectKeySystem() {
-    if (<a def-id="mediakeys"></a>.<a def-id="isTypeSupported-call"></a>("com.example.somesystem", "webm", "video/webm; codecs='vp8, vorbis'")) {
-      licenseUrl = "https://license.example.com/getkey"; // OR "https://example.&lt;My Video Site domain&gt;"
-      keySystem = "com.example.somesystem";
-      serverCertificate = new Uint8Array([ ... ]);
-    } else if (<a def-id="mediakeys"></a>.<a def-id="isTypeSupported-call"></a>("com.foobar", "webm", "video/webm; codecs='vp8, vorbis'")) {
-      licenseUrl = "https://license.foobar.com/request";
-      keySystem = "com.foobar";
-    } else {
-      throw "Key System not supported";
-    }
+    someSystemOptions = [
+     { <a def-id="option-videoType"></a>: "webm",
+       <a def-id="option-videoType"></a>: "video/webm; codecs='vp8, vorbis'"
+     }
+    ];
+    fooOptions = [
+     { <a def-id="option-initDataType"></a>: "webm",
+       <a def-id="option-videoType"></a>: "video/webm; codecs='vp8, vorbis'"
+     }
+    ];
+  
+    navigator.<a def-id="requestMediaKeySystemAccess-call"></a>("com.example.somesystem", someSystemOptions).then(
+      function(keySystemAccess) {
+        licenseUrl = "https://license.example.com/getkey"; // OR "https://example.&lt;My Video Site domain&gt;"
+        keySystem = "com.example.somesystem";
+        serverCertificate = new Uint8Array([ ... ]);
+        promise = new Promise();
+        promise.resolve(keySystemAccess); 
+        return promise;
+      }
+    ).catch(
+      function(error) {
+        // Try the next key system.
+        navigator.<a def-id="requestMediaKeySystemAccess-call"></a>("com.foobar", fooOptions).then(
+          function(keySystemAccess) {
+          licenseUrl = "https://license.foobar.com/request";
+          keySystem = "com.foobar";
+          promise = new Promise();
+          promise.resolve(keySystemAccess); 
+          return promise;
+    ); // Do not catch - let the caller handle the failure.
   }
 
   function handleInitData(event) {
     var video = event.target;
     if (video.mediaKeysObject === undefined) {
-      selectKeySystem();
       video.mediaKeysObject = null; // Prevent entering this path again.
-      video.pendingSessionData = []; // Will store all initData until the MediaKeys is ready.
-      <a def-id="mediakeys"></a>.<a def-id="mediakeys-create-call"></a>(keySystem).then(
-        function(createdMediaKeys) {
-          video.mediaKeysObject = createdMediaKeys;
-
-          if (serverCertificate)
-            createdMediaKeys.<a def-id="setServerCertificate-call"></a>(serverCertificate);
-
-          for (var i = 0; i &lt; video.pendingSessionData.length; i++) {
-            var data = video.pendingSessionData[i];
-            makeNewRequest(video.mediaKeysObject, data.initDataType, data.initData);
-          }
-          video.pendingSessionData = [];
-
-          return video.<a def-id="setMediaKeys-call"></a>(createdMediaKeys);
+      selectKeySystem().then(
+        function(keySystemAccess) {
+          video.pendingSessionData = []; // Will store all initData until the MediaKeys is ready.
+          keySystemAccess.<a def-id="createMediaKeys-call"></a>().then(
+            function(createdMediaKeys) {
+              video.mediaKeysObject = createdMediaKeys;
+    
+              if (serverCertificate)
+                createdMediaKeys.<a def-id="setServerCertificate-call"></a>(serverCertificate);
+    
+              for (var i = 0; i &lt; video.pendingSessionData.length; i++) {
+                var data = video.pendingSessionData[i];
+                makeNewRequest(video.mediaKeysObject, data.initDataType, data.initData);
+              }
+              video.pendingSessionData = [];
+    
+              return video.<a def-id="setMediaKeys-call"></a>(createdMediaKeys);
+            }
+          ).catch(
+            console.error.bind(console, "Unable to create or use new MediaKeys")
+          );
         }
-      ).catch(
-        console.error.bind(console, "Unable to create or use new MediaKeys")
       );
     }
     addSession(video, event.<a def-id="encrypted-event-initdatatype-attribute"></a>, event.<a def-id="encrypted-event-initdata-attribute"></a>);
@@ -1809,18 +1992,23 @@
     makeNewRequest(mediaKeys, event.<a def-id="encrypted-event-initdatatype-attribute"></a>, event.<a def-id="encrypted-event-initdata-attribute"></a>);
   }
 
-  selectKeySystem();
-  <a def-id="mediakeys"></a>.<a def-id="mediakeys-create-call"></a>(keySystem).then(
-    function(createdMediaKeys) {
-      mediaKeys = createdMediaKeys;
-      var video = document.getElementById("v");
-      video.src = "foo.webm";
-      if (serverCertificate)
-        mediaKeys.<a def-id="setServerCertificate-call"></a>(serverCertificate);
-      return video.<a def-id="setMediaKeys-call"></a>(mediaKeys);
+  selectKeySystem().then(
+    function(keySystemAccess) {
+      <a def-id="mediakeys"></a>.<a def-id="createMediaKeys-call"></a>(keySystem).then(
+        function(createdMediaKeys) {
+          mediaKeys = createdMediaKeys;
+          var video = document.getElementById("v");
+          video.src = "foo.webm";
+          if (serverCertificate)
+            mediaKeys.<a def-id="setServerCertificate-call"></a>(serverCertificate);
+          return video.<a def-id="setMediaKeys-call"></a>(mediaKeys);
+        }
+      ).catch(
+        console.error.bind(console, "Unable to create or initialize key session")
+      );
     }
   ).catch(
-    console.error.bind(console, "Unable to create or initialize key session")
+    console.error.bind(console, "No supported key systems supporting the required combinations")
   );
 &lt;/script&gt;
 
@@ -1901,18 +2089,23 @@
     //  -->and do some bookkeeping with event.target.<a def-id="sessionId"></a> if necessary.
   }
 
-  selectKeySystem();
-  <a def-id="mediakeys"></a>.<a def-id="mediakeys-create-call"></a>(keySystem).then(
-    function(createdMediaKeys) {
-      mediaKeys = createdMediaKeys;
-      var video = document.getElementById("v");
-      video.src = "foo.webm";
-      if (serverCertificate)
-        mediaKeys.<a def-id="setServerCertificate-call"></a>(serverCertificate);
-      return video.<a def-id="setMediaKeys-call"></a>(mediaKeys);
+  selectKeySystem().then(
+    function(keySystemAccess) {
+      <a def-id="mediakeys"></a>.<a def-id="createMediaKeys-call"></a>(keySystem).then(
+        function(createdMediaKeys) {
+          mediaKeys = createdMediaKeys;
+          var video = document.getElementById("v");
+          video.src = "foo.webm";
+          if (serverCertificate)
+            mediaKeys.<a def-id="setServerCertificate-call"></a>(serverCertificate);
+          return video.<a def-id="setMediaKeys-call"></a>(mediaKeys);
+        }
+      ).catch(
+        console.error.bind(console, "Unable to create or use new MediaKeys")
+      );
     }
   ).catch(
-    console.error.bind(console, "Unable to create or use new MediaKeys")
+    console.error.bind(console, "No supported key systems supporting the required combinations")
   );
 &lt;/script&gt;
 
@@ -2007,17 +2200,22 @@
     );
   }
 
-  selectKeySystem();
-  <a def-id="mediakeys"></a>.<a def-id="mediakeys-create-call"></a>(keySystem).then(
-    function(createdMediaKeys) {
-      mediaKeys = createdMediaKeys;
-      var video = document.getElementById("v");
-      if (serverCertificate)
-        mediaKeys.<a def-id="setServerCertificate-call"></a>(serverCertificate);
-      return video.<a def-id="setMediaKeys-call"></a>(mediaKeys);
+  selectKeySystem().then(
+    function(keySystemAccess) {
+      <a def-id="mediakeys"></a>.<a def-id="createMediaKeys-call"></a>(keySystem).then(
+        function(createdMediaKeys) {
+          mediaKeys = createdMediaKeys;
+          var video = document.getElementById("v");
+          if (serverCertificate)
+            mediaKeys.<a def-id="setServerCertificate-call"></a>(serverCertificate);
+          return video.<a def-id="setMediaKeys-call"></a>(mediaKeys);
+        }
+      ).catch(
+        console.error.bind(console, "Unable to create or use new MediaKeys")
+      );
     }
   ).catch(
-    console.error.bind(console, "Unable to create or use new MediaKeys")
+    console.error.bind(console, "No supported key systems supporting the required combinations")
   );
 &lt;/script&gt;
 
--- a/encrypted-media/encrypted-media.html	Mon Oct 13 12:14:02 2014 -0700
+++ b/encrypted-media/encrypted-media.html	Mon Oct 13 16:23:29 2014 -0700
@@ -445,7 +445,7 @@
   </p>
   <h1 class="title p-name" id="title" property="dcterms:title">Encrypted Media Extensions</h1>
   
-  <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-10-13T19:13:29.000Z" id="w3c-editor-s-draft-13-october-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2014-10-13">13 October 2014</time></h2>
+  <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-10-13T23:22:27.000Z" id="w3c-editor-s-draft-13-october-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2014-10-13">13 October 2014</time></h2>
   <dl>
     
       <dt>This version:</dt>
@@ -597,7 +597,7 @@
       
     
   
-</section><section id="toc"><h2 class="introductory" role="heading" id="h2_toc">Table of Contents</h2><ul class="toc" role="directory" id="respecContents"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#definitions" class="tocxref"><span class="secno">1.1 </span>Definitions</a></li></ul></li><li class="tocline"><a href="#mediakeys-interface" class="tocxref"><span class="secno">2. </span><span class="formerLink"><code>MediaKeys</code></span> Interface</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">2.1 </span>Attributes</a></li><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">2.2 </span>Methods</a></li></ul></li><li class="tocline"><a href="#mediakeysession-interface" class="tocxref"><span class="secno">3. </span><span class="formerLink"><code>MediaKeySession</code></span> Interface</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">3.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">3.2 </span>Methods</a></li><li class="tocline"><a href="#mediakeymessageevent" class="tocxref"><span class="secno">3.3 </span><span class="formerLink"><code>MediaKeyMessageEvent</code></span></a><ul class="toc"><li class="tocline"><a href="#constructors" class="tocxref"><span class="secno">3.3.1 </span>Constructors</a></li><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno">3.3.2 </span>Attributes</a></li><li class="tocline"><a href="#mediakeymessageeventinit" class="tocxref"><span class="secno">3.3.3 </span><span class="formerLink"><code>MediaKeyMessageEventInit</code></span></a><ul class="toc"><li class="tocline"><a href="#dictionary-mediakeymessageeventinit-members" class="tocxref"><span class="secno">3.3.3.1 </span>Dictionary <span class="formerLink"><code>MediaKeyMessageEventInit</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a href="#mediakeysession-events" class="tocxref"><span class="secno">3.4 </span>Event Summary</a></li><li class="tocline"><a href="#mediakeysession-algorithms" class="tocxref"><span class="secno">3.5 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#algorithms-queue-message" class="tocxref"><span class="secno">3.5.1 </span>Queue a "message" Event</a></li><li class="tocline"><a href="#algorithms-keys-changed" class="tocxref"><span class="secno">3.5.2 </span>Usable Keys Changed</a></li><li class="tocline"><a href="#algorithms-update-expiration" class="tocxref"><span class="secno">3.5.3 </span>Update Expiration</a></li><li class="tocline"><a href="#algorithms-session-close" class="tocxref"><span class="secno">3.5.4 </span>Session Close</a></li></ul></li><li class="tocline"><a href="#exceptions" class="tocxref"><span class="secno">3.6 </span>Exceptions</a></li><li class="tocline"><a href="#session-storage" class="tocxref"><span class="secno">3.7 </span>Session Storage and Persistence</a></li></ul></li><li class="tocline"><a href="#htmlmediaelement-extensions" class="tocxref"><span class="secno">4. </span><span class="formerLink"><code>HTMLMediaElement</code></span> Extensions</a><ul class="toc"><li class="tocline"><a href="#attributes-3" class="tocxref"><span class="secno">4.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">4.2 </span>Methods</a></li><li class="tocline"><a href="#mediaencryptedevent" class="tocxref"><span class="secno">4.3 </span><span class="formerLink"><code>MediaEncryptedEvent</code></span></a><ul class="toc"><li class="tocline"><a href="#constructors-1" class="tocxref"><span class="secno">4.3.1 </span>Constructors</a></li><li class="tocline"><a href="#attributes-4" class="tocxref"><span class="secno">4.3.2 </span>Attributes</a></li><li class="tocline"><a href="#mediaencryptedeventinit" class="tocxref"><span class="secno">4.3.3 </span><span class="formerLink"><code>MediaEncryptedEventInit</code></span></a><ul class="toc"><li class="tocline"><a href="#dictionary-mediaencryptedeventinit-members" class="tocxref"><span class="secno">4.3.3.1 </span>Dictionary <span class="formerLink"><code>MediaEncryptedEventInit</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a href="#htmlmediaelement-events" class="tocxref"><span class="secno">4.4 </span>Event Summary</a></li><li class="tocline"><a href="#htmlmediaelement-algorithms" class="tocxref"><span class="secno">4.5 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#algorithms-initdata-encountered" class="tocxref"><span class="secno">4.5.1 </span>Initialization Data Encountered</a></li><li class="tocline"><a href="#algorithms-encrypted-block" class="tocxref"><span class="secno">4.5.2 </span>Encrypted Block Encountered</a></li><li class="tocline"><a href="#algorithms-queue-waiting" class="tocxref"><span class="secno">4.5.3 </span>Queue a "waiting" Event</a></li><li class="tocline"><a href="#algorithms-resume-playback" class="tocxref"><span class="secno">4.5.4 </span>Attempt to Resume Playback If Necessary</a></li><li class="tocline"><a href="#htmlmediaelement-playing-the-media-resource" class="tocxref"><span class="secno">4.5.5 </span>Playing the Media Resource Algorithm Modifications</a></li></ul></li><li class="tocline"><a href="#media-element-restictions" class="tocxref"><span class="secno">4.6 </span>Media Element Restrictions</a></li></ul></li><li class="tocline"><a href="#common-key-systems" class="tocxref"><span class="secno">5. </span>Common Key Systems</a><ul class="toc"><li class="tocline"><a href="#clear-key" class="tocxref"><span class="secno">5.1 </span>Clear Key</a><ul class="toc"><li class="tocline"><a href="#clear-key-capabilities" class="tocxref"><span class="secno">5.1.1 </span>Capabilities</a></li><li class="tocline"><a href="#clear-key-behavior" class="tocxref"><span class="secno">5.1.2 </span>Behavior</a></li><li class="tocline"><a href="#clear-key-request-format" class="tocxref"><span class="secno">5.1.3 </span>License Request Format</a><ul class="toc"><li class="tocline"><a href="#clear-key-request-format-example" class="tocxref"><span class="secno">5.1.3.1 </span>Example</a></li></ul></li><li class="tocline"><a href="#clear-key-license-format" class="tocxref"><span class="secno">5.1.4 </span>License Format</a><ul class="toc"><li class="tocline"><a href="#clear-key-license-format-example" class="tocxref"><span class="secno">5.1.4.1 </span>Example</a></li></ul></li><li class="tocline"><a href="#using-base64url" class="tocxref"><span class="secno">5.1.5 </span>Using base64url</a></li></ul></li></ul></li><li class="tocline"><a href="#security" class="tocxref"><span class="secno">6. </span>Security Considerations</a></li><li class="tocline"><a href="#privacy" class="tocxref"><span class="secno">7. </span>Privacy Considerations</a><ul class="toc"><li class="tocline"><a href="#privacy-disclosure" class="tocxref"><span class="secno">7.1 </span>Information Disclosed by EME and Key Systems</a></li><li class="tocline"><a href="#privacy-fingerprinting" class="tocxref"><span class="secno">7.2 </span>Fingerprinting</a></li><li class="tocline"><a href="#privacy-leakage" class="tocxref"><span class="secno">7.3 </span>Information Leakage</a></li><li class="tocline"><a href="#privacy-tracking" class="tocxref"><span class="secno">7.4 </span>Tracking</a></li><li class="tocline"><a href="#privacy-storedinfo" class="tocxref"><span class="secno">7.5 </span>Information Stored on User Devices</a></li><li class="tocline"><a href="#privacy-secureorigin" class="tocxref"><span class="secno">7.6 </span>Use Secure Origin and Transport</a></li></ul></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">8. </span>Examples</a><ul class="toc"><li class="tocline"><a href="#example-source-and-key-known" class="tocxref"><span class="secno">8.1 </span>Source and Key Known at Page Load (Clear Key)</a></li><li class="tocline"><a href="#example-selecting-key-system" class="tocxref"><span class="secno">8.2 </span>Selecting a Supported Key System and Using Initialization Data from the "encrypted" Event</a></li><li class="tocline"><a href="#example-mediakeys-before-source" class="tocxref"><span class="secno">8.3 </span>Create MediaKeys Before Loading Media</a></li><li class="tocline"><a href="#example-using-all-events" class="tocxref"><span class="secno">8.4 </span>Using All Events</a></li><li class="tocline"><a href="#example-stored-license" class="tocxref"><span class="secno">8.5 </span>Stored License</a></li></ul></li><li class="tocline"><a href="#revision-history" class="tocxref"><span class="secno">9. </span>Revision History</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">A. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">A.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">A.2 </span>Informative references</a></li></ul></li></ul></section>
+</section><section id="toc"><h2 class="introductory" role="heading" id="h2_toc">Table of Contents</h2><ul class="toc" role="directory" id="respecContents"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#definitions" class="tocxref"><span class="secno">1.1 </span>Definitions</a></li></ul></li><li class="tocline"><a href="#obtaining-access-to-key-systems" class="tocxref"><span class="secno">2. </span>Obtaining Access to Key Systems</a><ul class="toc"><li class="tocline"><a href="#requestmediakeysystemaccess" class="tocxref"><span class="secno">2.1 </span>requestMediaKeySystemAccess()</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">2.1.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#mediakeysystemoptions-dictionary" class="tocxref"><span class="secno">2.2 </span><span class="formerLink"><code>MediaKeySystemOptions</code></span> dictionary</a><ul class="toc"><li class="tocline"><a href="#dictionary-mediakeysystemoptions-members" class="tocxref"><span class="secno">2.2.1 </span>Dictionary <span class="formerLink"><code>MediaKeySystemOptions</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a href="#mediakeysystemaccess-interface" class="tocxref"><span class="secno">3. </span><span class="formerLink"><code>MediaKeySystemAccess</code></span> Interface</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">3.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">3.2 </span>Methods</a></li></ul></li><li class="tocline"><a href="#mediakeys-interface" class="tocxref"><span class="secno">4. </span><span class="formerLink"><code>MediaKeys</code></span> Interface</a><ul class="toc"><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">4.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#mediakeysession-interface" class="tocxref"><span class="secno">5. </span><span class="formerLink"><code>MediaKeySession</code></span> Interface</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">5.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-3" class="tocxref"><span class="secno">5.2 </span>Methods</a></li><li class="tocline"><a href="#mediakeymessageevent" class="tocxref"><span class="secno">5.3 </span><span class="formerLink"><code>MediaKeyMessageEvent</code></span></a><ul class="toc"><li class="tocline"><a href="#constructors" class="tocxref"><span class="secno">5.3.1 </span>Constructors</a></li><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno">5.3.2 </span>Attributes</a></li><li class="tocline"><a href="#mediakeymessageeventinit" class="tocxref"><span class="secno">5.3.3 </span><span class="formerLink"><code>MediaKeyMessageEventInit</code></span></a><ul class="toc"><li class="tocline"><a href="#dictionary-mediakeymessageeventinit-members" class="tocxref"><span class="secno">5.3.3.1 </span>Dictionary <span class="formerLink"><code>MediaKeyMessageEventInit</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a href="#mediakeysession-events" class="tocxref"><span class="secno">5.4 </span>Event Summary</a></li><li class="tocline"><a href="#mediakeysession-algorithms" class="tocxref"><span class="secno">5.5 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#algorithms-queue-message" class="tocxref"><span class="secno">5.5.1 </span>Queue a "message" Event</a></li><li class="tocline"><a href="#algorithms-keys-changed" class="tocxref"><span class="secno">5.5.2 </span>Usable Keys Changed</a></li><li class="tocline"><a href="#algorithms-update-expiration" class="tocxref"><span class="secno">5.5.3 </span>Update Expiration</a></li><li class="tocline"><a href="#algorithms-session-close" class="tocxref"><span class="secno">5.5.4 </span>Session Close</a></li></ul></li><li class="tocline"><a href="#exceptions" class="tocxref"><span class="secno">5.6 </span>Exceptions</a></li><li class="tocline"><a href="#session-storage" class="tocxref"><span class="secno">5.7 </span>Session Storage and Persistence</a></li></ul></li><li class="tocline"><a href="#htmlmediaelement-extensions" class="tocxref"><span class="secno">6. </span><span class="formerLink"><code>HTMLMediaElement</code></span> Extensions</a><ul class="toc"><li class="tocline"><a href="#attributes-3" class="tocxref"><span class="secno">6.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-4" class="tocxref"><span class="secno">6.2 </span>Methods</a></li><li class="tocline"><a href="#mediaencryptedevent" class="tocxref"><span class="secno">6.3 </span><span class="formerLink"><code>MediaEncryptedEvent</code></span></a><ul class="toc"><li class="tocline"><a href="#constructors-1" class="tocxref"><span class="secno">6.3.1 </span>Constructors</a></li><li class="tocline"><a href="#attributes-4" class="tocxref"><span class="secno">6.3.2 </span>Attributes</a></li><li class="tocline"><a href="#mediaencryptedeventinit" class="tocxref"><span class="secno">6.3.3 </span><span class="formerLink"><code>MediaEncryptedEventInit</code></span></a><ul class="toc"><li class="tocline"><a href="#dictionary-mediaencryptedeventinit-members" class="tocxref"><span class="secno">6.3.3.1 </span>Dictionary <span class="formerLink"><code>MediaEncryptedEventInit</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a href="#htmlmediaelement-events" class="tocxref"><span class="secno">6.4 </span>Event Summary</a></li><li class="tocline"><a href="#htmlmediaelement-algorithms" class="tocxref"><span class="secno">6.5 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#algorithms-initdata-encountered" class="tocxref"><span class="secno">6.5.1 </span>Initialization Data Encountered</a></li><li class="tocline"><a href="#algorithms-encrypted-block" class="tocxref"><span class="secno">6.5.2 </span>Encrypted Block Encountered</a></li><li class="tocline"><a href="#algorithms-queue-waiting" class="tocxref"><span class="secno">6.5.3 </span>Queue a "waiting" Event</a></li><li class="tocline"><a href="#algorithms-resume-playback" class="tocxref"><span class="secno">6.5.4 </span>Attempt to Resume Playback If Necessary</a></li><li class="tocline"><a href="#htmlmediaelement-playing-the-media-resource" class="tocxref"><span class="secno">6.5.5 </span>Playing the Media Resource Algorithm Modifications</a></li></ul></li><li class="tocline"><a href="#media-element-restictions" class="tocxref"><span class="secno">6.6 </span>Media Element Restrictions</a></li></ul></li><li class="tocline"><a href="#common-key-systems" class="tocxref"><span class="secno">7. </span>Common Key Systems</a><ul class="toc"><li class="tocline"><a href="#clear-key" class="tocxref"><span class="secno">7.1 </span>Clear Key</a><ul class="toc"><li class="tocline"><a href="#clear-key-capabilities" class="tocxref"><span class="secno">7.1.1 </span>Capabilities</a></li><li class="tocline"><a href="#clear-key-behavior" class="tocxref"><span class="secno">7.1.2 </span>Behavior</a></li><li class="tocline"><a href="#clear-key-request-format" class="tocxref"><span class="secno">7.1.3 </span>License Request Format</a><ul class="toc"><li class="tocline"><a href="#clear-key-request-format-example" class="tocxref"><span class="secno">7.1.3.1 </span>Example</a></li></ul></li><li class="tocline"><a href="#clear-key-license-format" class="tocxref"><span class="secno">7.1.4 </span>License Format</a><ul class="toc"><li class="tocline"><a href="#clear-key-license-format-example" class="tocxref"><span class="secno">7.1.4.1 </span>Example</a></li></ul></li><li class="tocline"><a href="#using-base64url" class="tocxref"><span class="secno">7.1.5 </span>Using base64url</a></li></ul></li></ul></li><li class="tocline"><a href="#security" class="tocxref"><span class="secno">8. </span>Security Considerations</a></li><li class="tocline"><a href="#privacy" class="tocxref"><span class="secno">9. </span>Privacy Considerations</a><ul class="toc"><li class="tocline"><a href="#privacy-disclosure" class="tocxref"><span class="secno">9.1 </span>Information Disclosed by EME and Key Systems</a></li><li class="tocline"><a href="#privacy-fingerprinting" class="tocxref"><span class="secno">9.2 </span>Fingerprinting</a></li><li class="tocline"><a href="#privacy-leakage" class="tocxref"><span class="secno">9.3 </span>Information Leakage</a></li><li class="tocline"><a href="#privacy-tracking" class="tocxref"><span class="secno">9.4 </span>Tracking</a></li><li class="tocline"><a href="#privacy-storedinfo" class="tocxref"><span class="secno">9.5 </span>Information Stored on User Devices</a></li><li class="tocline"><a href="#privacy-secureorigin" class="tocxref"><span class="secno">9.6 </span>Use Secure Origin and Transport</a></li></ul></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">10. </span>Examples</a><ul class="toc"><li class="tocline"><a href="#example-source-and-key-known" class="tocxref"><span class="secno">10.1 </span>Source and Key Known at Page Load (Clear Key)</a></li><li class="tocline"><a href="#example-selecting-key-system" class="tocxref"><span class="secno">10.2 </span>Selecting a Supported Key System and Using Initialization Data from the "encrypted" Event</a></li><li class="tocline"><a href="#example-mediakeys-before-source" class="tocxref"><span class="secno">10.3 </span>Create MediaKeys Before Loading Media</a></li><li class="tocline"><a href="#example-using-all-events" class="tocxref"><span class="secno">10.4 </span>Using All Events</a></li><li class="tocline"><a href="#example-stored-license" class="tocxref"><span class="secno">10.5 </span>Stored License</a></li></ul></li><li class="tocline"><a href="#revision-history" class="tocxref"><span class="secno">11. </span>Revision History</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">A. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">A.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">A.2 </span>Informative references</a></li></ul></li></ul></section>
  
  
     
@@ -744,26 +744,194 @@
     </section>
 
 
+    <section id="obtaining-access-to-key-systems">
+      <!--OddPage--><h2 role="heading" id="h2_obtaining-access-to-key-systems"><span class="secno">2. </span>Obtaining Access to Key Systems</h2>
+
+      <section typeof="bibo:Chapter" resource="#requestMediaKeySystemAccess" rel="bibo:Chapter" id="requestmediakeysystemaccess">
+        <h3 id="requestMediaKeySystemAccess" role="heading"><span class="secno">2.1 </span>requestMediaKeySystemAccess()</h3>
+
+        <pre class="idl"><span class="idlInterface" id="idl-def-Navigator">partial interface <span class="idlInterfaceID">Navigator</span> {
+<span class="idlMethod">    <span class="idlMethType">Promise&lt;<a href="#idl-def-MediaKeySystemAccess" class="idlType"><code>MediaKeySystemAccess</code></a>&gt;</span> <span class="idlMethName"><a href="#widl-Navigator-requestMediaKeySystemAccess-Promise-MediaKeySystemAccess--DOMString-keySystem-Sequence-MediaKeySystemOptions--supportedConfigurations">requestMediaKeySystemAccess</a></span> (<span class="idlParam"><span class="idlParamType">DOMString</span> <span class="idlParamName">keySystem</span></span>, <span class="idlParam">optional <span class="idlParamType">Sequence<mediakeysystemoptions></mediakeysystemoptions></span> <span class="idlParamName">supportedConfigurations</span></span>);</span>
+};</span></pre><section id="methods"><h4 role="heading" id="h4_methods"><span class="secno">2.1.1 </span>Methods</h4><dl class="methods"><dt id="widl-Navigator-requestMediaKeySystemAccess-Promise-MediaKeySystemAccess--DOMString-keySystem-Sequence-MediaKeySystemOptions--supportedConfigurations"><code>requestMediaKeySystemAccess</code></dt><dd>
+            <p>Requests access to the specified <a href="#key-system">Key System</a>.
+              When <code>supportedConfigurations</code> is specified, the combination specified by at least one of its elements must be supported.
+              The resulting <a href="#idl-def-MediaKeySystemAccess" class="idlType"><code>MediaKeySystemAccess</code></a> will correspond to the first such elment.
+            </p>
+            <p>Any permission checks or user interaction, such as a prompt, <em class="rfc2119" title="SHOULD">SHOULD</em> be performed before resolving the promise.</p>
+            <p>If the <code>keySystem</code> is not supported or not allowed (in one at least one of the <code>supportedConfigurations</code>, if specified), the promise is rejected.
+              Otherwise, it is resolved with a new MediaKeySystemAccess object.
+            </p>
+
+            
+
+            
+          <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">keySystem</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc">
+                The <a href="#key-system">Key System</a> for which access is being requested.
+              </td></tr><tr><td class="prmName">supportedConfigurations</td><td class="prmType"><code>Sequence<mediakeysystemoptions></mediakeysystemoptions></code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptTrue"><span role="img" aria-label="True">✔</span></td><td class="prmDesc">
+                A Sequence of <a href="#idl-def-MediaKeySystemOptions" class="idlType"><code>MediaKeySystemOptions</code></a> configurations to try in order.
+                The first element with a satisfiable combination will be used. 
+              </td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;<a href="#idl-def-MediaKeySystemAccess" class="idlType"><code>MediaKeySystemAccess</code></a>&gt;</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+              <li><p>If <var title="true">keySystem</var> is an empty string, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
+              <li><p>If <var title="true">supportedConfigurations</var> was provided and is empty, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
+              <li><p>If <var title="true">keySystem</var> is not one of the <a href="#key-system">Key Systems</a> supported by the user agent, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>. String comparison is case-sensitive.</p></li>
+              <li><p>Let <var>promise</var> be a new promise.</p></li>
+              <li><p>Run the following steps asynchronously:</p>
+                <ol>
+                  <li><p>If <var title="true">keySystem</var> is not supported or not allowed in the <a href="http://www.w3.org/TR/html5/browsers.html#origin-0">origin</a> of the calling context's <a href="http://dom.spec.whatwg.org/#concept-document">Document</a>, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p>
+                    <div class="issue"><div class="issue-title" aria-level="3" role="heading" id="h_issue_1"><span>Issue 1</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25923">Bug 25923</a> - It is TBD whether rejecting the promise is the correct behavior or whether the promise should instead be resolved with <code>null</code>.</p></div>
+                  </li>
+                  <li><p>If <code>supportedConfigurations</code> was not provided, resolve the promise with a new <a href="#idl-def-MediaKeySystemAccess" class="idlType"><code>MediaKeySystemAccess</code></a> object, execute the following steps:</p>
+                    <ol>
+                      <li>
+                        <p>Let <var title="true">access</var> be a new <a href="#idl-def-MediaKeySystemAccess" class="idlType"><code>MediaKeySystemAccess</code></a> object, and initialize it as follows:</p>
+                        <ol>
+                          <li><p>Set the <code><a href="#widl-MediaKeySystemAccess-keySystem">keySystem</a></code> attribute to <var title="true">keySystem</var>.</p></li>
+                        </ol>
+                      </li>
+                      <li><p>Resolve <var>promise</var> with <var title="true">access</var> and abort these steps.</p></li>
+                    </ol>
+                  </li>
+                  <li>
+                    <p>For each element of <code>supportedConfigurations</code>:</p>
+                    <ol>
+                      <li><p>Let <var>combination</var> be the element.</p></li>
+                      <li>
+                        <p>For each dictionary member in <var>combination</var>:</p>
+                        <ol>
+                          <li><p>If the member’s value cannot be satisfied together in combination with the previous members, continue to the next iteration of the loop.</p></li>
+                        </ol>
+                        <div class="note"><div class="note-title" aria-level="3" role="heading" id="h_note_7"><span>Note</span></div><p class="">Unrecognized dictionary members are ignored per [<cite><a class="bibref" href="#bib-WebIDL">WebIDL</a></cite>], and will never reach this algorith. Thus, they cannot be considered as part of the combination.</p></div>
+                        </li><li>
+                          <p>If <var title="true">keySystem</var> is supported and allowed in the <a href="http://www.w3.org/TR/html5/browsers.html#origin-0">origin</a> of the calling context's <a href="http://dom.spec.whatwg.org/#concept-document">Document</a> in the configuration specified by the combination of the values in <var>combination</var>, execute the following steps:</p>
+                          <ol>
+                            <li>
+                              <p>Let <var title="true">access</var> be a new <a href="#idl-def-MediaKeySystemAccess" class="idlType"><code>MediaKeySystemAccess</code></a> object, and initialize it as follows:</p>
+                              <ol>
+                                <li><p>Set the <code><a href="#widl-MediaKeySystemAccess-keySystem">keySystem</a></code> attribute to <var title="true">keySystem</var>.</p></li>
+                                <!-- TODO: Initialize the object further if necessary. -->
+                              </ol>
+                            </li>
+                            <li><p>Resolve <var>promise</var> with <var title="true">access</var> and abort these steps.</p></li>
+                          </ol>
+                        </li>
+                      
+                    </ol>
+                  </li>
+                  <li><p>Reject <var>promise</var> with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p> 
+                    <div class="note"><div class="note-title" aria-level="3" role="heading" id="h_note_8"><span>Note</span></div><p class="">There were no supported combinations in <code>supportedConfigurations</code>.</p></div>
+                  </li>
+                </ol>
+              </li>
+              <li><p>Return <var>promise</var>.</p></li>
+            </ol></dd></dl></section>
+      </section>
+
+      <section id="mediakeysystemoptions-dictionary">
+        <h3 role="heading" id="h3_mediakeysystemoptions-dictionary"><span class="secno">2.2 </span><a href="#idl-def-MediaKeySystemOptions" class="idlType"><code>MediaKeySystemOptions</code></a> dictionary</h3>
+  
+        <pre class="idl"><span class="idlEnum" id="idl-def-MediaKeysRequirement">enum <span class="idlEnumID">MediaKeysRequirement</span> {
+    "<a href="#idl-def-MediaKeysRequirement.required" class="idlEnumItem">required</a>",
+    "<a href="#idl-def-MediaKeysRequirement.optional" class="idlEnumItem">optional</a>",
+    "<a href="#idl-def-MediaKeysRequirement.disallowed" class="idlEnumItem">disallowed</a>"
+};</span></pre><table class="simple"><tbody><tr><th colspan="2">Enumeration description</th></tr><tr><td><code id="idl-def-MediaKeysRequirement.required">required</code></td><td>
+            The returned object <em class="rfc2119" title="MUST">MUST</em> support this feature.
+          </td></tr><tr><td><code id="idl-def-MediaKeysRequirement.optional">optional</code></td><td>
+            The returned object <em class="rfc2119" title="MAY">MAY</em> support this feature.
+          </td></tr><tr><td><code id="idl-def-MediaKeysRequirement.disallowed">disallowed</code></td><td>
+            The returned object <em class="rfc2119" title="MUST NOT">MUST NOT</em> support this feature.
+          </td></tr></tbody></table>
+
+        <pre class="idl"><span class="idlDictionary" id="idl-def-MediaKeySystemOptions">dictionary <span class="idlDictionaryID">MediaKeySystemOptions</span> {
+<span class="idlMember">    <span class="idlMemberType">DOMString</span>            <span class="idlMemberName"><a href="#widl-MediaKeySystemOptions-initDataType">initDataType</a></span> = <span class="idlMemberValue">""</span>;</span>
+<span class="idlMember">    <span class="idlMemberType">DOMString</span>            <span class="idlMemberName"><a href="#widl-MediaKeySystemOptions-audioType">audioType</a></span> = <span class="idlMemberValue">""</span>;</span>
+<span class="idlMember">    <span class="idlMemberType">DOMString</span>            <span class="idlMemberName"><a href="#widl-MediaKeySystemOptions-audioCapability">audioCapability</a></span> = <span class="idlMemberValue">""</span>;</span>
+<span class="idlMember">    <span class="idlMemberType">DOMString</span>            <span class="idlMemberName"><a href="#widl-MediaKeySystemOptions-videoType">videoType</a></span> = <span class="idlMemberValue">""</span>;</span>
+<span class="idlMember">    <span class="idlMemberType">DOMString</span>            <span class="idlMemberName"><a href="#widl-MediaKeySystemOptions-videoCapability">videoCapability</a></span> = <span class="idlMemberValue">""</span>;</span>
+<span class="idlMember">    <span class="idlMemberType"><a href="#idl-def-MediaKeysRequirement" class="idlType"><code>MediaKeysRequirement</code></a></span> <span class="idlMemberName"><a href="#widl-MediaKeySystemOptions-uniqueidentifier">uniqueidentifier</a></span> = <span class="idlMemberValue">"optional"</span>;</span>
+<span class="idlMember">    <span class="idlMemberType"><a href="#idl-def-MediaKeysRequirement" class="idlType"><code>MediaKeysRequirement</code></a></span> <span class="idlMemberName"><a href="#widl-MediaKeySystemOptions-stateful">stateful</a></span> = <span class="idlMemberValue">"optional"</span>;</span>
+};</span></pre><section id="dictionary-mediakeysystemoptions-members"><h4 role="heading" id="h4_dictionary-mediakeysystemoptions-members"><span class="secno">2.2.1 </span>Dictionary <a class="idlType" href="#idl-def-MediaKeySystemOptions"><code>MediaKeySystemOptions</code></a> Members</h4><dl class="dictionary-members"><dt id="widl-MediaKeySystemOptions-audioCapability"><code>audioCapability</code> of type <span class="idlMemberType">DOMString</span>, defaulting to <code>""</code></dt><dd>
+            The required audio capability.
+          </dd><dt id="widl-MediaKeySystemOptions-audioType"><code>audioType</code> of type <span class="idlMemberType">DOMString</span>, defaulting to <code>""</code></dt><dd>
+            The required audio content type.
+          </dd><dt id="widl-MediaKeySystemOptions-initDataType"><code>initDataType</code> of type <span class="idlMemberType">DOMString</span>, defaulting to <code>""</code></dt><dd>
+            The required <a href="#initialization-data-type">Initialization Data Type</a>.
+          </dd><dt id="widl-MediaKeySystemOptions-stateful"><code>stateful</code> of type <span class="idlMemberType"><a href="#idl-def-MediaKeysRequirement" class="idlType"><code>MediaKeysRequirement</code></a></span>, defaulting to <code>"optional"</code></dt><dd>
+            Whether the ability to persist state is required. This includes session data and any other type of state.<br>
+            Only <code><a href="#idl-def-SessionType.temporary">"temporary"</a></code> sessions may be created when statefulness is not supported.
+            <div class="note"><div class="note-title" aria-level="3" role="heading" id="h_note_9"><span>Note</span></div><p class="">
+              Except for <code><a href="#idl-def-SessionType.persistent">"persistent"</a></code> sessions, the need and ability to store state is Key System implementation-specific and may vary by feature used.</p></div>
+          </dd><dt id="widl-MediaKeySystemOptions-uniqueidentifier"><code>uniqueidentifier</code> of type <span class="idlMemberType"><a href="#idl-def-MediaKeysRequirement" class="idlType"><code>MediaKeysRequirement</code></a></span>, defaulting to <code>"optional"</code></dt><dd>
+            Whether a unique identifier is required.
+          </dd><dt id="widl-MediaKeySystemOptions-videoCapability"><code>videoCapability</code> of type <span class="idlMemberType">DOMString</span>, defaulting to <code>""</code></dt><dd>
+            The required video capability.
+          </dd><dt id="widl-MediaKeySystemOptions-videoType"><code>videoType</code> of type <span class="idlMemberType">DOMString</span>, defaulting to <code>""</code></dt><dd>
+            The required video content type.
+          </dd></dl></section>
+  
+        <div class="issue"><div class="issue-title" aria-level="2" role="heading" id="h_issue_2"><span>Issue 2</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25923">Bug 25923</a> - The structure of the <code>DOMString</code> members may change. If it is, other methods may be added.</p></div>
+  
+        <p>Implementations <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> add members to the this dictionary.
+          Should member(s) be added, they <em class="rfc2119" title="MUST">MUST</em> be of type MediaKeysRequirement, and it is RECOMMENED that they have default values of <code><a href="#idl-def-MediaKeysRequirement.optional">"optional"</a></code> to support the widest range of application and client combinations.
+        </p>
+        <p>This dictionary <em class="rfc2119" title="MUST NOT">MUST NOT</em> be used to pass state or data to the CDM.</p>
+
+      </section>
+    </section>
+
+        
+    <section id="mediakeysystemaccess-interface">
+      <!--OddPage--><h2 role="heading" id="h2_mediakeysystemaccess-interface"><span class="secno">3. </span><a href="#idl-def-MediaKeySystemAccess" class="idlType"><code>MediaKeySystemAccess</code></a> Interface</h2>
+      <p>The MediaKeySystemAccess object provides access to a <a href="#key-system">Key System</a>.</p>
+
+      <pre class="idl"><span class="idlInterface" id="idl-def-MediaKeySystemAccess">interface <span class="idlInterfaceID">MediaKeySystemAccess</span> {
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType">DOMString</span> <span class="idlAttrName"><a href="#widl-MediaKeySystemAccess-keySystem">keySystem</a></span>;</span>
+<span class="idlMethod">    <span class="idlMethType">Promise&lt;<a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a>&gt;</span> <span class="idlMethName"><a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">createMediaKeys</a></span> ();</span>
+};</span></pre><section id="attributes"><h3 role="heading" id="h3_attributes"><span class="secno">3.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-MediaKeySystemAccess-keySystem"><code>keySystem</code> of type <span class="idlAttrType">DOMString</span>, readonly   </dt><dd>
+          Identifies the <a href="#key-system">Key System</a> being used.
+        </dd></dl></section><section id="methods-1"><h3 role="heading" id="h3_methods-1"><span class="secno">3.2 </span>Methods</h3><dl class="methods"><dt id="widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys"><code>createMediaKeys</code></dt><dd>
+          <p>Creates a new <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object for <var title="true">keySystem</var>.</p>
+      
+          
+        <div><em>No parameters.</em></div><div><em>Return type: </em><code>Promise&lt;<a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a>&gt;</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <li><p>Let <var>promise</var> be a new promise.</p></li>
+            <li><p>Run the following steps asynchronously:</p>
+              <ol>
+                <li><p>Let <var title="true">cdm</var> be the <a href="#cdm">CDM</a> corresponding to this object.</p></li>
+                <li><p>Load and initialize the <var title="true">cdm</var> if necessary.</p></li>
+                <li><p>If <var title="true">cdm</var> fails to load or initialize, reject <var>promise</var> with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is the appropriate <a href="#error-names">error name</a>.</p></li>
+                <li><p>Let <var title="true">media keys</var> be a new <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object.</p></li>
+                <li><p>Resolve <var>promise</var> with <var title="true">media keys</var>.</p></li>
+              </ol>
+            </li>
+            <li><p>Return <var>promise</var>.</p></li>
+          </ol></dd></dl></section>
+    </section>
+
+
     <section id="mediakeys-interface">
-      <!--OddPage--><h2 role="heading" id="h2_mediakeys-interface"><span class="secno">2. </span><a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a> Interface</h2>
+      <!--OddPage--><h2 role="heading" id="h2_mediakeys-interface"><span class="secno">4. </span><a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a> Interface</h2>
       <p>The MediaKeys object represents a set of keys that an associated HTMLMediaElement can use for decryption of <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> during playback.
         It also represents a CDM instance.
       </p>
-      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
+      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes [<cite><a class="bibref" href="#bib-WebIDL">WebIDL</a></cite>] type mapping errors.</p>
       <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
       
-      <div class="issue"><div class="issue-title" aria-level="1" role="heading" id="h_issue_1"><span>Issue 1</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25923">Bug 25923</a> - Feature detection, including isTypeSupported(), and MediaKeys creation may change significantly.</p></div>
-      <pre class="idl"><span class="idlEnum" id="idl-def-IsTypeSupportedResult">enum <span class="idlEnumID">IsTypeSupportedResult</span> {
-    "<a href="#idl-def-IsTypeSupportedResult.empty-string" class="idlEnumItem">/* empty string */</a>",
-    "<a href="#idl-def-IsTypeSupportedResult.maybe" class="idlEnumItem">maybe</a>",
-    "<a href="#idl-def-IsTypeSupportedResult.probably" class="idlEnumItem">probably</a>"
-};</span></pre><table class="simple"><tbody><tr><th colspan="2">Enumeration description</th></tr><tr><td><code id="idl-def-IsTypeSupportedResult.empty-string">/* empty string */</code></td><td>
+  <!-- TODO: Move or remove depending on the outcome of Bug 25923.
+      <dl title="enum IsTypeSupportedResult" class="idl">
+        <dt>/* empty string */</dt><!-- TODO: Fix. -- >
+        <dd>
           The combination is not supported.
-        </td></tr><tr><td><code id="idl-def-IsTypeSupportedResult.maybe">maybe</code></td><td>
+        </dd>
+        <dt>maybe</dt>
+        <dd>
           The combination may be supported.
-        </td></tr><tr><td><code id="idl-def-IsTypeSupportedResult.probably">probably</code></td><td>
+        </dd>
+        <dt>probably</dt>
+        <dd>
           The combination is likely supported.
-        </td></tr></tbody></table>
+        </dd>
+      </dl>
+-->
   
       <pre class="idl"><span class="idlEnum" id="idl-def-SessionType">enum <span class="idlEnumID">SessionType</span> {
     "<a href="#idl-def-SessionType.temporary" class="idlEnumItem">temporary</a>",
@@ -778,45 +946,17 @@
         </td></tr></tbody></table>
   
       <pre class="idl"><span class="idlInterface" id="idl-def-MediaKeys">interface <span class="idlInterfaceID">MediaKeys</span> {
-<span class="idlAttribute">    readonly    attribute <span class="idlAttrType">DOMString</span> <span class="idlAttrName"><a href="#widl-MediaKeys-keySystem">keySystem</a></span>;</span>
-<span class="idlMethod">    <span class="idlMethType"><a href="#idl-def-MediaKeySession" class="idlType"><code>MediaKeySession</code></a></span>              <span class="idlMethName"><a href="#widl-MediaKeys-createSession-MediaKeySession-SessionType-sessionType">createSession</a></span> (<span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-SessionType" class="idlType"><code>SessionType</code></a></span> <span class="idlParamName">sessionType</span> = <span class="idlDefaultValue">"temporary"</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>                <span class="idlMethName"><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></span> (<span class="idlParam"><span class="idlParamType">(ArrayBuffer or ArrayBufferView)</span> <span class="idlParamName">serverCertificate</span></span>);</span>
-<span class="idlMethod">    static <span class="idlMethType">Promise&lt;<a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a>&gt;</span>    <span class="idlMethName"><a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">create</a></span> (<span class="idlParam"><span class="idlParamType">DOMString</span> <span class="idlParamName">keySystem</span></span>);</span>
-<span class="idlMethod">    static <span class="idlMethType"><a href="#idl-def-IsTypeSupportedResult" class="idlType"><code>IsTypeSupportedResult</code></a></span> <span class="idlMethName"><a href="#widl-MediaKeys-isTypeSupported-IsTypeSupportedResult-DOMstring-keySystem-DOMString-initDataType-DOMString-contentType-DOMString-capability">isTypeSupported</a></span> (<span class="idlParam"><span class="idlParamType">DOMstring</span> <span class="idlParamName">keySystem</span></span>, <span class="idlParam">optional <span class="idlParamType">DOMString</span> <span class="idlParamName">initDataType</span></span>, <span class="idlParam">optional <span class="idlParamType">DOMString</span> <span class="idlParamName">contentType</span></span>, <span class="idlParam">optional <span class="idlParamType">DOMString</span> <span class="idlParamName">capability</span></span>);</span>
-};</span></pre><section id="attributes"><h3 role="heading" id="h3_attributes"><span class="secno">2.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-MediaKeys-keySystem"><code>keySystem</code> of type <span class="idlAttrType">DOMString</span>, readonly   </dt><dd>
-          Identifies the <a href="#key-system">Key System</a> being used.
-        </dd></dl></section><section id="methods"><h3 role="heading" id="h3_methods"><span class="secno">2.2 </span>Methods</h3><dl class="methods"><dt id="widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem"><code>create</code>, static</dt><dd>
-          <p>Creates a new <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object for <var title="true">keySystem</var>.</p>
-      
-          
-        <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">keySystem</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;<a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a>&gt;</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
-            <li><p>If <var title="true">keySystem</var> is an empty string, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
-            <li><p>If <var title="true">keySystem</var> is not one of the <a href="#key-system">Key Systems</a> supported by the user agent, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>. String comparison is case-sensitive.</p></li>
-            <li><p>If <var title="true">keySystem</var> is not supported or not allowed in the <a href="http://www.w3.org/TR/html5/browsers.html#origin-0">origin</a> of the calling context's <a href="http://dom.spec.whatwg.org/#concept-document">Document</a>, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p></li>
-            <li><p>Let <var>promise</var> be a new promise.</p></li>
-            <li><p>Run the following steps asynchronously:</p>
-              <ol>
-                <li><p>Let <var title="true">cdm</var> be the <a href="#cdm">CDM</a> corresponding to <var title="true">keySystem</var>.</p></li>
-                <li><p>Load and initialize the <var title="true">cdm</var> if necessary.</p></li>
-                <li><p>If <var title="true">cdm</var> fails to load or initialize, reject <var>promise</var> with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is the appropriate <a href="#error-names">error name</a>.</p></li>
-      
-                <li>
-                  <p>Let <var title="true">media keys</var> be a new <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object, and initialize it as follows:</p>
-                  <ol>
-                    <li><p>Set the <code><a href="#widl-MediaKeys-keySystem">keySystem</a></code> attribute to <var title="true">keySystem</var>.</p></li>
-                  </ol>
-                </li>
-                <li><p>Resolve <var>promise</var> with <var title="true">media keys</var>.</p></li>
-              </ol>
-            </li>
-            <li><p>Return <var>promise</var>.</p></li>
-          </ol></dd><dt id="widl-MediaKeys-createSession-MediaKeySession-SessionType-sessionType"><code>createSession</code></dt><dd>
+<span class="idlMethod">    <span class="idlMethType"><a href="#idl-def-MediaKeySession" class="idlType"><code>MediaKeySession</code></a></span> <span class="idlMethName"><a href="#widl-MediaKeys-createSession-MediaKeySession-SessionType-sessionType">createSession</a></span> (<span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-SessionType" class="idlType"><code>SessionType</code></a></span> <span class="idlParamName">sessionType</span> = <span class="idlDefaultValue">"temporary"</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>   <span class="idlMethName"><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></span> (<span class="idlParam"><span class="idlParamType">(ArrayBuffer or ArrayBufferView)</span> <span class="idlParamName">serverCertificate</span></span>);</span>
+};</span></pre><section id="methods-2"><h3 role="heading" id="h3_methods-2"><span class="secno">4.1 </span>Methods</h3><dl class="methods"><dt id="widl-MediaKeys-createSession-MediaKeySession-SessionType-sessionType"><code>createSession</code></dt><dd>
           <p>Returns a new <code><a href="#idl-def-MediaKeySession">MediaKeySession</a></code> object.</p>
       
           
         <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">sessionType</td><td class="prmType"><code><a href="#idl-def-SessionType" class="idlType"><code>SessionType</code></a> = "temporary"</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptTrue"><span role="img" aria-label="True">✔</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code><a href="#idl-def-MediaKeySession" class="idlType"><code>MediaKeySession</code></a></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
-            <!-- TODO: Reference the CDM loaded during initialization instead of "<a def-id="cdm"></a> corresponding to the <a def-id="keySystem-attribute"></a> attribute". Here and elsewhere. -->
-            <li><p>If <var title="true">sessionType</var> is not supported by the <a href="#cdm">CDM</a> corresponding to the <code><a href="#widl-MediaKeys-keySystem">keySystem</a></code> attribute, throw a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p></li>
+            <!-- TODO: Find a better way to reference MediaKeySystemAccess attributes, including the outcome vs. what was specified. -->
+            <li><p>If this object was created by a <a href="#idl-def-MediaKeySystemAccess" class="idlType"><code>MediaKeySystemAccess</code></a> object that was created with a <code><a href="#widl-MediaKeySystemOptions-stateful">stateful</a></code> value of <code><a href="#idl-def-MediaKeysRequirement.disallowed">"disallowed"</a></code> and <var title="true">sessionType</var> is not <code><a href="#idl-def-SessionType.temporary">"temporary"</a></code>, throw a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p></li>
+            <!-- TODO: Reference the CDM loaded during initialization instead of "<a def-id="cdm"></a> corresponding to the <a def-id="keySystem-attribute"></a> attribute", especially since it is now a member of MediaKeySystemAccess. Here and elsewhere. -->
+            <li><p>If <var title="true">sessionType</var> is not supported by the <a href="#cdm">CDM</a> corresponding to the <code><a href="#widl-MediaKeySystemAccess-keySystem">keySystem</a></code> attribute, throw a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p></li>
             <li><p>Let <var title="true">session</var> be a new <code><a href="#idl-def-MediaKeySession">MediaKeySession</a></code> object, and initialize it as follows:</p>
               <ol>
                 <li><p>Let the <code><a href="#widl-MediaKeySession-sessionId">sessionId</a></code> attribute be the empty string.</p></li>
@@ -828,96 +968,6 @@
               </ol>
             </li>
             <li><p>Return <var title="true">session</var>.</p></li>
-          </ol></dd><dt id="widl-MediaKeys-isTypeSupported-IsTypeSupportedResult-DOMstring-keySystem-DOMString-initDataType-DOMString-contentType-DOMString-capability"><code>isTypeSupported</code>, static</dt><dd>
-          <p>Returns whether <var title="true">keySystem</var> is supported with the <var title="true">initDataType</var>, container and codec(s) specified by <var title="true">contentType</var>, and <var title="true">capability</var>.</p>
-          <p>The following list shows some examples.</p>
-          <ul>
-            <li>
-              <p>Returns whether the Some System <a href="#key-system">Key System</a> may be supported. Specific containers and codecs may or may not be supported with Some System.</p>
-              <div class="example">MediaKeys.isTypeSupported("com.example.somesystem")</div>
-            </li><li>
-              <p>Returns whether the Some System <a href="#key-system">Key System</a> may be supported and is capable of parsing the <a href="#initialization-data-type">Initialization Data Type</a> format "keyids". Specific containers and codecs may or may not be supported with Some System.</p>
-              <div class="example">MediaKeys.isTypeSupported("com.example.somesystem", "keyids")</div>
-            </li>
-            <li>
-              <p>Returns whether the Some System <a href="#key-system">Key System</a> may be supported and is capable of parsing the <a href="#initialization-data-type">Initialization Data Type</a> format <var title="true">initDataType</var>, the user agent is capable of demuxing the container specified by <var title="true">mimeType</var>, and the codec(s) specified by <var title="true">mimeType</var> are supported, all as specified by capability "foo".</p>
-              <div class="example">MediaKeys.isTypeSupported("com.example.somesystem", <var title="true">initDataType</var>, <var title="true">mimeType</var>, "foo")</div>
-            </li>
-            <li>
-              <p>Returns whether the user agent <em>probably</em> supports <a href="#clear-key">Clear Key</a> using the <a href="#initialization-data-type">Initialization Data Type</a> format <var title="true">initDataType</var> and the container and codec(s) specified by <var title="true">mimeType</var>.</p>
-              <div class="example">"probably" == MediaKeys.isTypeSupported("org.w3.clearkey", <var title="true">initDataType</var>, <var title="true">mimeType</var>)</div>
-            </li>
-          </ul>
-      
-          
-        <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">keySystem</td><td class="prmType"><code>DOMstring</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr><tr><td class="prmName">initDataType</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptTrue"><span role="img" aria-label="True">✔</span></td><td class="prmDesc"></td></tr><tr><td class="prmName">contentType</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptTrue"><span role="img" aria-label="True">✔</span></td><td class="prmDesc"></td></tr><tr><td class="prmName">capability</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptTrue"><span role="img" aria-label="True">✔</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code><a href="#idl-def-IsTypeSupportedResult" class="idlType"><code>IsTypeSupportedResult</code></a></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
-            <li><p>If <var title="true">keySystem</var> is an empty string or contains an unrecognized or unsupported <a href="#key-system">Key System</a>, return <code><a href="#idl-def-IsTypeSupportedResult.empty-string">""</a></code> and abort these steps. String comparison is case-sensitive.</p></li>
-            <li><p>If the <var title="true">keySystem</var> implementation is not available and usable, return <code><a href="#idl-def-IsTypeSupportedResult.empty-string">""</a></code> and abort these steps.</p></li>
-            <li><p>Follow the steps for the first matching condition from the following list:</p>
-              <dl class="switch">
-                <dt>If <var title="true">keySystem</var> is a value that may be successfully passed to <code><a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">create()</a></code></dt>
-                <dd>Let <var title="true">probably result</var> be <code><a href="#idl-def-IsTypeSupportedResult.probably">"probably"</a></code>.</dd>
-                <dt>Otherwise</dt>
-                <dd>Let <var title="true">probably result</var> be <code><a href="#idl-def-IsTypeSupportedResult.maybe">"maybe"</a></code>.
-                  <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_7"><span>Note</span></div><p class="">This may, for example, be the case for strings that are only used for discovery.</p></div>
-                </dd>
-              </dl>
-            </li>
-            
-            <li><p>If <var title="true">initDataType</var> was not provided, follow the steps for the first matching condition from the following list and abort these steps:</p>
-              <dl class="switch">
-                <dt>If the user agent is <em>not</em> confident that the <var title="true">keySystem</var> implementation is available and usable</dt>
-                <dd>Return <code><a href="#idl-def-IsTypeSupportedResult.maybe">"maybe"</a></code>.</dd>
-                <dt>Otherwise</dt>
-                <dd>Return <var title="true">probably result</var>.</dd>
-              </dl>
-            </li>
-      
-            <li><p>If <var title="true">initDataType</var> is an empty string or contains an unrecognized or unsupported <a href="#initialization-data-type">Initialization Data Type</a>, return <code><a href="#idl-def-IsTypeSupportedResult.empty-string">""</a></code> and abort these steps. String comparison is case-sensitive.</p></li>
-            <li><p>If <var title="true">initDataType</var> is not an <a href="#initialization-data-type">Initialization Data Type</a> supported by the <var title="true">keySystem</var> implementation, return <code><a href="#idl-def-IsTypeSupportedResult.empty-string">""</a></code> and abort these steps.</p></li>
-            <li><p>If the <var title="true">keySystem</var> implementation supporting <var title="true">initDataType</var> is not available and usable, return <code><a href="#idl-def-IsTypeSupportedResult.empty-string">""</a></code> and abort these steps.</p></li>
-            <li><p>If <var title="true">contentType</var> was not provided, follow the steps for the first matching condition from the following list and abort these steps:</p>
-              <dl class="switch">
-                <dt>If the user agent is <em>not</em> confident that the <var title="true">keySystem</var> implementation supporting <var title="true">initDataType</var> is available and usable</dt>
-                <dd>Return <code><a href="#idl-def-IsTypeSupportedResult.maybe">"maybe"</a></code>.</dd>
-                <dt>Otherwise</dt>
-                <dd>Return <var title="true">probably result</var>.</dd>
-              </dl>
-            </li>
-      
-            <li><p>If <var title="true">contentType</var> is an empty string or contains an invalid or unrecognized MIME type, return <code><a href="#idl-def-IsTypeSupportedResult.empty-string">""</a></code> and abort these steps.</p></li>
-            <li><p>Let <var title="true">container</var> be the container type specified by <var title="true">contentType</var>.</p></li>
-            <li><p>Let <var title="true">parameters</var> be the RFC 6381 [<cite><a class="bibref" href="#bib-RFC6381">RFC6381</a></cite>] parameters, if any, specified by <var title="true">contentType</var>.</p></li>
-            <li><p>Let <var title="true">media types</var> be the set of media types specified by <var title="true">parameters</var>. It <em class="rfc2119" title="MAY">MAY</em> be empty. The case-sensitivity of string comparisons is determined by the appropriate RFC or other specification.</p>
-              <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_8"><span>Note</span></div><p class="">For example, all of the codecs. Case-sensitive string comparison is <em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em> because RFC 6381 [<cite><a class="bibref" href="#bib-RFC6381">RFC6381</a></cite>] says, "Values are case sensitive" for some formats.</p></div>
-            </li>
-            <li><p>If the user agent does not support <var title="true">container</var>, return <code><a href="#idl-def-IsTypeSupportedResult.empty-string">""</a></code> and abort these steps. The case-sensitivity of string comparisons is determined by the appropriate RFC.</p>
-              <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_9"><span>Note</span></div><p class="">Per RFC 6838 [<cite><a class="bibref" href="#bib-RFC6838">RFC6838</a></cite>], "Both top-level type and subtype names are case-insensitive."</p></div>
-            </li>
-            <li><p>If the user agent and <var title="true">keySystem</var> implementation do not support playback of encrypted <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> for all <var title="true">media types</var>, return <code><a href="#idl-def-IsTypeSupportedResult.empty-string">""</a></code> and abort these steps.</p></li>
-            <li><p>If <var title="true">capability</var> was not provided, follow the steps for the first matching condition from the following list and abort these steps:</p>
-              <dl class="switch">
-                <dt>If the user agent is <em>not</em> confident that the <var title="true">keySystem</var> implementation supporting <var title="true">initDataType</var> is available and usable to decrypt and enable playback of support playback of encrypted <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> for all <var title="true">media types</var></dt>
-                <dd>Return <code><a href="#idl-def-IsTypeSupportedResult.maybe">"maybe"</a></code>.</dd>
-                <dt>If the user agent did <em>not</em> recognize one or more <var title="true">parameters</var></dt>
-                <dd>Return <code><a href="#idl-def-IsTypeSupportedResult.maybe">"maybe"</a></code>.</dd>
-                <dt>Otherwise</dt>
-                <dd>Return <var title="true">probably result</var>.</dd>
-              </dl>
-            </li>
-            
-            <li><p>If <var title="true">capability</var> is an empty string, return <code><a href="#idl-def-IsTypeSupportedResult.empty-string">""</a></code> and abort these steps.</p></li>
-            <li><p>If the <var title="true">keySystem</var> implementation does not support <var title="true">capability</var>, return <code><a href="#idl-def-IsTypeSupportedResult.empty-string">""</a></code> and abort these steps. String comparison is case-sensitive.</p></li>
-            <li><p>Follow the steps for the first matching condition from the following list:</p>
-              <dl class="switch">
-                <dt>If the user agent is <em>not</em> confident that the <var title="true">keySystem</var> implementation supporting <var title="true">initDataType</var> is available and usable to decrypt and enable playback of support playback of encrypted <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> for all <var title="true">media types</var> as specified by <var title="true">capability</var></dt>
-                <dd>Return <code><a href="#idl-def-IsTypeSupportedResult.maybe">"maybe"</a></code>.</dd>
-                <dt>If the user agent did <em>not</em> recognize one or more <var title="true">parameters</var></dt>
-                <dd>Return <code><a href="#idl-def-IsTypeSupportedResult.maybe">"maybe"</a></code>.</dd>
-                <dt>Otherwise</dt>
-                <dd>Return <var title="true">probably result</var>.</dd>
-              </dl>
-            </li>
           </ol></dd><dt id="widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate"><code>setServerCertificate</code></dt><dd>
           <p id="server-certificate">Provides a server certificate to be used to encrypt messages to the license server.</p>
           <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_10"><span>Note</span></div><p class="">The contents of <var title="true">serverCertificate</var> are <a href="#key-system">Key System</a>-specific.</p></div>
@@ -926,12 +976,12 @@
           
         <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">serverCertificate</td><td class="prmType"><code>(ArrayBuffer or ArrayBufferView)</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;void&gt;</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
             <li><p>If <var title="true">serverCertificate</var> is an empty array, return a promise rejected with a new a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
-            <li><p>If the <a href="#cdm">CDM</a> corresponding to the <code><a href="#widl-MediaKeys-keySystem">keySystem</a></code> attribute does not support server certificates, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p></li>
+            <li><p>If the <a href="#cdm">CDM</a> corresponding to the <code><a href="#widl-MediaKeySystemAccess-keySystem">keySystem</a></code> attribute does not support server certificates, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p></li>
             <li><p>Let <var>certificate</var> be a copy of the contents of the <var title="true">serverCertificate</var> parameter.</p></li>
             <li><p>Let <var>promise</var> be a new promise.</p></li>
             <li><p>Run the following steps asynchronously:</p>
               <ol>
-                <li><p>Let <var title="true">cdm</var> be the <var title="true">cdm</var> during the <a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">initialization</a> of this object.</p></li>
+                <li><p>Let <var title="true">cdm</var> be the <var title="true">cdm</var> during the <a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">initialization</a> of this object.</p></li>
                 <li><p>Use the <var title="true">cdm</var> to process <var>certificate</var>.</p></li>
                 <li><p>If any of the preceding steps failed, reject <var>promise</var> with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is the appropriate <a href="#error-names">error name</a>.</p></li>
                 <li><p>Resolve <var>promise</var>.</p></li>
@@ -944,10 +994,10 @@
 
 
     <section id="mediakeysession-interface">
-      <!--OddPage--><h2 role="heading" id="h2_mediakeysession-interface"><span class="secno">3. </span><a href="#idl-def-MediaKeySession" class="idlType"><code>MediaKeySession</code></a> Interface</h2>
+      <!--OddPage--><h2 role="heading" id="h2_mediakeysession-interface"><span class="secno">5. </span><a href="#idl-def-MediaKeySession" class="idlType"><code>MediaKeySession</code></a> Interface</h2>
       <p>The MediaKeySession object represents a <a href="#key-session">key session</a>.</p>
   
-      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
+      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes [<cite><a class="bibref" href="#bib-WebIDL">WebIDL</a></cite>] type mapping errors.</p>
       <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
   
       <pre class="idl"><span class="idlInterface" id="idl-def-MediaKeySession">interface <span class="idlInterfaceID">MediaKeySession</span> : <span class="idlSuperclass">EventTarget</span> {
@@ -960,14 +1010,14 @@
 <span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>                  <span class="idlMethName"><a href="#widl-MediaKeySession-close-Promise-void">close</a></span> ();</span>
 <span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>                  <span class="idlMethName"><a href="#widl-MediaKeySession-remove-Promise-void">remove</a></span> ();</span>
 <span class="idlMethod">    <span class="idlMethType">Promise&lt;sequence&lt;ArrayBuffer&gt;&gt;</span> <span class="idlMethName"><a href="#widl-MediaKeySession-getUsableKeyIds-Promise-sequence-ArrayBuffer">getUsableKeyIds</a></span> ();</span>
-};</span></pre><section id="attributes-1"><h3 role="heading" id="h3_attributes-1"><span class="secno">3.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-MediaKeySession-closed"><code>closed</code> of type <span class="idlAttrType">Promise&lt;void&gt;</span>, readonly   </dt><dd>
+};</span></pre><section id="attributes-1"><h3 role="heading" id="h3_attributes-1"><span class="secno">5.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-MediaKeySession-closed"><code>closed</code> of type <span class="idlAttrType">Promise&lt;void&gt;</span>, readonly   </dt><dd>
           <p>Signals when object becomes closed as a result of the <a href="#algorithms-session-close">session close algorithm</a> being run.
           This promise can only be fulfilled and is never rejected.</p>
         </dd><dt id="widl-MediaKeySession-expiration"><code>expiration</code> of type <span class="idlAttrType">unrestricted double</span>, readonly   </dt><dd>
           <p>The time, in milliseconds since 01 January, 1970 UTC, after which the key(s) in the session will no longer be usable to decrypt <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>, or <code>NaN</code> if no such time exists, as determined by the CDM.</p>
         </dd><dt id="widl-MediaKeySession-sessionId"><code>sessionId</code> of type <span class="idlAttrType">DOMString</span>, readonly   </dt><dd>
           <p>The <a href="#session-id">Session Id</a> for this object and the associated key(s) or license(s).</p>
-        </dd></dl></section><section id="methods-1"><h3 role="heading" id="h3_methods-1"><span class="secno">3.2 </span>Methods</h3><dl class="methods"><dt id="widl-MediaKeySession-close-Promise-void"><code>close</code></dt><dd>
+        </dd></dl></section><section id="methods-3"><h3 role="heading" id="h3_methods-3"><span class="secno">5.2 </span>Methods</h3><dl class="methods"><dt id="widl-MediaKeySession-close-Promise-void"><code>close</code></dt><dd>
           <p>Indicates that the application no longer needs the session and the CDM should release any resources associated with this object and close it.</p>
           <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_12"><span>Note</span></div><p class="">The returned promise is resolved when the request has been processed, and the <code><a href="#widl-MediaKeySession-closed">closed</a></code> attribute promise is resolved when the session is closed.</p></div>
       
@@ -978,7 +1028,7 @@
             <li><p>Let <var>promise</var> be a new promise.</p></li>
             <li><p>Run the following steps asynchronously:</p>
               <ol>
-                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">initialization</a> of the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object that created this object.</p></li>
+                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">initialization</a> of the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object that created this object.</p></li>
                 <li><p>Use the <var title="true">cdm</var> to execute the following steps:</p>
                   <ol>
                     <li>
@@ -1005,7 +1055,7 @@
             <li><p>If <var title="true">initDataType</var> is an empty string, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
             <li><p>If <var title="true">initData</var> is an empty array, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
             <li><p>Let <var title="true">media keys</var> be the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object that created this object.</p></li>
-            <li><p>If the <a href="#cdm">CDM</a> corresponding to <var title="true">media keys</var>'s <code><a href="#widl-MediaKeys-keySystem">keySystem</a></code> attribute does not support <var title="true">initDataType</var> as an <a href="#initialization-data-type">Initialization Data Type</a>, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>. String comparison is case-sensitive.</p></li>
+            <li><p>If the <a href="#cdm">CDM</a> corresponding to <var title="true">media keys</var>'s <code><a href="#widl-MediaKeySystemAccess-keySystem">keySystem</a></code> attribute does not support <var title="true">initDataType</var> as an <a href="#initialization-data-type">Initialization Data Type</a>, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>. String comparison is case-sensitive.</p></li>
             <li><p>Let <var>init data</var> be a copy of the contents of the <var title="true">initData</var> parameter.</p></li>
             <li><p>Let <var title="true">session type</var> be this object's <var title="true">session type</var>.</p></li>
             <li><p>Let <var>promise</var> be a new promise.</p></li>
@@ -1023,7 +1073,7 @@
                 <li><p>If the previous step failed, reject <var>promise</var> with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
                 <li><p>Let <var title="true">session id</var> be the empty string.</p></li>
                 <li><p>Let <var title="true">message</var> be null.</p></li>
-                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">initialization</a> of <var title="true">media keys</var>.</p></li>
+                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">initialization</a> of <var title="true">media keys</var>.</p></li>
                 <li><p>Use the <var title="true">cdm</var> to execute the following steps:</p>
                   <ol>
                     <li><p>If the <var>init data</var> is not supported by the <var title="true">cdm</var>, reject <var>promise</var> with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p></li>
@@ -1060,7 +1110,7 @@
             </li>
             <li><p>Return <var>promise</var>.</p></li>
           </ol></dd><dt id="widl-MediaKeySession-getUsableKeyIds-Promise-sequence-ArrayBuffer"><code>getUsableKeyIds</code></dt><dd>
-          <div class="issue"><div class="issue-title" aria-level="2" role="heading" id="h_issue_2"><span>Issue 2</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=26372">Bug 26372</a> - getUsableKeyIds() may be replaced.</p></div>
+          <div class="issue"><div class="issue-title" aria-level="2" role="heading" id="h_issue_3"><span>Issue 3</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=26372">Bug 26372</a> - getUsableKeyIds() may be replaced.</p></div>
           <p>Gets the key IDs for keys in the session that the CDM <em>knows</em> are currently usable to decrypt <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.</p>
           
           
@@ -1069,7 +1119,7 @@
             <li><p>Let <var>promise</var> be a new promise.</p></li>
             <li><p>Run the following steps asynchronously:</p>
               <ol>
-                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">initialization</a> of the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object that created this object.</p></li>
+                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">initialization</a> of the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object that created this object.</p></li>
                 <li><p>Use the <var title="true">cdm</var> to execute the following steps:</p>
                   <ol>
                     <li><p>Let <var title="true">usable key ids</var> be a list of the key IDs for keys in the session that the CDM <em>knows</em> are currently usable to decrypt <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>. <var title="true">usable key ids</var> <em class="rfc2119" title="MUST NOT">MUST NOT</em> contain IDs for keys that <em>may not</em> currently be usable. Each element <em class="rfc2119" title="MUST">MUST</em> be unique.</p></li>
@@ -1093,7 +1143,7 @@
             <li><p>If <var title="true">sessionId</var> is an empty string, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
             <li><p>If this object's <var title="true">session type</var> is not <code><a href="#idl-def-SessionType.persistent">"persistent"</a></code>, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
             <li><p>Let <var title="true">media keys</var> be the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object that created this object.</p></li>
-            <li><p>If the <a href="#cdm">CDM</a> corresponding to <var title="true">media keys</var>'s <code><a href="#widl-MediaKeys-keySystem">keySystem</a></code> attribute does not support loading previous sessions, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p></li>
+            <li><p>If the <a href="#cdm">CDM</a> corresponding to <var title="true">media keys</var>'s <code><a href="#widl-MediaKeySystemAccess-keySystem">keySystem</a></code> attribute does not support loading previous sessions, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p></li>
             <li><p>Let <var>promise</var> be a new promise.</p></li>
             <li><p>Run the following steps asynchronously:</p>
               <ol>
@@ -1107,7 +1157,7 @@
                 <li><p>Let <var title="true">message</var> be null.</p></li>
                 <li><p>Let <var title="true">message type</var> be null.</p></li>
                 <li><p>Let <var title="true">origin</var> be the <a href="http://www.w3.org/TR/html5/browsers.html#origin-0">origin</a> of this object's <a href="http://dom.spec.whatwg.org/#concept-document">Document</a>.</p></li>
-                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">initialization</a> of <var title="true">media keys</var>.</p></li>
+                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">initialization</a> of <var title="true">media keys</var>.</p></li>
                 <li><p>Use the <var title="true">cdm</var> to execute the following steps:</p>
                   <ol>
                     <li><p>If there is no data stored for the <var>sanitized session ID</var> in the <var title="true">origin</var>, resolve <var>promise</var> with <code>false</code>.</p></li><!-- Per https://github.com/w3ctag/promises-guide#rejections-should-be-used-for-exceptional-situations. -->
@@ -1149,7 +1199,7 @@
             <li><p>Let <var>promise</var> be a new promise.</p></li>
             <li><p>Run the following steps asynchronously:</p>
               <ol>
-                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">initialization</a> of the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object that created this object.</p></li>
+                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">initialization</a> of the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object that created this object.</p></li>
                 <li><p>Use the <var title="true">cdm</var> to execute the following steps:</p>
                   <ol>
                     <li>
@@ -1190,7 +1240,7 @@
                   </p></div>
                 </li>
                 <li><p>If the previous step failed, reject <var>promise</var> with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
-                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">initialization</a> of the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object that created this object.</p></li>
+                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">initialization</a> of the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object that created this object.</p></li>
                 <li><p>Let <var title="true">message</var> be null.</p></li>
                 <li><p>Let <var title="true">message type</var> be null.</p></li>
                 <li><p>Use the <var title="true">cdm</var> to execute the following steps:</p>
@@ -1236,7 +1286,7 @@
           </ol></dd></dl></section>
   
       <section id="mediakeymessageevent">
-        <h3 role="heading" id="h3_mediakeymessageevent"><span class="secno">3.3 </span><a href="#idl-def-MediaKeyMessageEvent" class="idlType"><code>MediaKeyMessageEvent</code></a></h3>
+        <h3 role="heading" id="h3_mediakeymessageevent"><span class="secno">5.3 </span><a href="#idl-def-MediaKeyMessageEvent" class="idlType"><code>MediaKeyMessageEvent</code></a></h3>
         <p>The MediaKeyMessageEvent object is used for the <code><a href="#dom-evt-message">message</a></code> event.</p>
         <p>Events are constructed as defined in <a href="http://dom.spec.whatwg.org/#constructing-events">Constructing events</a> [<cite><a class="bibref" href="#bib-DOM">DOM</a></cite>].</p>
   
@@ -1250,20 +1300,20 @@
 interface <span class="idlInterfaceID">MediaKeyMessageEvent</span> : <span class="idlSuperclass">Event</span> {
 <span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span> <span class="idlAttrName"><a href="#widl-MediaKeyMessageEvent-type">type</a></span>;</span>
 <span class="idlAttribute">    readonly    attribute <span class="idlAttrType">ArrayBuffer</span>         <span class="idlAttrName"><a href="#widl-MediaKeyMessageEvent-message">message</a></span>;</span>
-};</span></pre><section id="constructors"><h4 role="heading" id="h4_constructors"><span class="secno">3.3.1 </span>Constructors</h4><dl class="constructors"><dt id="widl-ctor-MediaKeyMessageEvent--DOMString-type-MediaKeyMessageEventInit-eventInitDict"><code>MediaKeyMessageEvent</code></dt><dd>
+};</span></pre><section id="constructors"><h4 role="heading" id="h4_constructors"><span class="secno">5.3.1 </span>Constructors</h4><dl class="constructors"><dt id="widl-ctor-MediaKeyMessageEvent--DOMString-type-MediaKeyMessageEventInit-eventInitDict"><code>MediaKeyMessageEvent</code></dt><dd>
   
-          <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">type</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr><tr><td class="prmName">eventInitDict</td><td class="prmType"><code><a href="#idl-def-MediaKeyMessageEventInit" class="idlType"><code>MediaKeyMessageEventInit</code></a></code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptTrue"><span role="img" aria-label="True">✔</span></td><td class="prmDesc"></td></tr></tbody></table></dd></dl></section><section id="attributes-2"><h4 role="heading" id="h4_attributes-2"><span class="secno">3.3.2 </span>Attributes</h4><dl class="attributes"><dt id="widl-MediaKeyMessageEvent-message"><code>message</code> of type <span class="idlAttrType">ArrayBuffer</span>, readonly   </dt><dd>
+          <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">type</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr><tr><td class="prmName">eventInitDict</td><td class="prmType"><code><a href="#idl-def-MediaKeyMessageEventInit" class="idlType"><code>MediaKeyMessageEventInit</code></a></code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptTrue"><span role="img" aria-label="True">✔</span></td><td class="prmDesc"></td></tr></tbody></table></dd></dl></section><section id="attributes-2"><h4 role="heading" id="h4_attributes-2"><span class="secno">5.3.2 </span>Attributes</h4><dl class="attributes"><dt id="widl-MediaKeyMessageEvent-message"><code>message</code> of type <span class="idlAttrType">ArrayBuffer</span>, readonly   </dt><dd>
             The message from the CDM. Messages are Key System-specific.
           </dd><dt id="widl-MediaKeyMessageEvent-type"><code>type</code> of type <span class="idlAttrType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span>, readonly   </dt><dd>
             The type of the message.
           </dd></dl></section>
   
         <section id="mediakeymessageeventinit">
-          <h4 role="heading" id="h4_mediakeymessageeventinit"><span class="secno">3.3.3 </span><a href="#idl-def-MediaKeyMessageEventInit" class="idlType"><code>MediaKeyMessageEventInit</code></a></h4>
+          <h4 role="heading" id="h4_mediakeymessageeventinit"><span class="secno">5.3.3 </span><a href="#idl-def-MediaKeyMessageEventInit" class="idlType"><code>MediaKeyMessageEventInit</code></a></h4>
           <pre class="idl"><span class="idlDictionary" id="idl-def-MediaKeyMessageEventInit">dictionary <span class="idlDictionaryID">MediaKeyMessageEventInit</span> : <span class="idlSuperclass">EventInit</span> {
 <span class="idlMember">    <span class="idlMemberType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span> <span class="idlMemberName"><a href="#widl-MediaKeyMessageEventInit-type">type</a></span> = <span class="idlMemberValue">"licenserequest"</span>;</span>
 <span class="idlMember">    <span class="idlMemberType">ArrayBuffer</span>         <span class="idlMemberName"><a href="#widl-MediaKeyMessageEventInit-message">message</a></span> = <span class="idlMemberValue">ArrayBuffer()</span>;</span>
-};</span></pre><section id="dictionary-mediakeymessageeventinit-members"><h5 role="heading" id="h5_dictionary-mediakeymessageeventinit-members"><span class="secno">3.3.3.1 </span>Dictionary <a class="idlType" href="#idl-def-MediaKeyMessageEventInit"><code>MediaKeyMessageEventInit</code></a> Members</h5><dl class="dictionary-members"><dt id="widl-MediaKeyMessageEventInit-message"><code>message</code> of type <span class="idlMemberType">ArrayBuffer</span>, defaulting to <code>ArrayBuffer()</code></dt><dd>
+};</span></pre><section id="dictionary-mediakeymessageeventinit-members"><h5 role="heading" id="h5_dictionary-mediakeymessageeventinit-members"><span class="secno">5.3.3.1 </span>Dictionary <a class="idlType" href="#idl-def-MediaKeyMessageEventInit"><code>MediaKeyMessageEventInit</code></a> Members</h5><dl class="dictionary-members"><dt id="widl-MediaKeyMessageEventInit-message"><code>message</code> of type <span class="idlMemberType">ArrayBuffer</span>, defaulting to <code>ArrayBuffer()</code></dt><dd>
               The message.
             </dd><dt id="widl-MediaKeyMessageEventInit-type"><code>type</code> of type <span class="idlMemberType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span>, defaulting to <code>"licenserequest"</code></dt><dd>
               The type of the message.
@@ -1272,7 +1322,7 @@
       </section>
   
       <section id="mediakeysession-events" class="informative" typeof="bibo:Chapter" resource="#mediakeysession-events" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_mediakeysession-events"><span class="secno">3.4 </span>Event Summary</h3><p><em>This section is non-normative.</em></p>
+        <h3 role="heading" id="h3_mediakeysession-events"><span class="secno">5.4 </span>Event Summary</h3><p><em>This section is non-normative.</em></p>
     
         <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_26"><span>Note</span></div><p class="">In some implementations, <code><a href="#idl-def-MediaKeySession">MediaKeySession</a></code> objects may not fire any events until the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object is associated with a media element using <code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys()</a></code>.</p></div>
     
@@ -1300,10 +1350,10 @@
       </section>
   
       <section id="mediakeysession-algorithms" typeof="bibo:Chapter" resource="#mediakeysession-algorithms" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_mediakeysession-algorithms"><span class="secno">3.5 </span>Algorithms</h3>
+        <h3 role="heading" id="h3_mediakeysession-algorithms"><span class="secno">5.5 </span>Algorithms</h3>
     
         <section id="algorithms-queue-message" typeof="bibo:Chapter" resource="#algorithms-queue-message" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_algorithms-queue-message"><span class="secno">3.5.1 </span>Queue a "message" Event</h4>
+          <h4 role="heading" id="h4_algorithms-queue-message"><span class="secno">5.5.1 </span>Queue a "message" Event</h4>
           <p>The Queue a "message" Event algorithm is run when the CDM needs to queue a message event to a <code><a href="#idl-def-MediaKeySession">MediaKeySession</a></code> object.
           Requests to run this algorithm include a target <code><a href="#idl-def-MediaKeySession">MediaKeySession</a></code> object, a <var title="true">message type</var>, and a <var title="true">message</var>.
           </p>
@@ -1322,7 +1372,7 @@
         </section>
     
         <section id="algorithms-keys-changed" typeof="bibo:Chapter" resource="#algorithms-keys-changed" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_algorithms-keys-changed"><span class="secno">3.5.2 </span>Usable Keys Changed</h4>
+          <h4 role="heading" id="h4_algorithms-keys-changed"><span class="secno">5.5.2 </span>Usable Keys Changed</h4>
           <p>The Usable Keys Changed algorithm is run when the CDM changes the set of keys in the session that may be used for decryption.
           This can happen as the result of an <code><a href="#widl-MediaKeySession-update-Promise-void--ArrayBuffer-ArrayBufferView-response">update()</a></code> call or some other event.
           Requests to run this algorithm include a target <code><a href="#idl-def-MediaKeySession">MediaKeySession</a></code> object.
@@ -1339,7 +1389,7 @@
         </section>
     
         <section id="algorithms-update-expiration" typeof="bibo:Chapter" resource="#algorithms-update-expiration" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_algorithms-update-expiration"><span class="secno">3.5.3 </span>Update Expiration</h4>
+          <h4 role="heading" id="h4_algorithms-update-expiration"><span class="secno">5.5.3 </span>Update Expiration</h4>
           <p>The Update Expiration algorithm is run when the CDM changes the expiration time of a session.
           This can happen as the result of an <code><a href="#widl-MediaKeySession-update-Promise-void--ArrayBuffer-ArrayBufferView-response">update()</a></code> call or some other event.
           Requests to run this algorithm include a target <code><a href="#idl-def-MediaKeySession">MediaKeySession</a></code> object and the new expiration time, which may be <code>NaN</code>.
@@ -1354,7 +1404,7 @@
         </section>
     
         <section id="algorithms-session-close" typeof="bibo:Chapter" resource="#algorithms-session-close" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_algorithms-session-close"><span class="secno">3.5.4 </span>Session Close</h4>
+          <h4 role="heading" id="h4_algorithms-session-close"><span class="secno">5.5.4 </span>Session Close</h4>
           <p>The Session Close algorithm is run when the CDM closes the session associated with a <code><a href="#idl-def-MediaKeySession">MediaKeySession</a></code> object.</p>
           <div class="note"><div class="note-title" aria-level="3" role="heading" id="h_note_28"><span>Note</span></div><p class="">The CDM may close a session at any point, such as in response to a <code><a href="#widl-MediaKeySession-close-Promise-void">close()</a></code> call, when the session is no longer needed, or when system resources are lost.
           Keys in other sessions <em class="rfc2119" title="SHOULD">SHOULD</em> be unaffected, even if they have overlapping key IDs.
@@ -1370,9 +1420,9 @@
       </section>
   
       <section id="exceptions">
-        <h3 role="heading" id="h3_exceptions"><span class="secno">3.6 </span>Exceptions</h3>
+        <h3 role="heading" id="h3_exceptions"><span class="secno">5.6 </span>Exceptions</h3>
         <p id="error-names">The methods report errors by rejecting the returned promise with a <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code>.
-        The following <a href="http://heycam.github.io/webidl/#idl-DOMException-error-names">DOMException names from WebIDL</a> are used in the algorithms.
+        The following <a href="http://heycam.github.io/webidl/#idl-DOMException-error-names">DOMException names from WebIDL</a> [<cite><a class="bibref" href="#bib-WebIDL">WebIDL</a></cite>] are used in the algorithms.
         Causes specified specified in the algorithms are listed alongside each name, though these names <em class="rfc2119" title="MAY">MAY</em> be used for other reasons as well.
         </p>
     
@@ -1423,7 +1473,7 @@
       </section>
   
       <section id="session-storage" typeof="bibo:Chapter" resource="#session-storage" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_session-storage"><span class="secno">3.7 </span>Session Storage and Persistence</h3>
+        <h3 role="heading" id="h3_session-storage"><span class="secno">5.7 </span>Session Storage and Persistence</h3>
         <p>This section provides an overview of session stroage and persistence that complements the algorithms.</p>
         <p>If this object's <var title="true">session type</var> is not <code><a href="#idl-def-SessionType.persistent">"persistent"</a></code>, the user agent and CDM <em class="rfc2119" title="MUST NOT">MUST NOT</em> persist a record of or data related to the session at any point.
           This includes license(s), key(s), and the <a href="#session-id">Session Id</a>.
@@ -1449,10 +1499,10 @@
 
 
     <section id="htmlmediaelement-extensions">
-      <!--OddPage--><h2 role="heading" id="h2_htmlmediaelement-extensions"><span class="secno">4. </span><a href="#idl-def-HTMLMediaElement" class="idlType"><code>HTMLMediaElement</code></a> Extensions</h2>
+      <!--OddPage--><h2 role="heading" id="h2_htmlmediaelement-extensions"><span class="secno">6. </span><a href="#idl-def-HTMLMediaElement" class="idlType"><code>HTMLMediaElement</code></a> Extensions</h2>
       <p>This section specifies additions to and modifications of the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code> [<cite><a class="bibref" href="#bib-HTML5">HTML5</a></cite>] when the Encrypted Media Extensions are supported.</p>
   
-      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
+      <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes [<cite><a class="bibref" href="#bib-WebIDL">WebIDL</a></cite>] type mapping errors.</p>
       <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
   
       <pre class="idl"><span class="idlEnum" id="idl-def-MediaWaitingFor">enum <span class="idlEnumID">MediaWaitingFor</span> {
@@ -1472,13 +1522,13 @@
 <span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><a href="#idl-def-MediaWaitingFor" class="idlType"><code>MediaWaitingFor</code></a></span> <span class="idlAttrName"><a href="#widl-HTMLMediaElement-waitingFor">waitingFor</a></span>;</span>
 <span class="idlAttribute">                attribute <span class="idlAttrType">EventHandler</span>    <span class="idlAttrName"><a href="#widl-HTMLMediaElement-onencrypted">onencrypted</a></span>;</span>
 <span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span> <span class="idlMethName"><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a>?</span> <span class="idlParamName">mediaKeys</span></span>);</span>
-};</span></pre><section id="attributes-3"><h3 role="heading" id="h3_attributes-3"><span class="secno">4.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-HTMLMediaElement-mediaKeys"><code>mediaKeys</code> of type <span class="idlAttrType"><a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a></span>, readonly   , nullable</dt><dd>
+};</span></pre><section id="attributes-3"><h3 role="heading" id="h3_attributes-3"><span class="secno">6.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-HTMLMediaElement-mediaKeys"><code>mediaKeys</code> of type <span class="idlAttrType"><a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a></span>, readonly   , nullable</dt><dd>
           <p>The <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> being used when decrypting encrypted <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> for this media element.</p>
         </dd><dt id="widl-HTMLMediaElement-onencrypted"><code>onencrypted</code> of type <span class="idlAttrType">EventHandler</span>,            </dt><dd>
           <p>Event handler for the <code><a href="#dom-evt-encrypted">encrypted</a></code> event <em class="rfc2119" title="MUST">MUST</em> be supported by all HTMLMediaElements as both a content attribute and an IDL attribute.</p>
         </dd><dt id="widl-HTMLMediaElement-waitingFor"><code>waitingFor</code> of type <span class="idlAttrType"><a href="#idl-def-MediaWaitingFor" class="idlType"><code>MediaWaitingFor</code></a></span>, readonly   </dt><dd>
           <p>Indicates what the media element is waiting for, if anything (indicated by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-waiting">waiting</a></code> and <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-canplay">canplay</a></code> events). This is described in the <a href="#algorithms-encrypted-block">encrypted block encountered algorithm</a>.</p>
-        </dd></dl></section><section id="methods-2"><h3 role="heading" id="h3_methods-2"><span class="secno">4.2 </span>Methods</h3><dl class="methods"><dt id="widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys"><code>setMediaKeys</code></dt><dd>
+        </dd></dl></section><section id="methods-4"><h3 role="heading" id="h3_methods-4"><span class="secno">6.2 </span>Methods</h3><dl class="methods"><dt id="widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys"><code>setMediaKeys</code></dt><dd>
           <p>Provides the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> to use when decrypting media data during playback.</p>
       
           
@@ -1529,7 +1579,7 @@
           </ol></dd></dl></section>
   
       <section id="mediaencryptedevent">
-        <h3 role="heading" id="h3_mediaencryptedevent"><span class="secno">4.3 </span><a href="#idl-def-MediaEncryptedEvent" class="idlType"><code>MediaEncryptedEvent</code></a></h3>
+        <h3 role="heading" id="h3_mediaencryptedevent"><span class="secno">6.3 </span><a href="#idl-def-MediaEncryptedEvent" class="idlType"><code>MediaEncryptedEvent</code></a></h3>
         <p>The MediaEncryptedEvent object is used for the <code><a href="#dom-evt-encrypted">encrypted</a></code> event.</p>
         <p>Events are constructed as defined in <a href="http://dom.spec.whatwg.org/#constructing-events">Constructing events</a> [<cite><a class="bibref" href="#bib-DOM">DOM</a></cite>].</p>
   
@@ -1537,20 +1587,20 @@
 interface <span class="idlInterfaceID">MediaEncryptedEvent</span> : <span class="idlSuperclass">Event</span> {
 <span class="idlAttribute">    readonly    attribute <span class="idlAttrType">DOMString</span>    <span class="idlAttrName"><a href="#widl-MediaEncryptedEvent-initDataType">initDataType</a></span>;</span>
 <span class="idlAttribute">    readonly    attribute <span class="idlAttrType">ArrayBuffer?</span> <span class="idlAttrName"><a href="#widl-MediaEncryptedEvent-initData">initData</a></span>;</span>
-};</span></pre><section id="constructors-1"><h4 role="heading" id="h4_constructors-1"><span class="secno">4.3.1 </span>Constructors</h4><dl class="constructors"><dt id="widl-ctor-MediaEncryptedEvent--DOMString-type-MediaEncryptedEventInit-eventInitDict"><code>MediaEncryptedEvent</code></dt><dd>
+};</span></pre><section id="constructors-1"><h4 role="heading" id="h4_constructors-1"><span class="secno">6.3.1 </span>Constructors</h4><dl class="constructors"><dt id="widl-ctor-MediaEncryptedEvent--DOMString-type-MediaEncryptedEventInit-eventInitDict"><code>MediaEncryptedEvent</code></dt><dd>
   
-          <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">type</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr><tr><td class="prmName">eventInitDict</td><td class="prmType"><code><a href="#idl-def-MediaEncryptedEventInit" class="idlType"><code>MediaEncryptedEventInit</code></a></code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptTrue"><span role="img" aria-label="True">✔</span></td><td class="prmDesc"></td></tr></tbody></table></dd></dl></section><section id="attributes-4"><h4 role="heading" id="h4_attributes-4"><span class="secno">4.3.2 </span>Attributes</h4><dl class="attributes"><dt id="widl-MediaEncryptedEvent-initData"><code>initData</code> of type <span class="idlAttrType">ArrayBuffer</span>, readonly   , nullable</dt><dd>
+          <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">type</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr><tr><td class="prmName">eventInitDict</td><td class="prmType"><code><a href="#idl-def-MediaEncryptedEventInit" class="idlType"><code>MediaEncryptedEventInit</code></a></code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptTrue"><span role="img" aria-label="True">✔</span></td><td class="prmDesc"></td></tr></tbody></table></dd></dl></section><section id="attributes-4"><h4 role="heading" id="h4_attributes-4"><span class="secno">6.3.2 </span>Attributes</h4><dl class="attributes"><dt id="widl-MediaEncryptedEvent-initData"><code>initData</code> of type <span class="idlAttrType">ArrayBuffer</span>, readonly   , nullable</dt><dd>
             The <a href="#initialization-data">Initialization Data</a> for the event.
           </dd><dt id="widl-MediaEncryptedEvent-initDataType"><code>initDataType</code> of type <span class="idlAttrType">DOMString</span>, readonly   </dt><dd>
             Indicates the <a href="#initialization-data-type">Initialization Data Type</a> of the <a href="#initialization-data">Initialization Data</a> contained in the <code><a href="#widl-MediaEncryptedEventInit-initData">initData</a></code> attribute.
           </dd></dl></section>
   
         <section id="mediaencryptedeventinit">
-          <h4 role="heading" id="h4_mediaencryptedeventinit"><span class="secno">4.3.3 </span><a href="#idl-def-MediaEncryptedEventInit" class="idlType"><code>MediaEncryptedEventInit</code></a></h4>
+          <h4 role="heading" id="h4_mediaencryptedeventinit"><span class="secno">6.3.3 </span><a href="#idl-def-MediaEncryptedEventInit" class="idlType"><code>MediaEncryptedEventInit</code></a></h4>
           <pre class="idl"><span class="idlDictionary" id="idl-def-MediaEncryptedEventInit">dictionary <span class="idlDictionaryID">MediaEncryptedEventInit</span> : <span class="idlSuperclass">EventInit</span> {
 <span class="idlMember">    <span class="idlMemberType">DOMString</span>    <span class="idlMemberName"><a href="#widl-MediaEncryptedEventInit-initDataType">initDataType</a></span> = <span class="idlMemberValue">""</span>;</span>
 <span class="idlMember">    <span class="idlMemberType">ArrayBuffer?</span> <span class="idlMemberName"><a href="#widl-MediaEncryptedEventInit-initData">initData</a></span> = <span class="idlMemberValue">null</span>;</span>
-};</span></pre><section id="dictionary-mediaencryptedeventinit-members"><h5 role="heading" id="h5_dictionary-mediaencryptedeventinit-members"><span class="secno">4.3.3.1 </span>Dictionary <a class="idlType" href="#idl-def-MediaEncryptedEventInit"><code>MediaEncryptedEventInit</code></a> Members</h5><dl class="dictionary-members"><dt id="widl-MediaEncryptedEventInit-initData"><code>initData</code> of type <span class="idlMemberType">ArrayBuffer</span>, nullable, defaulting to <code>null</code></dt><dd>
+};</span></pre><section id="dictionary-mediaencryptedeventinit-members"><h5 role="heading" id="h5_dictionary-mediaencryptedeventinit-members"><span class="secno">6.3.3.1 </span>Dictionary <a class="idlType" href="#idl-def-MediaEncryptedEventInit"><code>MediaEncryptedEventInit</code></a> Members</h5><dl class="dictionary-members"><dt id="widl-MediaEncryptedEventInit-initData"><code>initData</code> of type <span class="idlMemberType">ArrayBuffer</span>, nullable, defaulting to <code>null</code></dt><dd>
               The <a href="#initialization-data">Initialization Data</a>.
             </dd><dt id="widl-MediaEncryptedEventInit-initDataType"><code>initDataType</code> of type <span class="idlMemberType">DOMString</span>, defaulting to <code>""</code></dt><dd>
               The <a href="#initialization-data-type">Initialization Data Type</a>.
@@ -1559,7 +1609,7 @@
       </section>
   
       <section id="htmlmediaelement-events" class="informative" typeof="bibo:Chapter" resource="#htmlmediaelement-events" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_htmlmediaelement-events"><span class="secno">4.4 </span>Event Summary</h3><p><em>This section is non-normative.</em></p>
+        <h3 role="heading" id="h3_htmlmediaelement-events"><span class="secno">6.4 </span>Event Summary</h3><p><em>This section is non-normative.</em></p>
     
         <table class="old-table">
           <thead>
@@ -1584,10 +1634,10 @@
       </section>
   
       <section id="htmlmediaelement-algorithms" typeof="bibo:Chapter" resource="#htmlmediaelement-algorithms" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_htmlmediaelement-algorithms"><span class="secno">4.5 </span>Algorithms</h3>
+        <h3 role="heading" id="h3_htmlmediaelement-algorithms"><span class="secno">6.5 </span>Algorithms</h3>
     
         <section id="algorithms-initdata-encountered" typeof="bibo:Chapter" resource="#algorithms-initdata-encountered" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_algorithms-initdata-encountered"><span class="secno">4.5.1 </span>Initialization Data Encountered</h4>
+          <h4 role="heading" id="h4_algorithms-initdata-encountered"><span class="secno">6.5.1 </span>Initialization Data Encountered</h4>
           <p>The following steps are run when the media element encounters <a href="#initialization-data">Initialization Data</a> in the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> during the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a>:</p>
       
           <ol>
@@ -1619,14 +1669,14 @@
         </section>
     
         <section id="algorithms-encrypted-block" typeof="bibo:Chapter" resource="#algorithms-encrypted-block" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_algorithms-encrypted-block"><span class="secno">4.5.2 </span>Encrypted Block Encountered</h4>
+          <h4 role="heading" id="h4_algorithms-encrypted-block"><span class="secno">6.5.2 </span>Encrypted Block Encountered</h4>
           <p>The following steps are run when the media element encounters a block of encrypted <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> during the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a>:</p>
       
           <ol>
             <li><p>If the media element's <code><a href="#widl-HTMLMediaElement-mediaKeys">mediaKeys</a></code> attribute is not null, run the following steps:</p>
               <ol>
                 <li><p>Let <var title="true">media keys</var> be the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object referenced by that atribute.</p></li>
-                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">initialization</a> of the <var title="true">media keys</var>.</p></li>
+                <li><p>Let <var title="true">cdm</var> be the CDM loaded during the <a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">initialization</a> of the <var title="true">media keys</var>.</p></li>
                 <li><p>If there is at least one <code><a href="#idl-def-MediaKeySession">MediaKeySession</a></code> created by the <var title="true">media keys</var> on which the <a href="#algorithms-session-close">session close algorithm</a> has not been run, run the following steps:</p>
                   <div class="note"><div class="note-title" aria-level="3" role="heading" id="h_note_38"><span>Note</span></div><p class="">This check ensures the <var title="true">cdm</var> has finished loading and is a prequisite for a matching key being available.</p></div>
                   <ol>
@@ -1665,7 +1715,7 @@
                           </dd>
                           <dt>If any of the <var title="true">available keys</var> corresponds to the <var title="">block key ID</var> and is unusable</dt>
                           <dd>
-                            <div class="issue"><div class="issue-title" aria-level="3" role="heading" id="h_issue_3"><span>Issue 3</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=26372">Bug 26372</a> - It is TBD whether anything should happen in this case.</p></div>
+                            <div class="issue"><div class="issue-title" aria-level="3" role="heading" id="h_issue_4"><span>Issue 4</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=26372">Bug 26372</a> - It is TBD whether anything should happen in this case.</p></div>
                           </dd>
                           </dl>
                           <div class="note"><div class="note-title" aria-level="3" role="heading" id="h_note_43"><span>Note</span></div><p class="">Otherwise, there is no key for the <var title="true">block key ID</var> in any session so continue.</p></div>
@@ -1705,7 +1755,7 @@
         </section>
     
         <section id="algorithms-queue-waiting" typeof="bibo:Chapter" resource="#algorithms-queue-waiting" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_algorithms-queue-waiting"><span class="secno">4.5.3 </span>Queue a "waiting" Event</h4>
+          <h4 role="heading" id="h4_algorithms-queue-waiting"><span class="secno">6.5.3 </span>Queue a "waiting" Event</h4>
           <p>The Queue a "waiting" Event algorithm is run when the CDM needs to queue a waiting event to a <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code> object.
           Requests to run this algorithm include a target <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code> object.
           </p>
@@ -1723,7 +1773,7 @@
         </section>
     
         <section id="algorithms-resume-playback" typeof="bibo:Chapter" resource="#algorithms-resume-playback" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_algorithms-resume-playback"><span class="secno">4.5.4 </span>Attempt to Resume Playback If Necessary</h4>
+          <h4 role="heading" id="h4_algorithms-resume-playback"><span class="secno">6.5.4 </span>Attempt to Resume Playback If Necessary</h4>
           <p>The Attempt to Resume Playback If Necessary algorithm is run when one or more keys becomes available.
           If playback is blocked waiting for a key, it resumes playback if a necessary key has been provided.
           Requests to run this algorithm include a target <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code> object.
@@ -1745,7 +1795,7 @@
         </section>
     
         <section id="htmlmediaelement-playing-the-media-resource" typeof="bibo:Chapter" resource="#htmlmediaelement-playing-the-media-resource" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_htmlmediaelement-playing-the-media-resource"><span class="secno">4.5.5 </span>Playing the Media Resource Algorithm Modifications</h4>
+          <h4 role="heading" id="h4_htmlmediaelement-playing-the-media-resource"><span class="secno">6.5.5 </span>Playing the Media Resource Algorithm Modifications</h4>
           <p>The following steps are added to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">readyState</a></code> change algorithms in <a href="http://www.w3.org/TR/html5/embedded-content-0.html#playing-the-media-resource">Playing the media resource</a>:</p>
           <ul>
             <li>If a <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">readyState</a></code> change queues a task to fire a <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-waiting">waiting</a></code> event, the user agent <em class="rfc2119" title="MUST">MUST</em> also set the <code><a href="#widl-HTMLMediaElement-waitingFor">waitingFor</a></code> attribute on the Media Element to <code><a href="#idl-def-MediaWaitingFor.data">"data"</a></code>.</li>
@@ -1755,7 +1805,7 @@
       </section>
 
       <section id="media-element-restictions" class="informative" typeof="bibo:Chapter" resource="#media-element-restictions" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_media-element-restictions"><span class="secno">4.6 </span>Media Element Restrictions</h3><p><em>This section is non-normative.</em></p>
+        <h3 role="heading" id="h3_media-element-restictions"><span class="secno">6.6 </span>Media Element Restrictions</h3><p><em>This section is non-normative.</em></p>
         <p>Media data processed by a CDM <em class="rfc2119" title="MAY">MAY</em> be unavailable through Javascript APIs in the usual way (for example using the CanvasRenderingContext2D drawImage() method and the AudioContext MediaElementAudioSourceNode).
         This specification does not define conditions for such non-availability of media data, however, if media data is not available to Javascript APIs then these APIs <em class="rfc2119" title="MAY">MAY</em> behave as if no media data was present at all.</p>
         <p>Where media rendering is not performed by the UA, for example in the case of a hardware protected media pipeline, then the full set of HTML rendering capabilities, for example CSS Transforms, <em class="rfc2119" title="MAY">MAY</em> be unavailable. One likely restriction is that
@@ -1765,7 +1815,7 @@
 
 
     <section id="common-key-systems" typeof="bibo:Chapter" resource="#common-key-systems" rel="bibo:Chapter">
-      <!--OddPage--><h2 role="heading" id="h2_common-key-systems"><span class="secno">5. </span>Common Key Systems</h2>
+      <!--OddPage--><h2 role="heading" id="h2_common-key-systems"><span class="secno">7. </span>Common Key Systems</h2>
       <p>All user agents <em class="rfc2119" title="MUST">MUST</em> support the common key systems described in this section.</p><p>
       </p><div class="note"><div class="note-title" aria-level="1" role="heading" id="h_note_46"><span>Note</span></div><p class="">This ensures that there is a common baseline level of protection that is guaranteed to be supported in all user agents, including those that are entirely open source.
         Thus, content providers that need only basic protection can build simple applications that will work on all platforms without needing to work with any content protection providers.
@@ -1773,25 +1823,25 @@
   
       <span id="simple-decryption-clear-key"></span> <!-- Legacy anchor name. -->
       <section id="clear-key" typeof="bibo:Chapter" resource="#clear-key" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_clear-key"><span class="secno">5.1 </span>Clear Key</h3>
+        <h3 role="heading" id="h3_clear-key"><span class="secno">7.1 </span>Clear Key</h3>
         <p>The <code>"org.w3.clearkey"</code> <a href="#key-system">Key System</a> uses plain-text clear (unencrypted) key(s) to decrypt the source.
         No additional client-side content protection is required.
         This Key System is described below.
         </p>
         
         <section id="clear-key-capabilities" typeof="bibo:Chapter" resource="#clear-key-capabilities" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_clear-key-capabilities"><span class="secno">5.1.1 </span>Capabilities</h4>
+          <h4 role="heading" id="h4_clear-key-capabilities"><span class="secno">7.1.1 </span>Capabilities</h4>
           <p>The following describe how Clear Key supports key system-specific capabilities:</p>
           <ul>
             <li><p>The <code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys()</a></code> method: Implementations <em class="rfc2119" title="MAY">MAY</em> support associating the <code><a href="#idl-def-MediaKeys">MediaKeys</a></code> object with more than one <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code>.</p></li>
             <li><p>The <code><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate()</a></code> method: Not supported.</p></li>
-            <li><p>The <code><a href="#widl-MediaKeys-isTypeSupported-IsTypeSupportedResult-DOMstring-keySystem-DOMString-initDataType-DOMString-contentType-DOMString-capability">isTypeSupported()</a></code> method: There are no supported <var title="true">capability</var> values.</p></li>
+            <li><p>The <a href="#idl-def-MediaKeySystemOptions" class="idlType"><code>MediaKeySystemOptions</code></a>: There are no supported capability values.</p></li>
             <li><p>The <code><a href="#idl-def-SessionType.persistent">"persistent"</a></code> <code><a href="#idl-def-SessionType">SessionType</a></code>: Implementations <em class="rfc2119" title="MAY">MAY</em> support this type.</p></li>
           </ul>
         </section>
     
         <section id="clear-key-behavior" typeof="bibo:Chapter" resource="#clear-key-behavior" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_clear-key-behavior"><span class="secno">5.1.2 </span>Behavior</h4>
+          <h4 role="heading" id="h4_clear-key-behavior"><span class="secno">7.1.2 </span>Behavior</h4>
           <p>The following describe how Clear Key implements key system-specific behaviors:</p>
           <ul>
             <li><p>In the <code><a href="#widl-MediaKeySession-generateRequest-Promise-void--DOMString-initDataType-ArrayBuffer-ArrayBufferView-initData">generateRequest()</a></code> algorithm:</p>
@@ -1817,7 +1867,7 @@
         </section>
     
         <section id="clear-key-request-format" typeof="bibo:Chapter" resource="#clear-key-request-format" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_clear-key-request-format"><span class="secno">5.1.3 </span>License Request Format</h4>
+          <h4 role="heading" id="h4_clear-key-request-format"><span class="secno">7.1.3 </span>License Request Format</h4>
           <p>This section describes the format of the license request provided to the application via the <code><a href="#widl-MediaKeyMessageEvent-message">message</a></code> attribute of the <code><a href="#dom-evt-message">message</a></code> event.</p>
           
           <p>The format is a JSON object containing the following members:</p>
@@ -1833,7 +1883,7 @@
           </p>
       
           <section id="clear-key-request-format-example" class="informative" typeof="bibo:Chapter" resource="#clear-key-request-format-example" rel="bibo:Chapter">
-            <h5 role="heading" id="h5_clear-key-request-format-example"><span class="secno">5.1.3.1 </span>Example</h5><p><em>This section is non-normative.</em></p>
+            <h5 role="heading" id="h5_clear-key-request-format-example"><span class="secno">7.1.3.1 </span>Example</h5><p><em>This section is non-normative.</em></p>
             <p>The following example is a license request for a temporary license for two key IDs. (Line breaks are for readability only.)</p>
             <div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example highlight prettyprint prettyprinted"><span class="pun">{</span><span class="pln">
   </span><span class="str">"kids"</span><span class="pun">:</span><span class="pln"> 
@@ -1847,7 +1897,7 @@
         </section>
     
         <section id="clear-key-license-format" typeof="bibo:Chapter" resource="#clear-key-license-format" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_clear-key-license-format"><span class="secno">5.1.4 </span>License Format</h4>
+          <h4 role="heading" id="h4_clear-key-license-format"><span class="secno">7.1.4 </span>License Format</h4>
           <p>This section describes the format of the license to be provided via the <var title="true">response</var> parameter of the <code><a href="#widl-MediaKeySession-update-Promise-void--ArrayBuffer-ArrayBufferView-response">update()</a></code> method.</p>
       
           <p>The format is a JSON Web Key (JWK) Set containing representation of the symmetric key to be used for decryption, as defined in the JSON Web Key (JWK) specification [<cite><a class="bibref" href="#bib-JWK">JWK</a></cite>].</p>
@@ -1874,7 +1924,7 @@
           </p>
       
           <section id="clear-key-license-format-example" class="informative" typeof="bibo:Chapter" resource="#clear-key-license-format-example" rel="bibo:Chapter">
-            <h5 role="heading" id="h5_clear-key-license-format-example"><span class="secno">5.1.4.1 </span>Example</h5><p><em>This section is non-normative.</em></p>
+            <h5 role="heading" id="h5_clear-key-license-format-example"><span class="secno">7.1.4.1 </span>Example</h5><p><em>This section is non-normative.</em></p>
             <p>The following example is a JWK Set containing a single symmetric key. (Line breaks are for readability only.)</p>
             <div class="example"><div class="example-title"><span>Example 2</span></div><pre class="example highlight prettyprint prettyprinted"><span class="pun">{</span><span class="pln">
   </span><span class="str">"keys"</span><span class="pun">:</span><span class="pln"> 
@@ -1890,7 +1940,7 @@
         </section>
     
         <section id="using-base64url" class="informative" typeof="bibo:Chapter" resource="#using-base64url" rel="bibo:Chapter">
-          <h4 role="heading" id="h4_using-base64url"><span class="secno">5.1.5 </span>Using base64url</h4><p><em>This section is non-normative.</em></p>
+          <h4 role="heading" id="h4_using-base64url"><span class="secno">7.1.5 </span>Using base64url</h4><p><em>This section is non-normative.</em></p>
           <p>For more information on base64url and working with it, see the "Base64url Encoding" terminology definition and "Notes on implementing base64url encoding without padding" in [<cite><a class="bibref" href="#bib-JWS">JWS</a></cite>].
             Specifically, there is no '=' padding, and the characters '-' and '_' <em class="rfc2119" title="MUST">MUST</em> be used instead of '+' and '/', respectively.
           </p>
@@ -1900,7 +1950,7 @@
 
 
     <section id="security" class="informative" typeof="bibo:Chapter" resource="#security" rel="bibo:Chapter">
-      <!--OddPage--><h2 role="heading" id="h2_security"><span class="secno">6. </span>Security Considerations</h2><p><em>This section is non-normative.</em></p>
+      <!--OddPage--><h2 role="heading" id="h2_security"><span class="secno">8. </span>Security Considerations</h2><p><em>This section is non-normative.</em></p>
   
       <p>User Agent and Key System implementations must consider <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>, <a href="#initialization-data">Initialization Data</a>, responses (i.e. data passed to <code><a href="#widl-MediaKeySession-update-Promise-void--ArrayBuffer-ArrayBufferView-response">update()</a></code>), licenses, key data, and all other data provided by the application as untrusted content and potential attack vectors.
       They must use appropriate safeguards to mitigate any associated threats and take care to safely parse, decrypt, etc. such data.
@@ -1926,23 +1976,23 @@
 
 
     <section id="privacy" class="informative" typeof="bibo:Chapter" resource="#privacy" rel="bibo:Chapter">
-      <!--OddPage--><h2 role="heading" id="h2_privacy"><span class="secno">7. </span>Privacy Considerations</h2><p><em>This section is non-normative.</em></p>
+      <!--OddPage--><h2 role="heading" id="h2_privacy"><span class="secno">9. </span>Privacy Considerations</h2><p><em>This section is non-normative.</em></p>
   
       <p>The presence or use of Key Systems on a user's device raises a number of privacy issues, falling into two categories: (a) user-specific information that may be disclosed by the EME interface itself, or within messages from Key Systems and (b) user-specific information that may be persistently stored on the users device.</p>
       <p>User Agents should take responsibility for providing users with adequate control over their own privacy. Since User Agents may integrate with third party CDM implementations, CDM implementers must provide sufficient information and controls to user agent implementers to enable them to implement appropriate techniques to ensure users have control over their privacy, including but not limited to the techniques described below.</p>
   
       <section id="privacy-disclosure" typeof="bibo:Chapter" resource="#privacy-disclosure" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_privacy-disclosure"><span class="secno">7.1 </span>Information Disclosed by EME and Key Systems</h3>
+        <h3 role="heading" id="h3_privacy-disclosure"><span class="secno">9.1 </span>Information Disclosed by EME and Key Systems</h3>
         <p>Concerns regarding information disclosed by EME and Key Systems fall into two categories, concerns about non-specific information that may nevertheless contribute to the possibility of fingerprinting a user agent or device and user-specific information that may be used directly for user tracking.</p>
       </section>
   
       <section id="privacy-fingerprinting" typeof="bibo:Chapter" resource="#privacy-fingerprinting" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_privacy-fingerprinting"><span class="secno">7.2 </span>Fingerprinting</h3>
+        <h3 role="heading" id="h3_privacy-fingerprinting"><span class="secno">9.2 </span>Fingerprinting</h3>
         <p>Malicious applications may be able to fingerprint users or user agents by detecting or enumerating the list of Key Systems that are supported and related information. If proper origin protections are not provided this could include detection of sites that have been visited and information stored for those sites. In particular, Key Systems should not share key or other data between origins.</p>
       </section>
   
       <section id="privacy-leakage" typeof="bibo:Chapter" resource="#privacy-leakage" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_privacy-leakage"><span class="secno">7.3 </span>Information Leakage</h3>
+        <h3 role="heading" id="h3_privacy-leakage"><span class="secno">9.3 </span>Information Leakage</h3>
         <p>CDMs, especially those implemented outside the user agent, may not have the same fundamental isolations as the web platform.
         It is important that steps be taken to avoid information leakage, especially across origins.
         This includes both in-memory and stored data.
@@ -1962,7 +2012,7 @@
       </section>
   
       <section id="privacy-tracking" typeof="bibo:Chapter" resource="#privacy-tracking" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_privacy-tracking"><span class="secno">7.4 </span>Tracking</h3>
+        <h3 role="heading" id="h3_privacy-tracking"><span class="secno">9.4 </span>Tracking</h3>
         <p>User-specific information may be obtained over the EME API in two ways: through detection of stored keys and through Key System messages.</p>
     
         <p>Key Systems may access or create persistent or semi-persistent identifiers for a device or user of a device. In some cases these identifiers may be bound to a specific device in a secure manner. If these identifiers are present in Key System messages, then devices and/or users may be tracked. If the mitigations below are not applied this could include both tracking of users / devices over time and associating multiple users of a given device. If not mitigated, such tracking may take three forms depending on the design of the Key System:</p>
@@ -2014,7 +2064,7 @@
       </section>
   
       <section id="privacy-storedinfo" typeof="bibo:Chapter" resource="#privacy-storedinfo" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_privacy-storedinfo"><span class="secno">7.5 </span>Information Stored on User Devices</h3>
+        <h3 role="heading" id="h3_privacy-storedinfo"><span class="secno">9.5 </span>Information Stored on User Devices</h3>
         <p>Key Systems may store information on a user's device, or user agents may store information on behalf of Key Systems. Potentially, this could reveal information about a user to another user of the same device, including potentially the origins that have used a particular Key System (i.e. sites visited) or even the content that has been decrypted using a Key System.</p>
         <p>If information stored by one origin affects the operation of the Key System for another origin, then potentially the sites visited or content viewed by a user on one site may be revealed to another, potentially malicious, site.</p>
         <p>There are a number of techniques that can be used to mitigate these privacy risk to users:</p>
@@ -2043,7 +2093,7 @@
       </section>
   
       <section id="privacy-secureorigin" typeof="bibo:Chapter" resource="#privacy-secureorigin" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_privacy-secureorigin"><span class="secno">7.6 </span>Use Secure Origin and Transport</h3>
+        <h3 role="heading" id="h3_privacy-secureorigin"><span class="secno">9.6 </span>Use Secure Origin and Transport</h3>
         <p>In order to protect identifiers and other information discussed in previous sections, user agents may choose to only support the EME APIs and/or specific Key Systems (i.e. based on privacy and security risks) on secure origins.
         This is especially important if a user agent chooses to support a Key System implementation that exposes identifiers or other such information without effectively anonymizing it in transit (i.e. without <a href="#identifier-encryption">encrypting identifiers</a>).
         </p>
@@ -2054,7 +2104,7 @@
     </section>
 
     <section id="examples" class="informative" typeof="bibo:Chapter" resource="#examples" rel="bibo:Chapter">
-      <!--OddPage--><h2 role="heading" id="h2_examples"><span class="secno">8. </span>Examples</h2><p><em>This section is non-normative.</em></p>
+      <!--OddPage--><h2 role="heading" id="h2_examples"><span class="secno">10. </span>Examples</h2><p><em>This section is non-normative.</em></p>
       <p>This section contains example solutions for various use cases using the proposed extensions.
       These are not the only solutions to these use cases.
       Video elements are used in the examples, but the same would apply to all media elements.
@@ -2062,7 +2112,7 @@
       </p>
   
       <section id="example-source-and-key-known" typeof="bibo:Chapter" resource="#example-source-and-key-known" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_example-source-and-key-known"><span class="secno">8.1 </span>Source and Key Known at Page Load (Clear Key)</h3>
+        <h3 role="heading" id="h3_example-source-and-key-known"><span class="secno">10.1 </span>Source and Key Known at Page Load (Clear Key)</h3>
         <p class="exampledescription">In this simple example, the source file and <a href="#clear-key">clear-text license</a> are hard-coded in the page.
         Only one session will ever be created.</p>
     
@@ -2071,28 +2121,32 @@
     </span><span class="kwd">var</span><span class="pln"> video </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">"video"</span><span class="pun">);</span><span class="pln">
 
     </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!</span><span class="pln">video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-mediaKeys">mediaKeys</a></code><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-      </span><span class="kwd">var</span><span class="pln"> promise </span><span class="pun">=</span><span class="pln"> </span><code><a href="#idl-def-MediaKeys">MediaKeys</a></code><span class="pun">.</span><code><a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">create</a></code><span class="pun">(</span><span class="str">"org.w3.clearkey"</span><span class="pun">);</span><span class="pln">
-      promise</span><span class="pun">.</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
-        console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create MediaKeys"</span><span class="pun">)</span><span class="pln">
-      </span><span class="pun">);</span><span class="pln">
-      promise</span><span class="pun">.</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
-        </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-          </span><span class="kwd">return</span><span class="pln"> video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></code><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">);</span><span class="pln">
+      navigator</span><span class="pun">.</span><code><a href="#widl-Navigator-requestMediaKeySystemAccess-Promise-MediaKeySystemAccess--DOMString-keySystem-Sequence-MediaKeySystemOptions--supportedConfigurations">requestMediaKeySystemAccess</a></code><span class="pun">(</span><span class="str">"org.w3.clearkey"</span><span class="pun">).</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+        </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">keySystemAccess</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+          </span><span class="kwd">var</span><span class="pln"> promise </span><span class="pun">=</span><span class="pln">  keySystemAccess</span><span class="pun">.</span><code><a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">createMediaKeys</a></code><span class="pun">();</span><span class="pln">
+          promise</span><span class="pun">.</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
+            console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create MediaKeys"</span><span class="pun">)</span><span class="pln">
+          </span><span class="pun">);</span><span class="pln">
+          promise</span><span class="pun">.</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+            </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+              </span><span class="kwd">return</span><span class="pln"> video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></code><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">);</span><span class="pln">
+            </span><span class="pun">}</span><span class="pln">
+          </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
+            console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to set MediaKeys"</span><span class="pun">)</span><span class="pln">
+          </span><span class="pun">);</span><span class="pln">
+          promise</span><span class="pun">.</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+            </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+              </span><span class="kwd">var</span><span class="pln"> initData </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">Uint8Array</span><span class="pun">([</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">]);</span><span class="pln">
+              </span><span class="kwd">var</span><span class="pln"> keySession </span><span class="pun">=</span><span class="pln"> createdMediaKeys</span><span class="pun">.</span><code><a href="#widl-MediaKeys-createSession-MediaKeySession-SessionType-sessionType">createSession</a></code><span class="pun">();</span><span class="pln">
+              keySession</span><span class="pun">.</span><span class="pln">addEventListener</span><span class="pun">(</span><span class="str">"</span><code><a href="#dom-evt-message">message</a></code><span class="str">"</span><span class="pun">,</span><span class="pln"> handleMessage</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span><span class="pln">
+              </span><span class="kwd">return</span><span class="pln"> keySession</span><span class="pun">.</span><code><a href="#widl-MediaKeySession-generateRequest-Promise-void--DOMString-initDataType-ArrayBuffer-ArrayBufferView-initData">generateRequest</a></code><span class="pun">(</span><span class="str">"webm"</span><span class="pun">,</span><span class="pln"> initData</span><span class="pun">);</span><span class="pln">
+            </span><span class="pun">}</span><span class="pln">
+          </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
+            console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create or initialize key session"</span><span class="pun">)</span><span class="pln">
+          </span><span class="pun">);</span><span class="pln">
         </span><span class="pun">}</span><span class="pln">
-      </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
-        console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to set MediaKeys"</span><span class="pun">)</span><span class="pln">
-      </span><span class="pun">);</span><span class="pln">
-      promise</span><span class="pun">.</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
-        </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-          </span><span class="kwd">var</span><span class="pln"> initData </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">Uint8Array</span><span class="pun">([</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">]);</span><span class="pln">
-          </span><span class="kwd">var</span><span class="pln"> keySession </span><span class="pun">=</span><span class="pln"> createdMediaKeys</span><span class="pun">.</span><code><a href="#widl-MediaKeys-createSession-MediaKeySession-SessionType-sessionType">createSession</a></code><span class="pun">();</span><span class="pln">
-          keySession</span><span class="pun">.</span><span class="pln">addEventListener</span><span class="pun">(</span><span class="str">"</span><code><a href="#dom-evt-message">message</a></code><span class="str">"</span><span class="pun">,</span><span class="pln"> handleMessage</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span><span class="pln">
-          </span><span class="kwd">return</span><span class="pln"> keySession</span><span class="pun">.</span><code><a href="#widl-MediaKeySession-generateRequest-Promise-void--DOMString-initDataType-ArrayBuffer-ArrayBufferView-initData">generateRequest</a></code><span class="pun">(</span><span class="str">"webm"</span><span class="pun">,</span><span class="pln"> initData</span><span class="pun">);</span><span class="pln">
-        </span><span class="pun">}</span><span class="pln">
-      </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
-        console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create or initialize key session"</span><span class="pun">)</span><span class="pln">
-      </span><span class="pun">);</span><span class="pln">
-    </span><span class="pun">}</span><span class="pln">
+      </span><span class="pun">}</span><span class="pln">
+    </span><span class="pun">);</span><span class="pln">
   </span><span class="pun">}</span><span class="pln">
 
   </span><span class="kwd">function</span><span class="pln"> handleMessage</span><span class="pun">(</span><span class="pln">event</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
@@ -2111,8 +2165,8 @@
       </section>
   
       <section id="example-selecting-key-system" typeof="bibo:Chapter" resource="#example-selecting-key-system" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_example-selecting-key-system"><span class="secno">8.2 </span>Selecting a Supported Key System and Using Initialization Data from the "encrypted" Event</h3>
-        <p class="exampledescription">This example selects a supported <a href="#key-system">Key System</a> using the <code><a href="#widl-MediaKeys-isTypeSupported-IsTypeSupportedResult-DOMstring-keySystem-DOMString-initDataType-DOMString-contentType-DOMString-capability">isTypeSupported()</a></code> method then uses
+        <h3 role="heading" id="h3_example-selecting-key-system"><span class="secno">10.2 </span>Selecting a Supported Key System and Using Initialization Data from the "encrypted" Event</h3>
+        <p class="exampledescription">This example selects a supported <a href="#key-system">Key System</a> using the <code><a href="#widl-Navigator-requestMediaKeySystemAccess-Promise-MediaKeySystemAccess--DOMString-keySystem-Sequence-MediaKeySystemOptions--supportedConfigurations">requestMediaKeySystemAccess()</a></code> method then uses
         the <a href="#initialization-data">Initialization Data</a> from the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> to generate the license request and send it to the appropriate license server.
         One of the supported key systems uses a serverCertificate, which is provided proactively.
         </p>
@@ -2122,42 +2176,67 @@
   </span><span class="kwd">var</span><span class="pln"> licenseUrl</span><span class="pun">;</span><span class="pln">
   </span><span class="kwd">var</span><span class="pln"> serverCertificate</span><span class="pun">;</span><span class="pln">
 
+  </span><span class="com">// TODO: The structure of the original example makes this overly complex. Fix this.</span><span class="pln">
   </span><span class="kwd">function</span><span class="pln"> selectKeySystem</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-    </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><code><a href="#idl-def-MediaKeys">MediaKeys</a></code><span class="pun">.</span><code><a href="#widl-MediaKeys-isTypeSupported-IsTypeSupportedResult-DOMstring-keySystem-DOMString-initDataType-DOMString-contentType-DOMString-capability">isTypeSupported</a></code><span class="pun">(</span><span class="str">"com.example.somesystem"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"webm"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"video/webm; codecs='vp8, vorbis'"</span><span class="pun">))</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-      licenseUrl </span><span class="pun">=</span><span class="pln"> </span><span class="str">"https://license.example.com/getkey"</span><span class="pun">;</span><span class="pln"> </span><span class="com">// OR "https://example.&lt;My Video Site domain&gt;"</span><span class="pln">
-      keySystem </span><span class="pun">=</span><span class="pln"> </span><span class="str">"com.example.somesystem"</span><span class="pun">;</span><span class="pln">
-      serverCertificate </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">Uint8Array</span><span class="pun">([</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">]);</span><span class="pln">
-    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><code><a href="#idl-def-MediaKeys">MediaKeys</a></code><span class="pun">.</span><code><a href="#widl-MediaKeys-isTypeSupported-IsTypeSupportedResult-DOMstring-keySystem-DOMString-initDataType-DOMString-contentType-DOMString-capability">isTypeSupported</a></code><span class="pun">(</span><span class="str">"com.foobar"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"webm"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"video/webm; codecs='vp8, vorbis'"</span><span class="pun">))</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-      licenseUrl </span><span class="pun">=</span><span class="pln"> </span><span class="str">"https://license.foobar.com/request"</span><span class="pun">;</span><span class="pln">
-      keySystem </span><span class="pun">=</span><span class="pln"> </span><span class="str">"com.foobar"</span><span class="pun">;</span><span class="pln">
-    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-      </span><span class="kwd">throw</span><span class="pln"> </span><span class="str">"Key System not supported"</span><span class="pun">;</span><span class="pln">
-    </span><span class="pun">}</span><span class="pln">
+    someSystemOptions </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[</span><span class="pln">
+     </span><span class="pun">{</span><span class="pln"> </span><code><a href="#widl-MediaKeySystemOptions-videoType">videoType</a></code><span class="pun">:</span><span class="pln"> </span><span class="str">"webm"</span><span class="pun">,</span><span class="pln">
+       </span><code><a href="#widl-MediaKeySystemOptions-videoType">videoType</a></code><span class="pun">:</span><span class="pln"> </span><span class="str">"video/webm; codecs='vp8, vorbis'"</span><span class="pln">
+     </span><span class="pun">}</span><span class="pln">
+    </span><span class="pun">];</span><span class="pln">
+    fooOptions </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[</span><span class="pln">
+     </span><span class="pun">{</span><span class="pln"> </span><code><a href="#widl-MediaKeySystemOptions-initDataType">initDataType</a></code><span class="pun">:</span><span class="pln"> </span><span class="str">"webm"</span><span class="pun">,</span><span class="pln">
+       </span><code><a href="#widl-MediaKeySystemOptions-videoType">videoType</a></code><span class="pun">:</span><span class="pln"> </span><span class="str">"video/webm; codecs='vp8, vorbis'"</span><span class="pln">
+     </span><span class="pun">}</span><span class="pln">
+    </span><span class="pun">];</span><span class="pln">
+  
+    navigator</span><span class="pun">.</span><code><a href="#widl-Navigator-requestMediaKeySystemAccess-Promise-MediaKeySystemAccess--DOMString-keySystem-Sequence-MediaKeySystemOptions--supportedConfigurations">requestMediaKeySystemAccess</a></code><span class="pun">(</span><span class="str">"com.example.somesystem"</span><span class="pun">,</span><span class="pln"> someSystemOptions</span><span class="pun">).</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+      </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">keySystemAccess</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+        licenseUrl </span><span class="pun">=</span><span class="pln"> </span><span class="str">"https://license.example.com/getkey"</span><span class="pun">;</span><span class="pln"> </span><span class="com">// OR "https://example.&lt;My Video Site domain&gt;"</span><span class="pln">
+        keySystem </span><span class="pun">=</span><span class="pln"> </span><span class="str">"com.example.somesystem"</span><span class="pun">;</span><span class="pln">
+        serverCertificate </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">Uint8Array</span><span class="pun">([</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">]);</span><span class="pln">
+        promise </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">Promise</span><span class="pun">();</span><span class="pln">
+        promise</span><span class="pun">.</span><span class="pln">resolve</span><span class="pun">(</span><span class="pln">keySystemAccess</span><span class="pun">);</span><span class="pln"> 
+        </span><span class="kwd">return</span><span class="pln"> promise</span><span class="pun">;</span><span class="pln">
+      </span><span class="pun">}</span><span class="pln">
+    </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
+      </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">error</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+        </span><span class="com">// Try the next key system.</span><span class="pln">
+        navigator</span><span class="pun">.</span><code><a href="#widl-Navigator-requestMediaKeySystemAccess-Promise-MediaKeySystemAccess--DOMString-keySystem-Sequence-MediaKeySystemOptions--supportedConfigurations">requestMediaKeySystemAccess</a></code><span class="pun">(</span><span class="str">"com.foobar"</span><span class="pun">,</span><span class="pln"> fooOptions</span><span class="pun">).</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+          </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">keySystemAccess</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+          licenseUrl </span><span class="pun">=</span><span class="pln"> </span><span class="str">"https://license.foobar.com/request"</span><span class="pun">;</span><span class="pln">
+          keySystem </span><span class="pun">=</span><span class="pln"> </span><span class="str">"com.foobar"</span><span class="pun">;</span><span class="pln">
+          promise </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">Promise</span><span class="pun">();</span><span class="pln">
+          promise</span><span class="pun">.</span><span class="pln">resolve</span><span class="pun">(</span><span class="pln">keySystemAccess</span><span class="pun">);</span><span class="pln"> 
+          </span><span class="kwd">return</span><span class="pln"> promise</span><span class="pun">;</span><span class="pln">
+    </span><span class="pun">);</span><span class="pln"> </span><span class="com">// Do not catch - let the caller handle the failure.</span><span class="pln">
   </span><span class="pun">}</span><span class="pln">
 
   </span><span class="kwd">function</span><span class="pln"> handleInitData</span><span class="pun">(</span><span class="pln">event</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
     </span><span class="kwd">var</span><span class="pln"> video </span><span class="pun">=</span><span class="pln"> event</span><span class="pun">.</span><span class="pln">target</span><span class="pun">;</span><span class="pln">
     </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">video</span><span class="pun">.</span><span class="pln">mediaKeysObject </span><span class="pun">===</span><span class="pln"> </span><span class="kwd">undefined</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-      selectKeySystem</span><span class="pun">();</span><span class="pln">
       video</span><span class="pun">.</span><span class="pln">mediaKeysObject </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">null</span><span class="pun">;</span><span class="pln"> </span><span class="com">// Prevent entering this path again.</span><span class="pln">
-      video</span><span class="pun">.</span><span class="pln">pendingSessionData </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[];</span><span class="pln"> </span><span class="com">// Will store all initData until the MediaKeys is ready.</span><span class="pln">
-      </span><code><a href="#idl-def-MediaKeys">MediaKeys</a></code><span class="pun">.</span><code><a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">create</a></code><span class="pun">(</span><span class="pln">keySystem</span><span class="pun">).</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
-        </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-          video</span><span class="pun">.</span><span class="pln">mediaKeysObject </span><span class="pun">=</span><span class="pln"> createdMediaKeys</span><span class="pun">;</span><span class="pln">
-
-          </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">)</span><span class="pln">
-            createdMediaKeys</span><span class="pun">.</span><code><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></code><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">);</span><span class="pln">
-
-          </span><span class="kwd">for</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> video</span><span class="pun">.</span><span class="pln">pendingSessionData</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-            </span><span class="kwd">var</span><span class="pln"> data </span><span class="pun">=</span><span class="pln"> video</span><span class="pun">.</span><span class="pln">pendingSessionData</span><span class="pun">[</span><span class="pln">i</span><span class="pun">];</span><span class="pln">
-            makeNewRequest</span><span class="pun">(</span><span class="pln">video</span><span class="pun">.</span><span class="pln">mediaKeysObject</span><span class="pun">,</span><span class="pln"> data</span><span class="pun">.</span><span class="pln">initDataType</span><span class="pun">,</span><span class="pln"> data</span><span class="pun">.</span><span class="pln">initData</span><span class="pun">);</span><span class="pln">
-          </span><span class="pun">}</span><span class="pln">
-          video</span><span class="pun">.</span><span class="pln">pendingSessionData </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[];</span><span class="pln">
-
-          </span><span class="kwd">return</span><span class="pln"> video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></code><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">);</span><span class="pln">
+      selectKeySystem</span><span class="pun">().</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+        </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">keySystemAccess</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+          video</span><span class="pun">.</span><span class="pln">pendingSessionData </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[];</span><span class="pln"> </span><span class="com">// Will store all initData until the MediaKeys is ready.</span><span class="pln">
+          keySystemAccess</span><span class="pun">.</span><code><a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">createMediaKeys</a></code><span class="pun">().</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+            </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+              video</span><span class="pun">.</span><span class="pln">mediaKeysObject </span><span class="pun">=</span><span class="pln"> createdMediaKeys</span><span class="pun">;</span><span class="pln">
+    
+              </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">)</span><span class="pln">
+                createdMediaKeys</span><span class="pun">.</span><code><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></code><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">);</span><span class="pln">
+    
+              </span><span class="kwd">for</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> video</span><span class="pun">.</span><span class="pln">pendingSessionData</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+                </span><span class="kwd">var</span><span class="pln"> data </span><span class="pun">=</span><span class="pln"> video</span><span class="pun">.</span><span class="pln">pendingSessionData</span><span class="pun">[</span><span class="pln">i</span><span class="pun">];</span><span class="pln">
+                makeNewRequest</span><span class="pun">(</span><span class="pln">video</span><span class="pun">.</span><span class="pln">mediaKeysObject</span><span class="pun">,</span><span class="pln"> data</span><span class="pun">.</span><span class="pln">initDataType</span><span class="pun">,</span><span class="pln"> data</span><span class="pun">.</span><span class="pln">initData</span><span class="pun">);</span><span class="pln">
+              </span><span class="pun">}</span><span class="pln">
+              video</span><span class="pun">.</span><span class="pln">pendingSessionData </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[];</span><span class="pln">
+    
+              </span><span class="kwd">return</span><span class="pln"> video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></code><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">);</span><span class="pln">
+            </span><span class="pun">}</span><span class="pln">
+          </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
+            console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create or use new MediaKeys"</span><span class="pun">)</span><span class="pln">
+          </span><span class="pun">);</span><span class="pln">
         </span><span class="pun">}</span><span class="pln">
-      </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
-        console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create or use new MediaKeys"</span><span class="pun">)</span><span class="pln">
       </span><span class="pun">);</span><span class="pln">
     </span><span class="pun">}</span><span class="pln">
     addSession</span><span class="pun">(</span><span class="pln">video</span><span class="pun">,</span><span class="pln"> event</span><span class="pun">.</span><code><a href="#widl-MediaEncryptedEventInit-initDataType">initDataType</a></code><span class="pun">,</span><span class="pln"> event</span><span class="pun">.</span><code><a href="#widl-MediaEncryptedEventInit-initData">initData</a></code><span class="pun">);</span><span class="pln">
@@ -2201,7 +2280,7 @@
       </section>
   
       <section id="example-mediakeys-before-source" typeof="bibo:Chapter" resource="#example-mediakeys-before-source" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_example-mediakeys-before-source"><span class="secno">8.3 </span>Create MediaKeys Before Loading Media</h3>
+        <h3 role="heading" id="h3_example-mediakeys-before-source"><span class="secno">10.3 </span>Create MediaKeys Before Loading Media</h3>
         <p class="exampledescription">Initialization is much simpler if encrypted events do not need to be handled during MediaKeys initialization.
         This can be accomplished either by providing the <a href="#initialization-data">Initialization Data</a> in other ways or setting the source after the MediaKeys object has been created.
         This example does the latter.
@@ -2222,18 +2301,23 @@
     makeNewRequest</span><span class="pun">(</span><span class="pln">mediaKeys</span><span class="pun">,</span><span class="pln"> event</span><span class="pun">.</span><code><a href="#widl-MediaEncryptedEventInit-initDataType">initDataType</a></code><span class="pun">,</span><span class="pln"> event</span><span class="pun">.</span><code><a href="#widl-MediaEncryptedEventInit-initData">initData</a></code><span class="pun">);</span><span class="pln">
   </span><span class="pun">}</span><span class="pln">
 
-  selectKeySystem</span><span class="pun">();</span><span class="pln">
-  </span><code><a href="#idl-def-MediaKeys">MediaKeys</a></code><span class="pun">.</span><code><a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">create</a></code><span class="pun">(</span><span class="pln">keySystem</span><span class="pun">).</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
-    </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-      mediaKeys </span><span class="pun">=</span><span class="pln"> createdMediaKeys</span><span class="pun">;</span><span class="pln">
-      </span><span class="kwd">var</span><span class="pln"> video </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">"v"</span><span class="pun">);</span><span class="pln">
-      video</span><span class="pun">.</span><span class="pln">src </span><span class="pun">=</span><span class="pln"> </span><span class="str">"foo.webm"</span><span class="pun">;</span><span class="pln">
-      </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">)</span><span class="pln">
-        mediaKeys</span><span class="pun">.</span><code><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></code><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">);</span><span class="pln">
-      </span><span class="kwd">return</span><span class="pln"> video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></code><span class="pun">(</span><span class="pln">mediaKeys</span><span class="pun">);</span><span class="pln">
+  selectKeySystem</span><span class="pun">().</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+    </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">keySystemAccess</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+      </span><code><a href="#idl-def-MediaKeys">MediaKeys</a></code><span class="pun">.</span><code><a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">createMediaKeys</a></code><span class="pun">(</span><span class="pln">keySystem</span><span class="pun">).</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+        </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+          mediaKeys </span><span class="pun">=</span><span class="pln"> createdMediaKeys</span><span class="pun">;</span><span class="pln">
+          </span><span class="kwd">var</span><span class="pln"> video </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">"v"</span><span class="pun">);</span><span class="pln">
+          video</span><span class="pun">.</span><span class="pln">src </span><span class="pun">=</span><span class="pln"> </span><span class="str">"foo.webm"</span><span class="pun">;</span><span class="pln">
+          </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">)</span><span class="pln">
+            mediaKeys</span><span class="pun">.</span><code><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></code><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">);</span><span class="pln">
+          </span><span class="kwd">return</span><span class="pln"> video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></code><span class="pun">(</span><span class="pln">mediaKeys</span><span class="pun">);</span><span class="pln">
+        </span><span class="pun">}</span><span class="pln">
+      </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
+        console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create or initialize key session"</span><span class="pun">)</span><span class="pln">
+      </span><span class="pun">);</span><span class="pln">
     </span><span class="pun">}</span><span class="pln">
   </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
-    console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create or initialize key session"</span><span class="pun">)</span><span class="pln">
+    console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"No supported key systems supporting the required combinations"</span><span class="pun">)</span><span class="pln">
   </span><span class="pun">);</span><span class="pln">
 </span><span class="tag">&lt;/script&gt;</span><span class="pln">
 
@@ -2241,7 +2325,7 @@
       </section>
   
       <section id="example-using-all-events" typeof="bibo:Chapter" resource="#example-using-all-events" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_example-using-all-events"><span class="secno">8.4 </span>Using All Events</h3>
+        <h3 role="heading" id="h3_example-using-all-events"><span class="secno">10.4 </span>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>handleMessage()</code> could be called multiple times, including in response to the <code><a href="#widl-MediaKeySession-update-Promise-void--ArrayBuffer-ArrayBufferView-response">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>
     
@@ -2312,18 +2396,23 @@
     //  --><span class="com">and do some bookkeeping with event.target.</span><code><a href="#widl-MediaKeySession-sessionId">sessionId</a></code><span class="com"> if necessary.</span><span class="pln">
   </span><span class="pun">}</span><span class="pln">
 
-  selectKeySystem</span><span class="pun">();</span><span class="pln">
-  </span><code><a href="#idl-def-MediaKeys">MediaKeys</a></code><span class="pun">.</span><code><a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">create</a></code><span class="pun">(</span><span class="pln">keySystem</span><span class="pun">).</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
-    </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-      mediaKeys </span><span class="pun">=</span><span class="pln"> createdMediaKeys</span><span class="pun">;</span><span class="pln">
-      </span><span class="kwd">var</span><span class="pln"> video </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">"v"</span><span class="pun">);</span><span class="pln">
-      video</span><span class="pun">.</span><span class="pln">src </span><span class="pun">=</span><span class="pln"> </span><span class="str">"foo.webm"</span><span class="pun">;</span><span class="pln">
-      </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">)</span><span class="pln">
-        mediaKeys</span><span class="pun">.</span><code><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></code><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">);</span><span class="pln">
-      </span><span class="kwd">return</span><span class="pln"> video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></code><span class="pun">(</span><span class="pln">mediaKeys</span><span class="pun">);</span><span class="pln">
+  selectKeySystem</span><span class="pun">().</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+    </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">keySystemAccess</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+      </span><code><a href="#idl-def-MediaKeys">MediaKeys</a></code><span class="pun">.</span><code><a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">createMediaKeys</a></code><span class="pun">(</span><span class="pln">keySystem</span><span class="pun">).</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+        </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+          mediaKeys </span><span class="pun">=</span><span class="pln"> createdMediaKeys</span><span class="pun">;</span><span class="pln">
+          </span><span class="kwd">var</span><span class="pln"> video </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">"v"</span><span class="pun">);</span><span class="pln">
+          video</span><span class="pun">.</span><span class="pln">src </span><span class="pun">=</span><span class="pln"> </span><span class="str">"foo.webm"</span><span class="pun">;</span><span class="pln">
+          </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">)</span><span class="pln">
+            mediaKeys</span><span class="pun">.</span><code><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></code><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">);</span><span class="pln">
+          </span><span class="kwd">return</span><span class="pln"> video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></code><span class="pun">(</span><span class="pln">mediaKeys</span><span class="pun">);</span><span class="pln">
+        </span><span class="pun">}</span><span class="pln">
+      </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
+        console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create or use new MediaKeys"</span><span class="pun">)</span><span class="pln">
+      </span><span class="pun">);</span><span class="pln">
     </span><span class="pun">}</span><span class="pln">
   </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
-    console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create or use new MediaKeys"</span><span class="pun">)</span><span class="pln">
+    console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"No supported key systems supporting the required combinations"</span><span class="pun">)</span><span class="pln">
   </span><span class="pun">);</span><span class="pln">
 </span><span class="tag">&lt;/script&gt;</span><span class="pln">
 
@@ -2331,7 +2420,7 @@
       </section>
   
       <section id="example-stored-license" typeof="bibo:Chapter" resource="#example-stored-license" rel="bibo:Chapter">
-        <h3 role="heading" id="h3_example-stored-license"><span class="secno">8.5 </span>Stored License</h3>
+        <h3 role="heading" id="h3_example-stored-license"><span class="secno">10.5 </span>Stored License</h3>
         <p class="exampledescription">This example requests a persistent license for future use and stores it. It also provides functions for later retrieving the license and for destroying it.</p>
     
         <div class="example"><div class="example-title"><span>Example 7</span></div><pre class="example highlight prettyprint prettyprinted"><span class="tag">&lt;script&gt;</span><span class="pln">
@@ -2416,17 +2505,22 @@
     </span><span class="pun">);</span><span class="pln">
   </span><span class="pun">}</span><span class="pln">
 
-  selectKeySystem</span><span class="pun">();</span><span class="pln">
-  </span><code><a href="#idl-def-MediaKeys">MediaKeys</a></code><span class="pun">.</span><code><a href="#widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem">create</a></code><span class="pun">(</span><span class="pln">keySystem</span><span class="pun">).</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
-    </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-      mediaKeys </span><span class="pun">=</span><span class="pln"> createdMediaKeys</span><span class="pun">;</span><span class="pln">
-      </span><span class="kwd">var</span><span class="pln"> video </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">"v"</span><span class="pun">);</span><span class="pln">
-      </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">)</span><span class="pln">
-        mediaKeys</span><span class="pun">.</span><code><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></code><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">);</span><span class="pln">
-      </span><span class="kwd">return</span><span class="pln"> video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></code><span class="pun">(</span><span class="pln">mediaKeys</span><span class="pun">);</span><span class="pln">
+  selectKeySystem</span><span class="pun">().</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+    </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">keySystemAccess</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+      </span><code><a href="#idl-def-MediaKeys">MediaKeys</a></code><span class="pun">.</span><code><a href="#widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys">createMediaKeys</a></code><span class="pun">(</span><span class="pln">keySystem</span><span class="pun">).</span><span class="pln">then</span><span class="pun">(</span><span class="pln">
+        </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">createdMediaKeys</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
+          mediaKeys </span><span class="pun">=</span><span class="pln"> createdMediaKeys</span><span class="pun">;</span><span class="pln">
+          </span><span class="kwd">var</span><span class="pln"> video </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">"v"</span><span class="pun">);</span><span class="pln">
+          </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">)</span><span class="pln">
+            mediaKeys</span><span class="pun">.</span><code><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></code><span class="pun">(</span><span class="pln">serverCertificate</span><span class="pun">);</span><span class="pln">
+          </span><span class="kwd">return</span><span class="pln"> video</span><span class="pun">.</span><code><a href="#widl-HTMLMediaElement-setMediaKeys-Promise-void--MediaKeys-mediaKeys">setMediaKeys</a></code><span class="pun">(</span><span class="pln">mediaKeys</span><span class="pun">);</span><span class="pln">
+        </span><span class="pun">}</span><span class="pln">
+      </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
+        console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create or use new MediaKeys"</span><span class="pun">)</span><span class="pln">
+      </span><span class="pun">);</span><span class="pln">
     </span><span class="pun">}</span><span class="pln">
   </span><span class="pun">).</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">
-    console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"Unable to create or use new MediaKeys"</span><span class="pun">)</span><span class="pln">
+    console</span><span class="pun">.</span><span class="pln">error</span><span class="pun">.</span><span class="pln">bind</span><span class="pun">(</span><span class="pln">console</span><span class="pun">,</span><span class="pln"> </span><span class="str">"No supported key systems supporting the required combinations"</span><span class="pun">)</span><span class="pln">
   </span><span class="pun">);</span><span class="pln">
 </span><span class="tag">&lt;/script&gt;</span><span class="pln">
 
@@ -2436,7 +2530,7 @@
 
 
     <section id="revision-history" typeof="bibo:Chapter" resource="#revision-history" rel="bibo:Chapter">
-      <!--OddPage--><h2 role="heading" id="h2_revision-history"><span class="secno">9. </span>Revision History</h2>
+      <!--OddPage--><h2 role="heading" id="h2_revision-history"><span class="secno">11. </span>Revision History</h2>
       <table class="old-table">
         <thead>
           <tr>
@@ -2512,8 +2606,7 @@
 </dd><dt id="bib-HTML5">[HTML5]</dt><dd rel="dcterms:requires">Robin Berjon; Steve Faulkner; Travis Leithead; Erika Doyle Navara; Edward O'Connor; Silvia Pfeiffer. <a href="http://www.w3.org/TR/html5/"><cite>HTML5</cite></a>. 16 September 2014. W3C Proposed Recommendation. URL: <a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a>
 </dd><dt id="bib-JWK">[JWK]</dt><dd rel="dcterms:requires">Mike Jones. <a href="http://tools.ietf.org/html/draft-ietf-jose-json-web-key-11"><cite>JSON Web Key (JWK)</cite></a>. 28 May 2013. Internet Draft. URL: <a href="http://tools.ietf.org/html/draft-ietf-jose-json-web-key-11">http://tools.ietf.org/html/draft-ietf-jose-json-web-key-11</a>
 </dd><dt id="bib-MIXED-CONTENT">[MIXED-CONTENT]</dt><dd rel="dcterms:requires">Mike West. <a href="http://www.w3.org/TR/mixed-content/"><cite>Mixed Content</cite></a>. 16 September 2014. W3C Working Draft. URL: <a href="http://www.w3.org/TR/mixed-content/">http://www.w3.org/TR/mixed-content/</a>
-</dd><dt id="bib-RFC6381">[RFC6381]</dt><dd rel="dcterms:requires">R. Gellens; D. Singer; P. Frojdh. <a href="http://www.ietf.org/rfc/rfc6381.txt"><cite>The 'Codecs' and 'Profiles' Parameters for "Bucket" Media Types</cite></a>. August 2011. Proposed Standard. URL: <a href="http://www.ietf.org/rfc/rfc6381.txt">http://www.ietf.org/rfc/rfc6381.txt</a>
+</dd><dt id="bib-WebIDL">[WebIDL]</dt><dd rel="dcterms:requires">Cameron McCormack. <a href="http://www.w3.org/TR/WebIDL/"><cite>Web IDL</cite></a>. 19 April 2012. W3C Candidate Recommendation. URL: <a href="http://www.w3.org/TR/WebIDL/">http://www.w3.org/TR/WebIDL/</a>
 </dd></dl></section><section id="informative-references" typeof="bibo:Chapter" resource="#informative-references" rel="bibo:Chapter"><h3 role="heading" id="h3_informative-references"><span class="secno">A.2 </span>Informative references</h3><dl class="bibliography" about=""><dt id="bib-EME-REGISTRY">[EME-REGISTRY]</dt><dd rel="dcterms:references">David Dorwin; Adrian Bateman; Mark Watson. <a href="initdata-format-registry.html"><cite>Encrypted Media Extensions Stream Format and Initialization Data Format Registry</cite></a>. URL: <a href="initdata-format-registry.html">initdata-format-registry.html</a>
 </dd><dt id="bib-JWS">[JWS]</dt><dd rel="dcterms:references">M. Jones; J. Bradley; N. Sakimura. <a href="https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-33"><cite>JSON Web Signature (JWS)</cite></a>. 25 September 2014. Internet Draft. URL: <a href="https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-33">https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-33</a>
-</dd><dt id="bib-RFC6838">[RFC6838]</dt><dd rel="dcterms:references">N. Freed; J. Klensin; T. Hansen. <a href="http://www.ietf.org/rfc/rfc6838.txt"><cite>Media Type Specifications and Registration Procedures</cite></a>. January 2013. Best Current Practice. URL: <a href="http://www.ietf.org/rfc/rfc6838.txt">http://www.ietf.org/rfc/rfc6838.txt</a>
 </dd></dl></section></section></body></html>
\ No newline at end of file
--- a/encrypted-media/encrypted-media.js	Mon Oct 13 12:14:02 2014 -0700
+++ b/encrypted-media/encrypted-media.js	Mon Oct 13 16:23:29 2014 -0700
@@ -156,26 +156,44 @@
     'initialization-data': { func: term_helper, fragment: 'initialization-data', link_text: 'Initialization Data'  },
     'initialization-data-type': { func: term_helper, fragment: 'initialization-data-type', link_text: 'Initialization Data Type'  },
     'session-id': { func: term_helper, fragment: 'session-id', link_text: 'Session Id'  },
+
+    'requestMediaKeySystemAccess': { func: idlref_helper, fragment: 'widl-Navigator-requestMediaKeySystemAccess-Promise-MediaKeySystemAccess--DOMString-keySystem-Sequence-MediaKeySystemOptions--supportedConfigurations', link_text: 'requestMediaKeySystemAccess()',  },
+    'requestMediaKeySystemAccess-call': { func: idlref_helper, fragment: 'widl-Navigator-requestMediaKeySystemAccess-Promise-MediaKeySystemAccess--DOMString-keySystem-Sequence-MediaKeySystemOptions--supportedConfigurations', link_text: 'requestMediaKeySystemAccess',  },
     
+//    'requirement': { func: idlref_helper, fragment: 'idl-def-MediaKeysRequirement', link_text: 'MediaKeysRequirement',  },
+//    'requirement-required': { func: idlref_helper, fragment: 'idl-def-MediaKeysRequirement.required', link_text: '"required"',  },
+    'requirement-optional': { func: idlref_helper, fragment: 'idl-def-MediaKeysRequirement.optional', link_text: '"optional"',  },
+    'requirement-disallowed': { func: idlref_helper, fragment: 'idl-def-MediaKeysRequirement.disallowed', link_text: '"disallowed"',  },
+
+    'option-initDataType': { func: idlref_helper, fragment: 'widl-MediaKeySystemOptions-initDataType', link_text: 'initDataType',  },
+    'option-videoType': { func: idlref_helper, fragment: 'widl-MediaKeySystemOptions-videoType', link_text: 'videoType',  },
+    'option-stateful': { func: idlref_helper, fragment: 'widl-MediaKeySystemOptions-stateful', link_text: 'stateful',  },
+    
+    'keySystem-attribute': { func: idlref_helper, fragment: 'widl-MediaKeySystemAccess-keySystem', link_text: 'keySystem',  },
+//  'createMediaKeys': { func: idlref_helper, fragment: 'widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys', link_text: 'createMediaKeys()',  },
+    'createMediaKeys-call': { func: idlref_helper, fragment: 'widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys', link_text: 'createMediaKeys',  },
+
     'sessiontype': { func: idlref_helper, fragment: 'idl-def-SessionType', link_text: 'SessionType',  },
     'persistent-session': { func: idlref_helper, fragment: 'idl-def-SessionType.persistent', link_text: '"persistent"',  },
     'temporary-session': { func: idlref_helper, fragment: 'idl-def-SessionType.temporary', link_text: '"temporary"',  },
 
+    /* TODO: Move or remove depending on the outcome of Bug 25923.
     'IsTypeSupportedResult-empty': { func: idlref_helper, fragment: 'idl-def-IsTypeSupportedResult.empty-string', link_text: '""',  },
     'IsTypeSupportedResult-maybe': { func: idlref_helper, fragment: 'idl-def-IsTypeSupportedResult.maybe', link_text: '"maybe"',  },
     'IsTypeSupportedResult-probably': { func: idlref_helper, fragment: 'idl-def-IsTypeSupportedResult.probably', link_text: '"probably"',  },
+    */
 
+    // TODO: Replace uses with simple <a>.
     'mediakeys': { func: idlref_helper, fragment: 'idl-def-MediaKeys', link_text: 'MediaKeys',  },
-    'keySystem-attribute': { func: idlref_helper, fragment: 'widl-MediaKeys-keySystem', link_text: 'keySystem',  },
-    'mediakeys-create': { func: idlref_helper, fragment: 'widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem', link_text: 'create()',  },
-    'mediakeys-create-call': { func: idlref_helper, fragment: 'widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem', link_text: 'create',  },
 //    'createSession': { func: idlref_helper, fragment: 'widl-MediaKeys-createSession-MediaKeySession-SessionType-sessionType', link_text: 'createSession()',  },
     'createSession-call': { func: idlref_helper, fragment: 'widl-MediaKeys-createSession-MediaKeySession-SessionType-sessionType', link_text: 'createSession',  },
     'setServerCertificate': { func: idlref_helper, fragment: 'widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate', link_text: 'setServerCertificate()',  },
     'setServerCertificate-call': { func: idlref_helper, fragment: 'widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate', link_text: 'setServerCertificate',  },
+    /* TODO: Move or remove depending on the outcome of Bug 25923.
     'isTypeSupported': { func: idlref_helper, fragment: 'widl-MediaKeys-isTypeSupported-IsTypeSupportedResult-DOMstring-keySystem-DOMString-initDataType-DOMString-contentType-DOMString-capability', link_text: 'isTypeSupported()',  },
     'isTypeSupported-call': { func: idlref_helper, fragment: 'widl-MediaKeys-isTypeSupported-IsTypeSupportedResult-DOMstring-keySystem-DOMString-initDataType-DOMString-contentType-DOMString-capability', link_text: 'isTypeSupported',  },
-    'mediakeys-initialization': { func: term_helper, fragment: 'widl-MediaKeys-create-Promise-MediaKeys--DOMString-keySystem', link_text: ''  },
+    */
+    'mediakeys-initialization': { func: term_helper, fragment: 'widl-MediaKeySystemAccess-createMediaKeys-Promise-MediaKeys', link_text: ''  },
 
     'mediakeysession': { func: idlref_helper, fragment: 'idl-def-MediaKeySession', link_text: 'MediaKeySession',  },
     'sessionId': { func: idlref_helper, fragment: 'widl-MediaKeySession-sessionId', link_text: 'sessionId',  },