[Feature request] Automated screenshot without browser extension
Interesting Idea! Will look to implementation option of such feature. But it would probably be doable!
We might use https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia?ref=hackernoon.com instead. But I'm not sure how it works in Tauri and Electron ...
It should work fine.
Ok, I've tried the getDisplayMedia API, but I didn't find it very practical, because it asks you for permission every time and you also have to select which tab, so I'm not in favor in implementing this. If you know any other practical method let me know.
it asks you for permission every time
Did you disable cache or something ? Permissions are normally remembered once granted.
you also have to select which tab
I don't think this can be bypassed though.
If you know any other practical method let me know.
There's no clean alternative.
A dirty one would be to manually generate an image by parsing HTML & CSS : https://www.npmjs.com/package/html2canvas
A just-a-little-bit less dirty one would be to load said HTML & CSS into a server-side headless browser and generate a screenshot.
Hello, Was this implemented ? Thanks
Hey, no, I didn't find the solution very pratical, so I've decided to skip this.
I guess, we would need to support this for each platform separately. For Electron, there is Desktop Capturer API.
However, this is probably out of scope for now.