18 comments

[ 4.5 ms ] story [ 57.8 ms ] thread
I made something similar that uses the Chrome App API. Basically it creates a HTTP server that acts an MJPEG server which sends the currently captured tab. All of those APIs have a really vast array of features... kind of scary actually.

Source code: https://github.com/speps/grumpy-pi-cast

Is there possibility for remote control? Like simulating keyboard and mouse. I did not find an API for this.
This would be great.

Also any one know of open source tools that have remote control of the users machine?

What about using WebRTCs to record, stream screen data? This should work on Firefox, ... as well.
Ignore it!! I did not read the article :D
In fact, in Firefox it works without creating the extension.
I'm going to be following this post up with how to do the same in Firefox and how to put that all together for as much support as possible.
Unfortunately still broken on gnome/wayland: https://bugzilla.gnome.org/show_bug.cgi?id=784199

edit: gnome bug not linux

The GNOME bug is indirectly related, but linking to just it distorts the situation quite a lot.

Wayland has no screen recording API by default, so compositors implement their own - some already have their own, some, such as GNOME's mutter, don't.

But even if mutter implements it, that doesn't really fix it for all situations - there's many users on KDE, for example, for whom the GNOME bug is entirely irrelevant.

Linux != GNOME.

thanks, fixed
Mutter has experimental support for a PipeWire stream, exposing two APIs: org.gnome.Mutter.RemoteDesktop and org.gnome.Mutter.ScreenCast

Thanks to the gnome-remote-desktop project, which landed in stable Fedora back in September.

even on Xorg multiple screen is broken (can't select single screen) on Linux
bros... can we use es6 and more in a chrome extension bc it's defo running in chrome? Just a thought from scrolling through this post and spotting some sexy arrow functions which I've been dropping from anything client side
That's an interesting question, depends on the support you're expecting.

In this case the desktopCapture API was introduced in Chrome 34 but arrow functions only turned up in version 45 onwards.

You can set a minimum Chrome version in the extension manifest though, which would mean you can set a version that guarantees the JS support that you want.