Skip to content

An Elixir based signaling server for WebRTC connection negotiation

Notifications You must be signed in to change notification settings

KenStipek/webrtc-phoenix-signaling

Repository files navigation

Elixir based WebRTC Peer-to-peer signaling server

Using Phoenix Channels

Project

This is an example of a Elixir based Phoenix WebRTC signaling server that helps two or more WebRTC clients (say, browsers or mobile apps) negotiate for a direct WebRTC connection.

WebRTC is a standard which allows peers to transmit real-time information directly between them without having to rely on servers. Basically, all direct video and voice call apps work like this.

Progress

The project is in progress.

Currently working:

  • Single room live WebRTC P2P negotiation with 2 peers
  • REST API authentication and authorization that will block 3rd party clients
  • Message broadcasting between clients without using WebRTC data channels (using Phoenix Channels instead)
  • Handling entrance and closing diffs via Phoenix Presence module

Install & Setup

The current setup does not rely on any external database, it maintains all data in transient state.

To install:

Make sure you have the latest Elixir & Erlang versions installed. Then:

mix deps.get

run:

mix phx.server

run in interactive Elixir shell:

iex -S mix phx.server

check REST API routes:

mix phx.routes

Under development:

  • Maintaining peer negotiation state at GenServer and/or Phoenix Presence module
  • Creating proper fallback methods for
  • Expanding channels and routes to a multi-channel infrastructure with automatic redirecting
  • Optimizing supervisor tree for more robust deployment
  • Writing proper documentation and tests, so that all documentation can be generated by Elixir docs
  • Writing deployment instructions
  • Redundant code cleanup & codebase improved structuring
  • (Adding Ecto models for PostgreSQL to maintain permanent nicknames and avatars)

About

An Elixir based signaling server for WebRTC connection negotiation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published