Output and interact with your Mac's screen over HTTP. Written using Node.js and GStreamer.
Node.js and GStreamer installed on your system.
Clone the repo and run yarn
to install dependencies. Run yarn configure
and yarn build
to build the native module. Run yarn clean
to clean the build directory.
yarn start --width 1920 --height 1080 --framerate 30 --quality 65 --extend --extend-width 1920 --extend-height 1080 --allow-input --tcp-port 12802 --http-port 8080
Passing options is optional. If not passed, they will default to the values specified above (other than extend
and allow-input
which are false
by default).
The resolution will not be used as is, rather it will be scaled against the target display's aspect ratio.
Extending works by initialising a virtual display using CGVirtualDisplay
, which is a private API. Therefore you may run into random issues, though I have yet to encounter any.
This is obviously extremely insecure, and is mostly just a cool demo. Anyone with your laptop's IP and the running port of this application will be able to move your mouse and click wherever they'd like.
To make the cursor follow your local device's, hold shift while moving it around. You can click without holding shift.
MJPEG does not make use of p-frames so it is very bandwidth heavy. Therefore you will likely run into performance issues over even a good network if you don't turn your resolution and framerate down.
It is quite useful for turning any device with a browser into a second display. This started because I wanted to see if I could use the display in my Tesla Model Y as a second display, mainly for fun.