pion/webrtc ? reverse-engineered prompt

Reverse engineered prompt

Build me a pure Go WebRTC library that lets apps create peer to peer audio, video, and data connections without relying on Cgo.

I want the core API to feel like the browser WebRTC API, so a Go developer can create peer connections, exchange SDP, handle ICE, use STUN and TURN, open data channels, and send or receive media streams. It should support the common WebRTC pieces like renegotiation, ordered and unordered data channels, RTP and RTCP access, and stats. It should also work cleanly in normal Go apps and be usable in browser style examples and WebAssembly too.

Please include a few simple examples that show how to connect two peers, send a file or text over a data channel, and stream audio or video. Make the code easy to read, well tested, and documented enough that someone new to WebRTC can get started. If you need to check current WebRTC behavior or API details, look up the latest docs online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab