# WebRTC

Google supported standard for easy p2p communication that can then scale to use an intermediate server for > 4

Handles everything from stabilization, codecs, etc for ez use and multi platform including many browsers and matching native performance

Beyond about 3/4, probably need a server to communicate because all the devices will connect and send data to every other device

Need signal server to let the peers communicate session data to begin connection

Need a hosted STUN / TURN server to handle fallback when because of NAT or other, the p2p connection fails

**Interface**

MediaStreams

P2P Connections

### Debugging

chrome://media-internals


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://openai.gitbook.io/code-cheatsheets/all/cs_fundamentals/webrtc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
