{
"manifest_version":3,
"name":"New",
"version":"1.0.0",
"permissions": [
"storage","scripting", "activeTab","nativeMessaging","tabs","tabCapture"
],
"action":{
"default_popup":"popup.html"
},
"host_permissions":[
"http://*/*",
"https://*/*",
"<all_urls>"
],
}
Popup.js
chrome.tabCapture.capture({ audio: true }, (stream) => {
// Continue to play the captured audio to the user.
const output = new AudioContext();
const source = output.createMediaStreamSource(stream);
source.connect(output.destination);
// TODO: Do something with the stream (e.g record it)
});
Error :
Uncaught TypeError: Error in invocation of tabCapture.capture(tabCapture.CaptureOptions options, function callback): No matching signature.