From 4fa4e55b624ff432b6db14b1dfa1bac4087a30d3 Mon Sep 17 00:00:00 2001 From: hackademix Date: Mon, 29 Apr 2019 10:31:19 +0200 Subject: Skip MediaSource patching where it's disabled by browser settings. --- src/content/media.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/media.js b/src/content/media.js index 770a43f..4b8f852 100644 --- a/src/content/media.js +++ b/src/content/media.js @@ -1,4 +1,5 @@ -ns.on("capabilities", event => { + +if ("MediaSource" in window) ns.on("capabilities", event => { debug("Media Hook", document.URL, document.documentElement && document.documentElement.innerHTML, ns.capabilities); // DEV_ONLY let mediaBlocker = !ns.allows("media"); let unpatched = new Map(); -- cgit v1.2.3