Skip to content

A simple demo implementation for a WebRTC architecture using Janus

Notifications You must be signed in to change notification settings

LorDisturbia/janus-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽญ Janus demo

This repo contains a simple WebRTC demo that uses a Janus server to play back a video stream to a connected client.

๐Ÿ›๏ธ Architecture

There are three main components in this demo:

  • The Janus server, which is the actual Janus server. It implements the WebRTC stack (including the signalling server).
  • The Janus Node driver, which is a NodeJS server that implements application-level logic on top of the Janus server, acting as a middleware between a client and the Janus server.
  • The WebRTC client, which is a simple WebRTC client written in React.

๐Ÿค” How it works

The way it works is:

  • The Janode server connects to the Janus server using a WebSocket.
  • The client connects to the Janode server using another WebSocket.
  • The client sends a start message, to which the Janode server responds with a ready message.
  • The client sends an offer message that contains an SDP offer. The Janode server forwards this message to the Janus server, which returns an SDP answer, that is then sent back to the client as an answer message.
  • The client sends one trickle message for each ICE candidate, and the Janode server forwards them to the Janus server.
  • Once all ICE candidates have been sent, the client sends a trickle-complete message.
  • At that point, the client and the Janus server are connected and exchanging video streams through WebRTC.

See this Notion page if any of these concepts are unfamiliar to you.

About

A simple demo implementation for a WebRTC architecture using Janus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published