hello everybody I'm building a chrome extension for catching screen records and edit them, I'm trying to use the chrome tab capture API for getting video stream in the content script and I'm getting an undefined error I am using manifest version 3 I set in the manifest the tab capture permission hare is a sample trying to run in the content script
chrome.tabCapture.capture(
{
video: true,
audio: true,
videoConstraints: {
mandatory: {
chromeMediaSource: "tab",
minWidth: width,
minHeight: height,
maxWidth: width,
maxHeight: height,
maxFrameRate: fps,
},
},
},
(stream) => {
console.log(stream);
}
);
and manifest
"permissions": [
"activeTab",
"storage",
"identity",
"downloads",
"scripting",
"tabCapture"
],