Electron-based Bot utilizing the setScreenshareStream API to send a video stream captured from a local camera.
This example would be suited to run on a Raspberry PI with a local camera and wifi. The PI could then be used for surveillance, local surf conditions or anything else you'd like to share.
Electron is based on node.js and Chromium and is therefore able to utilize the Circuit JS WebRTC APIs unlike a regular node.js app.
- Group conversation to stream video on is predefined and its ID set in config.json
- Bot will start (or join) conference on given conversation and share the video stream of the local camera. If non default camera is to be used, setMediaDevices can be used to choose a video input device.
- Bot will ensure the conference is always running
- Register an account on circuitsandbox.net (if you didn't yet)
- Register a bot on the sandbox (OAuth 2.0 Client Credentials)
This example uses async/await, so node.js version 7.6+ is required
git clone https://github.com/circuit/live-cam-bot.git
cd live-cam-bot
cp config.json.template config.json
// Edit config.json with your credentials and the conversation ID to stream on
npm install
npm start // or npm run dev
When running using "npm start" no window is opened. Run using "npm run dev" if you want to debug the app.