Hey @triniwiz,
I am using the alpha22 branch and am having trouble setting up connections between peers that are both behind a NAT. When I forward all UDP traffic on the router of one of sides to the specific device then it works fine.
I guess this is expected behaviour when using only STUN, so I am now using Twilio's NAT Traversal Services which also includes various TURN servers options, but that also does not work. So to try and debug the issue, I was wondering whether we have a way of knowing whether the connection chose a TURN server as I would expect in this case?
Also I am trying to register to the state change events on Android and data channel events which do not fire at all. Registering to these events causes the app to hang on Android. Any idea why?
this.connection = new TNSRTCPeerConnection(this.config);
this.connection.onIceCandidate((candidate) => {
// works fine!
});
this.connection.onTrack((track) => {
// works fine!
});
this.connection.onConnectionStateChange(() => {
// doesn't fire on Android (iOS is fine)
console.log('onConnectionStateChange: '+this.connection.connectionState);
});
this.connection.onDataChannel((channel:any) => {
// doesn't fire on either Android or iOS
console.log('onDataChannel');
console.dir(channel);
});
Hey @triniwiz,
I am using the alpha22 branch and am having trouble setting up connections between peers that are both behind a NAT. When I forward all UDP traffic on the router of one of sides to the specific device then it works fine.
I guess this is expected behaviour when using only STUN, so I am now using Twilio's NAT Traversal Services which also includes various TURN servers options, but that also does not work. So to try and debug the issue, I was wondering whether we have a way of knowing whether the connection chose a TURN server as I would expect in this case?
Also I am trying to register to the state change events on Android and data channel events which do not fire at all. Registering to these events causes the app to hang on Android. Any idea why?