Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Conversation

gorisanson
Copy link

@gorisanson gorisanson commented Mar 14, 2020

The "icecandidiate" event listener should be attached
before calling "RTCPeerConnection.setLocalDescription()".

The "icecandidate" event occur as a result of calling
await peerConnection.setLocalDescription(offer);.
(reference: https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/icecandidate_event)
So it should be attached earlier.

In the original solution, since the "icecandidate" event handler is attached too late, the callee can not receive the caller ice candidates. (We can check it on log on console since Got new remote ICE candidate: does not appear on callee's console log.) In spite of this error, the original solution somehow works when it is tested on LAN. But it does not work on WAN.

I checked that it works on WAN after fixing this error.

The "icecandidiate" event listener should be attached
before calling "RTCPeerConnection.setLocalDescription()"
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@gorisanson
Copy link
Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@ErikHellman ErikHellman merged commit beb2f9f into webrtc:solution Mar 16, 2020
@ErikHellman
Copy link
Contributor

Looks good. Thanks for the fix!

@gorisanson gorisanson deleted the solution branch March 16, 2020 08:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants