Random chat explained
Peer-to-Peer Video Chat, Explained Simply
A peer to peer video call sends your video and audio straight from your device to the other person's, instead of through a company's server. In plain terms, the website introduces the two of you, then steps aside while your devices talk directly. That makes calls quick and keeps the video off the site's servers, but it also means the two devices learn each other's internet address.
This guide explains how P2P video chat works, how it compares with server-routed calls, what happens when a direct connection isn't possible, and what it all means for your privacy.
The telephone operator analogy
Picture an old-fashioned telephone exchange, where an operator connects every call.
- Server-routed call: you talk to the operator, the operator talks to your friend, and every word passes through the switchboard. The switchboard has to handle every conversation at once.
- Peer-to-peer call: the operator gives you your friend's direct number, then you dial them yourself. The operator made the introduction but isn't on the line.
- Relayed call: the direct line won't go through, so the operator patches you through a relay station. The relay carries the call, but the signal is scrambled in a way only you and your friend can unscramble.
In a video chat, the operator is the website's signaling server, the direct number is your device's network address, and the scrambling is encryption.
How peer-to-peer video works, step by step
- You both open the site. Your browser asks permission to use your camera and microphone.
- The site introduces you. Its signaling server passes small setup messages between the two browsers: which video and audio formats each one supports, and a list of network addresses where each can be reached.
- The browsers test routes. Using a process called ICE, they try the possible addresses to find one that works. A helper called a STUN server lets each device discover its public address.
- A direct connection forms. If a route works, video and audio flow straight between the two devices.
- Everything is encrypted. The browser technology behind this requires the media to be encrypted, so the stream is scrambled the whole way.
That browser technology is called WebRTC. Our plain-English guide to WebRTC covers the browser side in more detail.
Why video chats use P2P
- Lower delay. The shortest path between two people usually beats a detour through a data center, which matters when you're trying not to talk over each other.
- Less data on company servers. On a direct call, the video never passes through the site's servers, which limits what the service ever receives.
- Cheaper to run. Carrying video for every call costs a service a lot. Letting devices connect directly keeps that cost down, which helps free services stay free.
- A natural fit for one-to-one. With two people, each device sends a single stream. That's exactly the case peer-to-peer handles best.
Peer to peer vs server video calls
Many group meeting apps route video through servers instead, because sending your video separately to every participant would quickly overwhelm a home connection. Here's how the two approaches compare.
| Point | Peer-to-peer | Server-routed |
|---|---|---|
| Path of your video | Your device to theirs, directly when possible | Your device to a server, then on to everyone else |
| Delay | Usually the lowest | Depends on how far away the server is |
| Best for | One-to-one calls | Group calls, broadcasts, cloud recording |
| Who handles the media | The two devices | The company's servers |
| Who sees your IP address | The site, and the other person | The site; usually not the other callers |
| Cost to run | Low, except when a call needs a relay | Higher, since servers carry every stream |
When a direct connection isn't possible
Sometimes the direct line won't connect. Strict workplace firewalls, some public Wi-Fi, some mobile networks and some VPNs block the routes a direct call needs.
In those cases the call falls back to a relay, called a TURN server, which passes the encrypted stream between the two of you. On Omlet, when a direct connection isn't possible, the call is relayed through Omlet's network provider. It stays encrypted either way, and Omlet doesn't record or store calls.
A relayed call can add a little delay, because the video takes a detour. Our guide to what a TURN server is explains how relays work and why some networks need them.
The side effect: your IP address
To connect directly, two devices need each other's network address. So a P2P call can share your IP address with the person you're talking to. That's true of most browser video chats, Omlet included.
An IP address usually reveals your rough area and internet provider, not your street address or name. Still, if you'd rather keep it private:
- Use a reputable VPN app on your device, so your partner sees the VPN's address instead of yours. It can add some delay.
- Don't count on a relay to hide it. During setup, browsers can share more than one possible address, so treat your IP as visible either way.
- Keep everything else private too: full name, workplace, neighborhood and social handles.
There's more on this in can people see your IP address on video chat.
If a VPN makes calls lag or fail to connect, try one of its servers closer to you, or turn it off for the chat if your IP isn't a concern.
Peer-to-peer on Omlet
On Omlet, matching happens first: you're paired with whoever has waited longest and fits your filters. Then the call itself is encrypted and peer-to-peer between you and your partner, relayed through Omlet's network provider only when a direct connection isn't possible. Omlet doesn't record or store calls, and there are no ads.
Curious about the pairing step? Read how random video chat matching works. Or start a video chat and see a peer-to-peer connection in action.