Skip to content

An example of setting up basic video chat with WebRTC, node.js and Twilio

Notifications You must be signed in to change notification settings

AdamWarlock001/video-chat-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Chat

A simple video chat between two clients as an example of how to connect two browsers via WebRTC using Twilio STUN/TURN infrastructure.

Read the blog post to see how to build this: Getting Started with WebRTC using Node.js, Socket.io and Twilio’s NAT Traversal Service.

Quick start

  • Clone this repo
git clone https://github.com/philnash/video-chat.git
cd video-chat
  • Install dependencies
npm install
  • Create a .env file copying .env.template. Fill in your Account SID and Auth Token from your Twilio console
  • Start the server
npm start
  • Open two browsers on your laptop and point them localhost:3000. If you want to use a client on another computer/mobile, make sure you publish your server on an HTTPS connection (otherwise the camera may not work). You can use a service like ngrok for that.
  • Click on the "Get Video" button on both browsers
  • Click on button "Call" on one of the browser, to establish the video call

About

An example of setting up basic video chat with WebRTC, node.js and Twilio

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.5%
  • HTML 6.5%