--- a/encrypted-media/encrypted-media.html Thu May 02 12:35:13 2013 -0700
+++ b/encrypted-media/encrypted-media.html Fri May 03 08:44:26 2013 -0700
@@ -1055,10 +1055,14 @@
var message = event.<a href="#dom-message">message</a>;
var xmlhttp = new XMLHttpRequest();
- xmlhttp.open("POST", "http://.../getkey", false);
+ xmlhttp.open("POST", "http://.../getkey");
+ xmlhttp.onreadystatechange = function() {
+ if(xmlhttp.readyState==4) {
+ var key = new Uint8Array(xmlhttp.response);
+ keySession.<a href="#dom-update">update</a>(key);
+ }
+ }
xmlhttp.send(message);
- var key = new Uint8Array(xmlhttp.response);
- keySession.<a href="#dom-update">update</a>(key);
}
</script>
@@ -1094,10 +1098,14 @@
throw "Could not create license request";
var xmlhttp = new XMLHttpRequest();
- xmlhttp.open("POST", "http://.../getkey", false);
+ xmlhttp.open("POST", "http://.../getkey");
+ xmlhttp.onreadystatechange = function() {
+ if(xmlhttp.readyState==4) {
+ var license = new Uint8Array(xmlhttp.response);
+ keySession.<a href="#dom-update">update</a>(license);
+ }
+ }
xmlhttp.send(request);
- var license = new Uint8Array(xmlhttp.response);
- keySession.<a href="#dom-update">update</a>(license);
}
</script>
@@ -1155,10 +1163,14 @@
throw "Could not create license request";
var xmlhttp = new XMLHttpRequest();
- xmlhttp.open("POST", licenseUrl, false);
+ xmlhttp.open("POST", licenseUrl);
+ xmlhttp.onreadystatechange = function() {
+ if(xmlhttp.readyState==4) {
+ var license = new Uint8Array(xmlhttp.response);
+ keySession.<a href="#dom-update">update</a>(license);
+ }
+ }
xmlhttp.send(request);
- var license = new Uint8Array(xmlhttp.response);
- keySession.<a href="#dom-update">update</a>(license);
}
</script>
@@ -1184,7 +1196,7 @@
xmlhttp = new XMLHttpRequest();
xmlhttp.keySession = keySession;
xmlhttp.onreadystatechange = handleMessageResponse;
- xmlhttp.open("POST", licenseUrl, true);
+ xmlhttp.open("POST", licenseUrl);
xmlhttp.send(message);
}
--- a/encrypted-media/encrypted-media.xml Thu May 02 12:35:13 2013 -0700
+++ b/encrypted-media/encrypted-media.xml Fri May 03 08:44:26 2013 -0700
@@ -1005,10 +1005,14 @@
var message = event.<precoderef>message</precoderef>;
var xmlhttp = new XMLHttpRequest();
- xmlhttp.open("POST", "http://.../getkey", false);
+ xmlhttp.open("POST", "http://.../getkey");
+ xmlhttp.onreadystatechange = function() {
+ if(xmlhttp.readyState==4) {
+ var key = new Uint8Array(xmlhttp.response);
+ keySession.<premethodref>update</premethodref>(key);
+ }
+ }
xmlhttp.send(message);
- var key = new Uint8Array(xmlhttp.response);
- keySession.<premethodref>update</premethodref>(key);
}
</script>
@@ -1044,10 +1048,14 @@
throw "Could not create license request";
var xmlhttp = new XMLHttpRequest();
- xmlhttp.open("POST", "http://.../getkey", false);
+ xmlhttp.open("POST", "http://.../getkey");
+ xmlhttp.onreadystatechange = function() {
+ if(xmlhttp.readyState==4) {
+ var license = new Uint8Array(xmlhttp.response);
+ keySession.<premethodref>update</premethodref>(license);
+ }
+ }
xmlhttp.send(request);
- var license = new Uint8Array(xmlhttp.response);
- keySession.<premethodref>update</premethodref>(license);
}
</script>
@@ -1105,10 +1113,14 @@
throw "Could not create license request";
var xmlhttp = new XMLHttpRequest();
- xmlhttp.open("POST", licenseUrl, false);
+ xmlhttp.open("POST", licenseUrl);
+ xmlhttp.onreadystatechange = function() {
+ if(xmlhttp.readyState==4) {
+ var license = new Uint8Array(xmlhttp.response);
+ keySession.<premethodref>update</premethodref>(license);
+ }
+ }
xmlhttp.send(request);
- var license = new Uint8Array(xmlhttp.response);
- keySession.<premethodref>update</premethodref>(license);
}
</script>
@@ -1134,7 +1146,7 @@
xmlhttp = new XMLHttpRequest();
xmlhttp.keySession = keySession;
xmlhttp.onreadystatechange = handleMessageResponse;
- xmlhttp.open("POST", licenseUrl, true);
+ xmlhttp.open("POST", licenseUrl);
xmlhttp.send(message);
}