views:

157

answers:

3

Hi, I'm writing an npapi plugin. I was wondering if there is a way to capture the browser screen from my plugin using either npapi or javascript.

Any help would be appreciated.

Thanks

A: 

There isn't a way to do it with JavaScript, but you could do it with native code couldn't you?

Ronald
I guess we could do it with native code, but im not sure how ?
kambamsu
I don't know anything about writing plug-ins to be honest. From what I understand you have to write code to target different operating systems correct? If so, I'd start searching for how to do screen captures on different platforms. Here is how you can do it on OSX: http://developer.apple.com/mac/library/samplecode/SonOfGrab/
Ronald
A: 

Someone on the FireBreath mailing list recently created a plugin with FireBreath that does this on windows; he was using it with selenium for automation testing, I believe. He had mentioned possibly making it open source; I'd consider posting a question to the FireBreath list and see if he's willing to share.

http://groups.google.com/group/firebreath-dev

Taxilian
A: 

In Mozilla you can achieve this by using Canvas.prototype.drawWindow(). But access to this method is allowed only to privileged code, i.e. extensions.

Ionuț G. Stan