move audio playback to background page to avoid the page's own CSP interfering
This commit is contained in:
1 parent
f982de54d3
commit
8317f44270
3 files changed
+10
-17
No files matched your search
@@ -1452,6 +1452,14 @@ browser.runtime.onMessage.addListener((req, sender) =>
|
||||
});
|
||||
xhr.send(req.command);
|
||||
}
|
||||
else if (req.type == "play_audio")
|
||||
{
|
||||
let audio = new Audio(req.host);
|
||||
audio.volume = req.volume;
|
||||
audio.play();
|
||||
console.log("tried to play audio");
|
||||
console.log(req.host);
|
||||
}
|
||||
return Promise.resolve(undefined);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user