Giter Club home page Giter Club logo

webrtc-1's Introduction

webrtc

web real time communication platform

alt webrtc development

Build Status Dependency Status NPM Status

This is a ready to deploy webrtc SDK and SaaS for a customized and flexible communication and collaboration solution .

SDK

Architecture

The Solution primarily contains nodejs frameworks for hosting the project and webbsockets over socket.io to perform offer - answer handshake and share SDP (Session description protocol ). alt webrtc development architecture

Technologies used
  1. WebRTC Web based real time communication framework. read more on webrtc

  2. Node (v5.0.0) Asynchronous event driven JavaScript runtime

  3. socket.io ( v0.9) Communication and signalling

Note : while its possible to use any prtotocol like SIP , XMPP , AJAX , JSON etc for this purpose , modifying thsi libabry will require a lot of rework . It would be advisble to start from apprtc directly in that case .

  1. Grunt It is a task Runner and its used to automate running of command in gruntfile
grunt -verbose

Get Started

To run this project following steps need to be followed in that order :

1. get the project from github
git clone https://github.com/altanai/webrtc.git webrtc
2. install nvm ( node version manager )
sudo apt-get install nvm
nvm use v5.0.0
3. install npm and update the dependencies

It will read the package.json and update the dependencies in node_modules folder on project location

	sudo apt-get install npm
	npm install
4. Change ENV variables and Test

To change the ports for running the https server and rest server, goto env.json

{       "hostname"      : "host",        
		"enviornment"   : "local",        
		"host"        	: "localhost",
		"jsdebug"       :  true,          
		"httpsPort"		:  8086,
		"restPort"		:  8087,
        "extensionID"   : "elfbfompfpakbefoaicaeoabnnoihoac"
}

To run the tests

	npm test
5. Start up the Server

To start the Server in dev mode and stop the server as soon as Ctrl+ C is hit or the terminal widnow is closed .

	node webrtcserver.js

read more about node

To start the Server using npm start ( using package.json) , behaves same as earlier run using node. We use supervisor to restart the server incase of exceptions or new code .

	npm start
6. JS and CSS Libs

Make a webpage and give holders for video and button elements that SDK will use .

7. Configure

Create the webrtc dom object

var local={
        localVideo: "localVideo",
        videoClass:"",
        userDisplay:false,
        userMetaDisplay:false  
    };

    var remote={
        remotearr: ["video1"],
        remoteVideoCount: "unlimited",
        remoteVideoContainer : "rightVideo",
        videoClass:"",
        userDisplay:false,
        userMetaDisplay:false    
    };

    var webrtcdomobj= new WebRTCdom(
        local,remote
    );

Get session id

sessionid = init(true);

Create a session json object with turn credentials nd the session created from above step

set preference for the incoming and outgoing media connectection. Bydefault all are set to true .

    var incoming={
        audio:  true,
        video:  true,
        data:   true,
        screen: true
    };

    var outgoing={
        audio:  true,
        video:  true,
        data:   true,
        screen: true
    };

Set widgets and their properties . Currently available widgets are * Chat * Fileshare * Screen Record * Screen Share * Video Record * Snapshot * Draw on Canvas and Sync * Text Editor and Sync * Mute (audio amd video) * Reconnect

	var widgets={
	}

Initiate the webrtcdev contructor

    var webrtcdevobj = new WebRTCdev ( 
        session,  incoming,  outgoing ,  widgets
    );

Start the session

    startcall();
8. VOIP calls and conf

open tab on chrome or mozilla browser and add a link to the https server using nodejs script https://127.0.0.1:8086/multiparty_fullfeatures.html

Used Libs

Following are the additioanl libraries packed with the project

Gulp

Minify and concat the js and css files into minscripts

gulp
forever

Keeps running even when window is not active

cd WebCall
forever start webrtcserver.js
PM2

To start the Server using PM2 ( a process manager for nodejs)

License

MIT

webrtc-1's People

Contributors

altanai avatar

Watchers

 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.