Skip to content

shannon/webrtc-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Running application

In one terminal

npm install
npm start

In another terminal

npm install -g localtunnel
lt -p 8080 -s <subdomain>

Open browser and go to https://<subdomain>.localtunnel.me

Walkthrough

Step 0 (Setup)

npm init
npm install koa koa-static koa-websocket kcors uuid

Step 1

Server

  • create index.js
  • serve public
  • add cors
  • add ws route

Client

  • create public/index.html
  • import adapter.js
  • connect to ws signal server

Step 2

Server

  • create uuid on WS connect
  • send welcome message to client

Client

  • restructure into class
  • accept welcome message

Step 3

Server

  • collect all collections
  • broadcast join
  • receive and relay offers

Client

  • recieve broadcasted joins
  • create peer connection
  • create and send offer

Step 4

Server

  • receive and relay answers
  • recieve and relay candidates
  • Server is done

Client

  • send candidates
  • receive canditates
  • receive offers
  • create and send answer

Step 5

Client

  • capture and output local video/audio stream
  • add local stream to peer connection

Step 6

Client

  • output remote video/audio streams
  • remove remote video on connection close
  • add support for SSL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published