-
-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ICE end-of-candidates messages #2622
Conversation
We were casting a POJO to an RTCIceCandidate for the dummy end-of-candidates candidate, but #2473 started calling .toJSON() on these objects. Store separately whether we've seen the end of candidates rather than adding on a dummy candidate object. A test for this will follow, but a) I want to get this fix out and b) I'm currently rewriting the call test file to add typing. Fixes element-hq/element-call#553
* @param content The candidate to queue up, or null if candidates have finished being generated | ||
* and end-of-candidates should be signalled | ||
*/ | ||
private queueCandidate(content: RTCIceCandidate | null): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could avoid the step with null
and set candidatesEnded
right at the start?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean here - at the start of what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking we would set candidatesEnded = true
right after receiving the last candidate and avoid calling queueCandidate()
with null though since that might require a bit more work (if even possible) and you're on holiday, we can go with this as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I see - we need to schedule it to be sent too though, so this seemed the easiest way of re-using that code.
We were casting a POJO to an RTCIceCandidate for the dummy
end-of-candidates candidate, but #2473
started calling .toJSON() on these objects.
Store separately whether we've seen the end of candidates rather than
adding on a dummy candidate object.
A test for this will follow, but a) I want to get this fix out and
b) I'm currently rewriting the call test file to add typing.
Fixes element-hq/element-call#553
Checklist
This change is marked as an internal change (Task), so will not be included in the changelog.