是否可以从Web应用程序中捕获客户端桌面的屏幕快照? [英] Is it possible to capture a screenshot of the client's desktop from within a web application?

查看:116
本文介绍了是否可以从Web应用程序中捕获客户端桌面的屏幕快照?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以从基于JavaScript的Web应用程序中捕获客户端桌面的屏幕截图。我想向用户提供应用程序中的一个按钮,他们可以用来获取其桌面屏幕(而不是页面或页面中的元素,是实际的OS桌面屏幕)的屏幕截图。

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).

主要浏览器(Chrome和Firefox)是否允许这种操作?我知道可能存在安全隐患,但是我是否可以请用户许可以进行此类访问?是否有任何库,工具或文档可以帮助我呢?还是这不可行?

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.

推荐答案

像这样的一个可以帮助您:如何捕获客户端桌面部分的屏幕截图使用HTML / JavaScript吗?

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

通过WebRTC和屏幕捕获,您可以获取桌面屏幕截图(Firefox和Chrome均支持)。 Javascript库 RTCMultiConnection 对于使用WebRTC很有用,但也可以不使用附加库。

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.

这篇关于是否可以从Web应用程序中捕获客户端桌面的屏幕快照?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆