Fix bug for non-Widevine EME
This commit is contained in:
parent
65ef9f2758
commit
8a12fb614e
11
inject.js
11
inject.js
@ -15,8 +15,11 @@ const originalGenerateRequest = MediaKeySession.prototype.generateRequest;
|
|||||||
MediaKeySession.prototype.generateRequest = function(initDataType, initData) {
|
MediaKeySession.prototype.generateRequest = function(initDataType, initData) {
|
||||||
const result = originalGenerateRequest.call(this, initDataType, initData);
|
const result = originalGenerateRequest.call(this, initDataType, initData);
|
||||||
//Get PSSH and pass into content.js
|
//Get PSSH and pass into content.js
|
||||||
document.dispatchEvent(new CustomEvent('pssh', {
|
try {
|
||||||
detail: getPssh(initData)
|
document.dispatchEvent(new CustomEvent('pssh', {
|
||||||
}));
|
detail: getPssh(initData)
|
||||||
return result;
|
}));
|
||||||
|
} finally {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user