Skip to content
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

feat: expose on ice candidate event callback #74

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

k-wasniowski
Copy link
Contributor

@k-wasniowski k-wasniowski commented Apr 16, 2024

This PR exposes an additional event which will allow listening on generated ICE Candidates.

PeerConnection:

  • Add event IceCandidate, emits a RTCPeerConnectionIceEvent with gathered ICE Candidate Event

This change is provided to allow keeping track of generated ICE Candidates. Currently, it will be used to check if Firefox has properly generated relay candidate due to the existing bug -> https://bugzilla.mozilla.org/show_bug.cgi?id=1891503.

@k-wasniowski
Copy link
Contributor Author

Not sure if it should expose RTCPeerConnectionIceEvent, or directly RTCIceCandidate.

@k-wasniowski k-wasniowski marked this pull request as ready for review April 16, 2024 14:19
Copy link
Contributor

@brycetham brycetham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Should we add some simple unit tests for this?

@bbaldino
Copy link
Collaborator

Is this to enable a specific use case/scenario? Don't necessarily disagree with it, but would be good to document the intent in the PR i think

@bbaldino
Copy link
Collaborator

(I'd agree in general/for completeness it's a good idea though either way)

@k-wasniowski
Copy link
Contributor Author

k-wasniowski commented Apr 16, 2024

@bbaldino This change is added to allow keeping track of generated ICE Candidates. Currently, it will be used to check if Firefox has properly generated relay candidate due to the existing bug -> https://bugzilla.mozilla.org/show_bug.cgi?id=1891503.

Should i add this to the PR description?

@k-wasniowski
Copy link
Contributor Author

Looks good. Should we add some simple unit tests for this?

@brycetham I would like to, but not sure how such tests should look like. Do you have any proposal for such tests?

@brycetham
Copy link
Contributor

Looks good. Should we add some simple unit tests for this?

@brycetham I would like to, but not sure how such tests should look like. Do you have any proposal for such tests?

Honestly looking at it again, the only test I'd be interested is on in which it checks if PeerConnection.Events.IceCandidate gets emitted whenever this.pc.onicecandidate occurs. But the code is simple enough where I'm thinking it's probably not necessary.

@k-wasniowski k-wasniowski merged commit c246686 into main Apr 17, 2024
1 check passed
@k-wasniowski k-wasniowski deleted the feat/expose-on-ice-candidate-event-callback branch April 17, 2024 15:54
bbaldino pushed a commit that referenced this pull request Apr 17, 2024
# [2.7.0](v2.6.1...v2.7.0) (2024-04-17)

### Features

* expose on ice candidate event callback ([#74](#74)) ([c246686](c246686))
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.

3 participants