Javascript html5 截屏
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13842220/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
html5 capture the screen
提问by fabien
Possible Duplicate:
Using HTML5/Canvas/Javascript to take screenshots
Is there a way for a browser to take a global screenshot ? I mean, the entire screen, including what is not in the browser.
浏览器有没有办法截取全局截图?我的意思是,整个屏幕,包括浏览器中没有的内容。
I kown that I may sound a little bit silly by asking this.
我知道问这个可能听起来有点傻。
采纳答案by apsillers
There is experimental support for full-screen capturein Chrome's getUserMediaWebRTC function, using a {chromeMediaSource: 'screen'}parameter. The functionality currently requires explicit activation by an option in chrome://flags, and (like all WebRTC capture mechanisms) requires explicit consent from the user when the function is called.
Chrome 的WebRTC 功能中有对全屏捕获的实验性支持getUserMedia,使用{chromeMediaSource: 'screen'}参数。该功能目前需要通过 中的选项显式激活chrome://flags,并且(与所有 WebRTC 捕获机制一样)在调用该功能时需要用户的明确同意。
Other than that experimental option in Chrome, is not possible using pure JavaScript, but you could probably do it using a plugin like Flash, or an ActiveX control.
除了 Chrome 中的实验性选项之外,使用纯 JavaScript 是不可能的,但您可以使用 Flash 或 ActiveX 控件等插件来实现。
If you only want to capture a web page (rather than the whole screen), see Using HTML5/Canvas/JavaScript to take screenshots.
如果您只想截取网页(而不是整个屏幕),请参阅使用 HTML5/Canvas/JavaScript 截取屏幕截图。

