Coder Social home page Coder Social logo

opentoknodejs's Introduction

Getting started: NodeJS + OpenTok

This repo is designed for beginners. It's the bare minimum to build a fully functioning video chat room

How to run:

First, you need to install a list of dependencies. Type npm install in your terminal

Run your nodejs server node app.js or supervisor app.js

After you run the nodejs server, simply go to your browser and type localhost:9393/roomid Everyone in the same room will be able to video chat with each other.

For a live demo, this is hosted at http://nodeopentok.aws.af.cm/.

Requirements

This app features the latest in Web Media Streaming technology using WebRTC. Currently, only Chrome supports it. To run on other browsers using flash, simply change the javascript library to use flash in view.ejs

<script src="http://static.opentok.com/v0.91/js/TB.min.js"></script>

File Descriptions

README.md

This is this readme file, written in Markdown

package.json

Json object of your app description and all the modules that your nodejs app needs to run

node_modules

All the modules that you defined in package.json will be downloaded into this folder after you type npm install

app.js

Server side code! Code Summary:

Whenever we get a request, check the url to see if an OpenTok sessionID exist for that particular URL. If not, create a new OpenTok sessionID. Pass the OpenTok sessionID and corresponding Token into the view

view.ejs

Client Side Code! Code Summary:

With the OpenTok sessionID and token generated by app.js, Connect to the OpenTok session. When we are connected, create a publisher and start publishing video into the session. Subscribe to all video streams from other publishers.

Go Code!

Thanks for reading. My name is Song Zheng and I am a Developer Evangelist at TokBox - @songz

opentoknodejs's People

Contributors

songz avatar

Watchers

James Cloos avatar ALIEN MASTER 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.