Skip to content

Conversation

@athouary
Copy link

@athouary athouary commented Apr 22, 2020

Initial issue: otalk/sdp-jingle-json#29

These changes will prevent the error TypeError: parts[2] is undefined from occurring when Firefox uses empty string candidates that can't be parsed properly.

@nels83
Copy link

nels83 commented Jun 1, 2020

According to MDN : https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/candidate an empty string "is known as the "end-of-candidates" marker".

Maybe changing
if (event.candidate) {
to
if (event.candidate && event.candidate.candidate.length) {

should be better since it will emit endOfCandidates ?

@athouary
Copy link
Author

athouary commented Jun 1, 2020

I believe I tested what you are suggesting and got unexpected results, but I'm not so sure anymore, even though it does sound like the right thing to do.

I'm not sure that I'll take the time to update the PR since I worked around the issue by not using the RTCPeerConnection module anymore, so feel free to create another PR if you want your suggested change to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants