I know that you can capture images from an HTML5 video stream using canvas and display them on the page. What I am interested in is can you use the canvas object to create an overlay on top of a web page and then capture a PNG snapshot of that page or part of it.
I would like to enhance our website reviewing tools by adding screen capture (within the browser page) which could then be submitted to a remote server.
YouTrack does this with a Java applet but is it possible with modern HTML5 techniques?
Any other suggested solutions to this problem would also be appreciated.
Thanks
This gets asked a lot. The short answer is that it can’t be done for security reasons.
The longer answers include mention of the
drawWindowfunction that only FireFox has, which only works locally (again, for security reasons). In the future it may work once the user gives permission, like in the case of the Java applets of today. In the future, it might even be part of the spec and not a one-off thing done by Mozilla.If you’re feeling crazy, you could attempt to make an entire HTML renderer, take the DOM tree for the page, and attempt to render it in Canvas. This is a fool’s errand.