WebRTC Video Call Tutorial: Build a 1:1 Video Chat in JavaScript with @metered-ca/peer

Scope — a 2-tab, 1:1 WebRTC video call. Two browser tabs join the same channel, each publishes its camera, and each renders the other's stream. No signaling server to run, no peer.call(remoteId) loops, no hand-wired TURN. We use a publishable key (pk_live_…) so there's nothing server-side to stand up. For group calls, React, or React Native, see Next steps — those are out of scope here on purpose.

Goal

This tutorial builds a complete WebRTC video call in JavaScript — open two browser tabs, click Join, and each tab shows the other's live camera — using the MIT-licensed @metered-ca/peer SDK, with no signaling server to run, TURN credentials delivered for you, and automatic reconnection if the network drops. It's a single HTML file you can copy-paste and run.

Most WebRTC video call tutorials make you