High Performance Browser Networking by Ilya Grigorik is a canonical resource. Lots of deep historical and technical background on WebRTC. As well as WebSockets, HTTP/2, TLS, UDP, TCP, and much more.<p><a href="https://hpbn.co/" rel="nofollow">https://hpbn.co/</a><p>Then for a practical example, try this Codelab on Real time communication with WebRTC:<p><a href="https://codelabs.developers.google.com/codelabs/webrtc-web/#0" rel="nofollow">https://codelabs.developers.google.com/codelabs/webrtc-web/#...</a><p>Once you are ready to build your own prototype. You can check out existing implementations from PeerJS, SimpleWebRTC, SIP.js, and Twilio.<p>Although it is relatively easy to invent your own. Dedicated third party cloud providers such as Twilio are quite mature. Best of luck!<p><a href="http://peerjs.com/" rel="nofollow">http://peerjs.com/</a><p><a href="https://sipjs.com/" rel="nofollow">https://sipjs.com/</a><p><a href="https://simplewebrtc.com/" rel="nofollow">https://simplewebrtc.com/</a><p><a href="https://github.com/coturn/rfc5766-turn-server/" rel="nofollow">https://github.com/coturn/rfc5766-turn-server/</a><p><a href="https://github.com/otalk/restund" rel="nofollow">https://github.com/otalk/restund</a><p><a href="https://talky.io/" rel="nofollow">https://talky.io/</a><p><a href="https://xirsys.com/" rel="nofollow">https://xirsys.com/</a><p><a href="https://www.twilio.com/webrtc" rel="nofollow">https://www.twilio.com/webrtc</a>
There are a few protocols involved in webrtc. Read MDN’s documentation and go from there. I’d imagine the best place to understand specific details from there would be the browser source code. Check Mozilla’s PRs for webrtc.