Giter Club home page Giter Club logo

minimal-webrtc's Introduction

This is a *minimal* demo of WebRTC video calling between two browsers.
Because the signalling layer isn't standardized, you'll need to run a
small node.js server to pass signalling messages between the two
browsers.  The media connections are point-to-point, though, once the
signalling has happened no server is required.

This demo is based on Silvia Pfeiffer's WebRTC via Web Sockets demo,
and Muaz Khan's WebRTC-Experiment websocket-over-nodejs demo.
Silvia's demo became obsolete (it uses ROAP signalling while JSEP is
now the standard) and Muaz's demo was more complex than I liked which
made it difficult to figure out what the WebRTC API's were doing.
Both of their code was very helpful to me, though!

Silvia's Blog post:
http://blog.gingertech.net/2012/06/04/video-conferencing-in-html5-webrtc-via-web-sockets/

Muaz's WebRTC Experiments web site:
https://www.webrtc-experiment.com/

Muaz's WebSocket over Node.js demo:
https://github.com/muaz-khan/WebRTC-Experiment/tree/master/websocket-over-nodejs

Installation:

Install node.js from http://nodejs.org

Install Node's websocket package:
$ npm install websocket

Install the node-static package to serve static files:
$ npm install node-static

Usage:

Run the Node server:
$ node websocket-server.js

Point two browsers at http://your-server-address:1337/.  You'll be
prompted to allow the use of your camera and microphone.

One of the browsers clicks "Call" and the call should be set up.

To close the call just reload the page.  Like I said: this is a
minimal demo.

Debugging the Node Server:
  install https://github.com/node-inspector/node-inspector
  run the node app in debug mode (will stop at the first line)
  $ node --debug-brk websocket-server.js
  then in another terminal
  $ node node_modules/node-inspector/bin/inspector.js
   - or -
  $ node_modules/.bin/node-inspector
  open chrome to http://127.0.0.1:8080/debug?port=5858
  step once to go to the first line of the program

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.