I’m developing a small video conferencing app with phoenix and webrtc. So far I’ve figured out how to connect one to one and how to do signalling via channels. What I’m struggling with is creating and using multiple peer connections. And I can’t seem to find any tutorials on how to do this that aren’t either several peers on one page or using a third party api. I would really appreciate an example of how this is done properly, it doesn’t have to be with phoenix.
TL:DR: I’m looking for a code example/tutorial on creating a full mesh peer connection without third party api.
And I can’t seem to find any tutorials on how to do this that aren’t either several peers on one page
Do you want your peers to be on different pages?
As for tutorials, I’m not sure they are necessary since there isn’t much to webrtc api, you can read through it on WebRTC API - Web APIs | MDN in a few hours probably, the explanations are quite clear there.
As for tutorials, I’m not sure they are necessary since there isn’t much to webrtc api, you can read through it on WebRTC API - Web APIs | MDN in a few hours probably, the explanations are quite clear there.
That guide explains the basics of webrtc not how to create and manage multiple peer connections at once.
I didn’t mean guides on mdn, rather the api reference. It would help you understand what’s needed to make what you want work.
I more or less have a concept of how webrtc api works, I’m just really bad at javascript. Rather the problem I’m having isn’t that I don’t know how to set up a connection between two peers but that I don’t know how to write a client side function that will send and receive all of the offers/answers properly.
For example: I have 3 peers on my page, I need each of them to send and receive the appropriate offers to the appropriate peer on the other four pages. And then to appropriately receive the answers and form a connection.
I understand that with sufficient knowledge of webrtc api and some effort I can hack together some system for doing this. I was just looking for an example of how this should be done properly before trying to “reinvent the wheel”.