Accent color
All projects

Bored-weekend side project

Pocket Call

Topics
Web, Backend
Built with
  • WebRTC
  • WebSocket
  • Node.js
  • Redis
A minimal video call window with two people in the room sunday-boredom, connected peer to peer.

I wanted to see how little it takes to make a video call work. The answer turned out to be one HTML page and a WebSocket server small enough to read in one sitting.

It’s a toy. No accounts, no recording, nothing clever for big group calls, and my public signal server is switched off now. The source is here if you want to run your own.

Introduce, then step aside.

Both browsers join a room on the signal server. The newcomer gets the list of peers, the people already there are told to make an offer, and the offer, answer and ICE candidates are passed along like notes.

Then the server is out of the picture: audio and video go browser to browser, with a public STUN server to find a route. Run more than one server instance and Redis pub/sub carries the notes between them.

  • Rooms are just names, created on first join
  • A repeated join is ignored, not doubled
A sequence diagram: browsers A and B join a room through the signal server, trade offer, answer and ICE candidates, then talk directly over WebRTC.

The small things you miss when they’re gone.

Mic and camera toggles, double click for fullscreen, a self-view you can drag out of the way, and a wake lock so a phone doesn’t dim in the middle of a call.

The call page with callouts for the draggable self-view, mic and camera toggles, double click fullscreen and the wake lock.