sipsorcery icon indicating copy to clipboard operation
sipsorcery copied to clipboard

Set protocol (tcp) for RTC Ice Candidate

Open ghost opened this issue 2 years ago • 3 comments

If I create a new instance of RTCIceCandidate from RTCIceCandidateInit and the candidate uses tcp as protocol type, the constructor will not set the protocol property. I noticed this behavior when I called RTCPeerConnection.addIceCandidate() with tcp candidate and RtpIceChannel.cs not fires OnIceCandidateError in this line.

ghost avatar Dec 15 '22 14:12 ghost

Hi @leo0104 I've generated the PR please check it and let me know if any change is needed.

Cretus-iosDev avatar Oct 06 '23 15:10 Cretus-iosDev

Hi @Cretus-iosDev thank you for your work! Unfurtunately I'm not working with this project anymore and I'm currently not able to test your solution.

As far as I can remember, my problem was that the protocol property was not set in the constructor. As a workaroud I added the following line to the end of the RTCIceCandidate constructor:

protocol = iceCandidate.protocol;

But I am not sure if this is the right way to do it.

ghost avatar Oct 10 '23 05:10 ghost

@leo0104 Thanks for your reply. so I made some changes in the code and I hope that it will work. can you please tell any other admin to check it and merge the code

Cretus-iosDev avatar Oct 10 '23 13:10 Cretus-iosDev