Merge pull request #51 from fireattack/fix-mediakeysession

Ensure MediaKeySession is defined
This commit is contained in:
larley
2026-01-20 09:27:21 +01:00
committed by GitHub

View File

@@ -57,7 +57,7 @@
proxy(EventTarget.prototype, 'addEventListener', (target, thisArg, args) => {
const [type, listener] = args;
if (thisArg == null || !(thisArg instanceof MediaKeySession) || typeof MediaKeyMessageEvent === 'undefined' || type !== "message" || !listener) {
if (thisArg == null || typeof MediaKeySession === 'undefined' || !(thisArg instanceof MediaKeySession) || typeof MediaKeyMessageEvent === 'undefined' || type !== "message" || !listener) {
return target.apply(thisArg, args);
}