Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to capture a screenshot of the client's desktop from within a web application?

I would like to know if it is possible to capture a screenshot of the client's desktop from within a JavaScript based web application. I want to provide to the users a button within the application that they can use to take a screenshot of their desktop screen (not the page, or elements in the page, the actual OS desktop screen).

Does the main browsers (Chrome and Firefox) allow this kind of operation? I'm aware that there may be security concerns, but could I maybe ask permission from the user to have this kind of access? Are there any libs, tools or documentation that can help me with that? Or is this just not feasible?

I did some research on the subject but only found methods to take a screenshot of content within the browser.

like image 499
adamasan Avatar asked Oct 29 '22 00:10

adamasan


1 Answers

Looks like this one will help you: How to capture screenshot of parts of the client "desktop" using HTML/JavaScript ?

With WebRTC and Screen Capturing, you can take desktop screenshots (it's supported in both Firefox and Chrome). The Javascript library RTCMultiConnection is very useful for working with WebRTC, but it's also possible without the use of an additional library.

like image 87
Keshpeth Avatar answered Nov 15 '22 05:11

Keshpeth