Skip to content

Electron bot sending a live video stream on a conversation

License

Notifications You must be signed in to change notification settings

circuit/live-cam-bot

Repository files navigation

live-cam-bot

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.

Details

  • 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

Getting Started

Run the app

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.