Code Monkey home page Code Monkey logo

comhall-webrtc's Introduction

comhall-webrtc

WebRTC producer/consumer for Community Hall projects.

The package contains three modules: producer, consumer and node.js server.

Producer

Producer module is used for capturing media streams from connected media devices and making them accessible by remote consumers. Producer uses WebRTC for streaming.

  1. Run server
  2. Run HTTP server (WebRTC does not allow access to the media sources from file:/// resources):
$ python -m SimpleHTTPServer 8000
  1. Open localhost:8000/producer page in browser (Chrome)

Hint: while on producer's page, press 's' to see custom settings panel

Hint: while on producer's page, press 'l' to see the current log

Consumer

Consumer module is used for fetching media streams published by a remote producer.

  1. Make sure the server is running
  2. Make sure server is accessible through your network (for the date 1/22/2014 server's static IP address is 192.168.100.122)
	$ ping 192.168.100.122
  1. Open http://192.168.100.122:8000/consumer/ in the browser
  2. Type server's IP address (192.168.100.122 as of 1/22/2014) in the field and press 'Fetch'
  3. Video stream should be received momentarily

Hint: while on consumer's page, press 'l' to see the current log

Server

Server module is used for delivering signaling functionality between consumers and producer so that the WebRTC's negotiation process can be conducted.

  1. Install node.js
  2. Get express package:
$ npm install --save [email protected]
  1. Get socket.io package:
$ npm install --save socket.io
  1. Run server:
$ node server/index.js

Two cameras support

In case if there is a need for publishing two streams from different devices, two producer instances can be launched on the same machine in separate browser tabs with different port options enabled on the settings panel (press 's' to reveal it on the producer's page):

  1. Run PTZ camera server:
$ node server/index.js 3001
  1. In separate Terminal window, run WebCamera server:
$ node server/index.js 3002
  1. Open localhost:8000/producer page in first browser tab
    • Press 's'
    • Choose '3001 (PTZ camera)' server port option
    • Configure producer to acquire video from PTZ camera by choosing appropriate device from the list
  2. Open localhost:8000/producer page in second browser tab
    • Press 's'
    • Choose '3002 (Web camera)' server port option
    • Configure producer to acquire video from web camera by choosing appropriate device from the list

Hint: Sometimes, when changing publishing camera on one producer tab while other producer is running, consumer may still receive old video stream. Try refreshing consumer page, chose correct camera and press 'Fetch' again.

comhall-webrtc's People

Contributors

peetonn avatar tran-brian avatar

Stargazers

 avatar

Watchers

Alex Afanasyev avatar Alex Nano avatar Jeff Burke avatar  avatar  avatar  avatar  avatar James Cloos avatar Adeola Bannis avatar  avatar  avatar Jeff Thompson avatar  avatar Wentao Shang avatar  avatar Zhehao Wang avatar  avatar  avatar Joshua Danish avatar Ian Shelanskey avatar  avatar Representations Activity Play and Technology Lab avatar  avatar Zoe Sandoval avatar  avatar  avatar  avatar  avatar

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.