Our extension uses tabCapture to record the sound of a tab. In MV3,
chrome.tabCapture is only available in foreground pages (like popups), which makes the API useless for recording anything in the tab since it can't be kept open.
There's the current hack which opens an extension page in a new Tab while recording, to satisfy both the keep-alive and foreground constraints in the API, but that is less than ideal as it requires tabs pop-in and pop-out of existence without user interaction so it makes for a terrible user experience.
Then there's the new
chrome.offscreen API which had this capturing use case as one of its main highlighted use cases in the initial draft request by Devlin Cronin (
https://docs.google.com/document/d/1b-I-vXq2h7OFFmus78jZXIWcKilKJLKLeGplnY9wt7k/edit#) Now, the offscreen api is enabled in
109 beta ready to be deployed in production on Jan 10th 2023 and this use case appears ignored. chrome.tabCapture is not exposed to the offscreen document.
So now the question. Is there another way to record the current tab audio that isn't listed above? Not talking about recording the user's mic with getUserMedia and not involving desktopCapture which brings up the nasty popup. The ideal solution would still involve tabCapture. But how?