-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tabCapture with MV3 #137
Comments
If you need to capture a specific tab, you can do it from the content script (which persists for the entire lifetime of the page). You might have a harder time capturing the entire desktop or a window. If you have more specific practical questions, I probably can answer them. |
Thanks, however I need to send the data to the server once captured, and CORS in content scripts is enforced in MV3, correct? Which means I'd still need to serialize the data and transmit to the background page so I can send to my server. |
One way you could do this is to open a regular tab ( |
Again, this might feel like a workaround (since user might see an extra tab), but it will work for now. |
Yeah, it's just a really, really awful user experience. I propose: Persistent event pagesThis is like #134 except persistent. There should be limitations to prevent extension developers abusing this, or using it unnecessarily, such as:
It should have an API so that the extension can turn it off whenever it wants. This would completely address my use case. Can anyone else chime in if it would address theirs as well? |
Well, the whole point of MV3 is removing persistent pages... perhaps, browsers will allow event pages to persist while they use an active stream. |
BUT:
|
That would partially solve my problem. However in my extension sometimes the tab isn't recorded (it's an option), but the tab is still "controlled" by a websocket that can stop it at any time. Perhaps an event page would persist if a websocket was open as well. That would solve my problem. |
Will #134 mean that audio/video capture will be restored in an "event" page? (Example:
tabCapture
API.)(Since audio/video capture is completely unsupported in service workers: https://developer.chrome.com/docs/extensions/mv3/migrating_to_service_workers/#audio_vidio)
If so - I don't understand the limitation of 5 minutes for a maximum lifetime of the event page.
Right now, with MV2, I capture
Blob
s viaMediaRecorder
in the background page. Chrome is smart about managing thoseBlob
s with memory/disk, as I need to temporarily store them before they can be transmitted over the network to the server.In MV3's event page proposal from #134, at least I'll be able to access the
tabCapture
API (supposedly). But because event pages are still ephemeral, does that mean I'll have to serialize and deserialize multiple megabytes of video capture as base64 strings and store them inchrome.storage
every couple seconds as new blobs come in (since even pages have a 5 minute lifetime)?Isn't that really CPU intensive versus just leaving a persistent background page open?
The text was updated successfully, but these errors were encountered: