[EME] Bug 25923 - Minor fixes to examples.
authorDavid Dorwin <ddorwin@google.com>
Mon, 13 Oct 2014 17:30:26 -0700
changeset 470 d915908c3a04
parent 469 a162640cb5b7
child 471 6c579ddf123e
[EME] Bug 25923 - Minor fixes to examples.
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 16:53:35 2014 -0700
+++ b/encrypted-media/encrypted-media-respec.html	Mon Oct 13 17:30:26 2014 -0700
@@ -1860,18 +1860,18 @@
     
         <pre class="example highlight">
 &lt;script&gt;
-  var keySystem;
   var licenseUrl;
   var serverCertificate;
 
+  // Returns a Promise&lt;<a>MediaKeySystemAccess</a>&gt;.
   // TODO: The structure of the original example makes this overly complex. Fix this.
   function selectKeySystem() {
     someSystemOptions = [
-     { <a def-id="option-videoType"></a>: "webm",
+     { <a def-id="option-initDataType"></a>: "webm",
        <a def-id="option-videoType"></a>: "video/webm; codecs='vp8, vorbis'"
      }
     ];
-    fooOptions = [
+    clearKeyOptions = [
      { <a def-id="option-initDataType"></a>: "webm",
        <a def-id="option-videoType"></a>: "video/webm; codecs='vp8, vorbis'"
      }
@@ -1879,8 +1879,7 @@
   
     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";
+        licenseUrl = "https://license.example.com/getkey";
         serverCertificate = new Uint8Array([ ... ]);
         promise = new Promise();
         promise.resolve(keySystemAccess); 
@@ -1889,10 +1888,9 @@
     ).catch(
       function(error) {
         // Try the next key system.
-        navigator.<a def-id="requestMediaKeySystemAccess-call"></a>("com.foobar", fooOptions).then(
+        navigator.<a def-id="requestMediaKeySystemAccess-call"></a>("org.w3.clearkey", clearKeyOptions).then(
           function(keySystemAccess) {
-          licenseUrl = "https://license.foobar.com/request";
-          keySystem = "com.foobar";
+          licenseUrl = "https://license.example.com/clearkey/request";
           promise = new Promise();
           promise.resolve(keySystemAccess); 
           return promise;
@@ -1903,9 +1901,9 @@
     var video = event.target;
     if (video.mediaKeysObject === undefined) {
       video.mediaKeysObject = null; // Prevent entering this path again.
+      video.pendingSessionData = []; // Will store all initData until the MediaKeys is ready.
       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;
@@ -1977,7 +1975,6 @@
     
         <pre class="example highlight">
 &lt;script&gt;
-  var keySystem;
   var licenseUrl;
   var serverCertificate;
   var mediaKeys;
@@ -1993,7 +1990,7 @@
 
   selectKeySystem().then(
     function(keySystemAccess) {
-      <a def-id="mediakeys"></a>.<a def-id="createMediaKeys-call"></a>(keySystem).then(
+      keySystemAccess.<a def-id="createMediaKeys-call"></a>().then(
         function(createdMediaKeys) {
           mediaKeys = createdMediaKeys;
           var video = document.getElementById("v");
@@ -2022,7 +2019,6 @@
     
         <pre class="example highlight">
 &lt;script&gt;
-  var keySystem;
   var licenseUrl;
   var serverCertificate;
   var mediaKeys;
@@ -2090,7 +2086,7 @@
 
   selectKeySystem().then(
     function(keySystemAccess) {
-      <a def-id="mediakeys"></a>.<a def-id="createMediaKeys-call"></a>(keySystem).then(
+      keySystemAccess.<a def-id="createMediaKeys-call"></a>().then(
         function(createdMediaKeys) {
           mediaKeys = createdMediaKeys;
           var video = document.getElementById("v");
@@ -2118,7 +2114,6 @@
     
         <pre class="example highlight">
 &lt;script&gt;
-  var keySystem;
   var licenseUrl;
   var serverCertificate;
   var mediaKeys;
@@ -2201,7 +2196,7 @@
 
   selectKeySystem().then(
     function(keySystemAccess) {
-      <a def-id="mediakeys"></a>.<a def-id="createMediaKeys-call"></a>(keySystem).then(
+      keySystemAccess.<a def-id="createMediaKeys-call"></a>().then(
         function(createdMediaKeys) {
           mediaKeys = createdMediaKeys;
           var video = document.getElementById("v");
--- a/encrypted-media/encrypted-media.html	Mon Oct 13 16:53:35 2014 -0700
+++ b/encrypted-media/encrypted-media.html	Mon Oct 13 17:30:26 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-13T23:52:04.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-14T00:29:28.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>
@@ -2121,7 +2121,7 @@
     </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">
-      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">
+      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">
@@ -2166,33 +2166,32 @@
   
       <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">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
+        <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>
     
         <div class="example"><div class="example-title"><span>Example 4</span></div><pre class="example highlight prettyprint prettyprinted"><span class="tag">&lt;script&gt;</span><span class="pln">
-  </span><span class="kwd">var</span><span class="pln"> keySystem</span><span class="pun">;</span><span class="pln">
   </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">// Returns a Promise&lt;</span><a href="#idl-def-MediaKeySystemAccess" class="idlType"><code>MediaKeySystemAccess</code></a><span class="com">&gt;.</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">
     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><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">
-    fooOptions </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[</span><span class="pln">
+    clearKeyOptions </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">
+    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">
+        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">
         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"> 
@@ -2201,10 +2200,9 @@
     </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">
+        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"> clearKeyOptions</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">
+          licenseUrl </span><span class="pun">=</span><span class="pln"> </span><span class="str">"https://license.example.com/clearkey/request"</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">
@@ -2215,9 +2213,9 @@
     </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">
       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">
       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">
@@ -2287,7 +2285,6 @@
         </p>
     
         <div class="example"><div class="example-title"><span>Example 5</span></div><pre class="example highlight prettyprint prettyprinted"><span class="tag">&lt;script&gt;</span><span class="pln">
-  </span><span class="kwd">var</span><span class="pln"> keySystem</span><span class="pun">;</span><span class="pln">
   </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="kwd">var</span><span class="pln"> mediaKeys</span><span class="pun">;</span><span class="pln">
@@ -2303,7 +2300,7 @@
 
   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">
+      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">
           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">
@@ -2330,7 +2327,6 @@
         <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>
     
         <div class="example"><div class="example-title"><span>Example 6</span></div><pre class="example highlight prettyprint prettyprinted"><span class="tag">&lt;script&gt;</span><span class="pln">
-  </span><span class="kwd">var</span><span class="pln"> keySystem</span><span class="pun">;</span><span class="pln">
   </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="kwd">var</span><span class="pln"> mediaKeys</span><span class="pun">;</span><span class="pln">
@@ -2398,7 +2394,7 @@
 
   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">
+      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">
           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">
@@ -2424,7 +2420,6 @@
         <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">
-  </span><span class="kwd">var</span><span class="pln"> keySystem</span><span class="pun">;</span><span class="pln">
   </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="kwd">var</span><span class="pln"> mediaKeys</span><span class="pun">;</span><span class="pln">
@@ -2507,7 +2502,7 @@
 
   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">
+      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">
           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">
--- a/encrypted-media/encrypted-media.js	Mon Oct 13 16:53:35 2014 -0700
+++ b/encrypted-media/encrypted-media.js	Mon Oct 13 17:30:26 2014 -0700
@@ -157,8 +157,8 @@
     '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',  },
+    '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"',  },