This proves WebRTC works, but you need an API with no assumptions just like a normal TCP or HTTP server/client that allows you to build on top but instead of a socket you would get a RTCPeerConnection ready to use which is what
https://github.com/LuKks/like-webrtc gives you for full freedom.