This combines the Electron Quick Start with the Realtime Communication with WebRTC tutorial from Codelabs.
It runs a Socket.io signal server, then a peer connection over webRTC between Electron and the browser. Electron serves the signal server. This currently runs over localhost.
To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:
# Clone this repository
git clone https://github.com/lisajamhoury/Electron-to-Browser-WebRTC-Example
# Go into the Electron application folder
cd Electron-to-Browser-WebRTC-Example/electron_app
# Install dependencies
npm install
# Run the Electron app — this will start the signaling server in Electron
npm start
# In a new command line window, go into the client folder
cd Electron-to-Browser-WebRTC-Example/browser_client
# Run a simple python server on your localhost
# If python 2
python -m SimpleHTTPServer
# If python 3
python -m http.server