RestComm / webrtcomm

WebRTCComm is a simple high level JavaScript WebRTC framework for Web Developers to add Real Time Communications and IM Capabilities to any website.
http://www.restcomm.com/
GNU General Public License v3.0
18 stars 21 forks source link

Refactor onWebRTCommCallOpenedEvent #66

Closed atsakiridis closed 7 years ago

atsakiridis commented 7 years ago

Seems that that right now it is triggered from a couple of places, which don't seem right. Instead, I think we should trigger it from one place: onRtcPeerConnectionIceChangeEvent, called from onicechange and for iceConnectionState == connected.

Just keep in mind this commit, and make sure that there are no audio issues with new logic

atsakiridis commented 7 years ago

Some further notes after doing some coding & testing:

atsakiridis commented 7 years ago

Did some more digging and the issue isn't the STUN/TURN settings. Especially for web the web app needs to know the remote stream at the point where onWebRTCommCallOpenedEvent is called. So we should keep that event in onRtcPeerConnectionOnAddStreamEvent and only there.