Robbi
unread,Aug 29, 2023, 5:47:37 AM8/29/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, Robbi, Jackie Han, Chromium Extensions, wOxxOm
I did more testing by capturing the tab next to the side panel and transmitting it to the presentation receiver.
The results are disappointing; here are my thoughts:
both "
chrome.tabs.captureVisibleTab" and "
chrome.tabCapture.getMediaStreamId" allow me to get a screenshot of the tab exactly as the user currently sees it.
In practice, if the tab is not totally visible (because the side panel has been enlarged too much) the screenshot will be cut or in any case shrunk (if the content is "responsive").
I verified that through the "
capture node screenshot" function in the "Elements" panel of the "Devtools" I get an image that is not cut.
I think we can replicate this using a method of the chrome.debugger API but I find the warning generated by asking the relative permission in manifest.json is excessive for my use case.
Furthermore, since the content to be mirrored on the receiver is (largely) "responsive", using "capture node screenshot" and sending the dataURL of that image
will never get a decent result if the video resolution of the latter is different.
Perhaps the only "decent" solution would be to implement the logic of the 3 pages (serving the 3 types of link-action) in the receiver page.
Obviously this file will have to receive "much more substantial" messages as inside it I won't be able to use any chrome API, and fetch cross-origin resources.
This in theory, in practice "I'll be damned if I start doing such a thing".
What about the "Presentation Web API"?
The example shown
here "maybe" shows the upper limits of this technology (very poor)