I have a very simple webRTC 1 on 1 video chat application. It works great on localhost, but I cannot get it working across different networks. I have read as much online as I can, but nothing seems to be working. I suspect I am doing someone out of order, perhaps someone else can spot it out.
All of my signalling seems to be working (I have a lot of debug output), so I do not think that is the issue.
I have all the code up on github here, primary file of interest is videochat_manager
I thought I would sum up my process:
wait until there are two people in the room
caller creates offer description, and sends it to answerer
answerer either accepts, or queues up the offer until ready to answer
answerer is ready (has peer connection set up)
answerer sets remote description
answerer creates answer description and sends it to caller
caller sets remote description
once both peers have their descriptions set, add all ice candidates (in a queue)
whenever you receive your peers remote stream, add it
That is what I am doing on a very high level. Any glaring errors?
You can find the demo app here. You can change rooms up in the address bar
here are four candidates on the caller side of things. There are two more that I didn't post
Object {type: "candidate", label: 0, id: "audio", candidate: "a=candidate:2036686134 1 udp 2122260223 10.142.85.73 35544 typ host generation 0 ↵"}
Object {type: "candidate", label: 1, id: "video", candidate: "a=candidate:2036686134 1 udp 2122260223 10.142.85.73 35544 typ host generation 0 ↵"}
Object {type: "candidate", label: 0, id: "audio", candidate: "a=candidate:937861574 1 tcp 1518280447 10.142.85.73 0 typ host generation 0 ↵"}
Object {type: "candidate", label: 1, id: "video", candidate: "a=candidate:937861574 1 tcp 1518280447 10.142.85.73 0 typ host generation 0 ↵"}
...
It would seem that your Turn and stun servers are not working the way they need to be to grab appropriate ICE candidates public IP addresses.
I tested your demo site with your current ICE servers and did not get a public IP address for any of my candidates. Try some different servers and see if that improves your situation some.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With