setInterval(asyncGC, 0);
var mediaKeySession;
- MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) {
+ navigator.requestMediaKeySystemAccess('org.w3.clearkey').then(function(access) {
+ return access.createMediaKeys();
+ }).then(function(mediaKeys) {
var initDataType = getInitDataType();
mediaKeySession = mediaKeys.createSession();
return mediaKeySession.generateRequest(initDataType, getInitData(initDataType));
}).then(function() {
- return mediaKeySession.release();
+ return mediaKeySession.close();
}).then(function(result) {
test.done();
}).catch(function(error) {