Error in invocation of tabCapture.capture(tabCapture.CaptureOptions options, function callback)

308 views
Skip to first unread message

Vivek Sagar

unread,
Jun 6, 2023, 3:31:04 AM6/6/23
to Chromium Extensions
I want to capture the audio of all tab or the audio coming out from tabs and then do some filter like bass etc and then output the modified audio can any one help 

also 

Manifiest file:
{
    "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.

Oliver Dunk

unread,
Jun 6, 2023, 6:03:19 AM6/6/23
to Vivek Sagar, Chromium Extensions
Hi Vivek,

That code looks right and doesn't generate an error on my end.

Could you check to make sure you're definitely loading the up to date code on your side?
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/ace7889c-cfe6-4734-838c-04e780b850e7n%40chromium.org.

Vivek Sagar

unread,
Jun 6, 2023, 10:00:28 AM6/6/23
to Chromium Extensions, Oliver Dunk, Chromium Extensions, Vivek Sagar
yeah thanks my fault it works fine 

Oliver Dunk

unread,
Jun 6, 2023, 10:24:53 AM6/6/23
to Vivek Sagar, Chromium Extensions
No problem, glad to hear it!
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB

Reply all
Reply to author
Forward
0 new messages