question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

why sdp not update when receiving onicecandidate event

See original GitHub issue

I know in chrome, If I invoke createOffer then I will receive a new SDP, and then I will receive onicecandidate event. Once I receive the event I find that the sdp has been inserted new candidates and local ip and audio/video port.

the result of chrome like this:

`m=video 50838 UDP/TLS/RTP/SAVPF 96 98 100 102 127 97 99 101 125

c=IN IP4 10.20.14.3

a=rtcp:9 IN IP4 0.0.0.0

a=candidate:3740516137 1 udp 2122260223 10.20.14.3 50838 typ host generation 0 network-id 3 network-cost 50

a=candidate:3162337153 1 udp 2122194687 169.254.78.22 55524 typ host generation 0 network-id 2

a=candidate:594633900 1 udp 2122129151 192.168.17.136 55765 typ host generation 0 network-id 1 network-cost 10

a=candidate:2423276505 1 tcp 1518280447 10.20.14.3 9 typ host tcptype active generation 0 network-id 3 network-cost 50

a=candidate:4076770161 1 tcp 1518214911 169.254.78.22 9 typ host tcptype active generation 0 network-id 2

a=candidate:1844615260 1 tcp 1518149375 192.168.17.136 9 typ host tcptype active generation 0 network-id 1 network-cost 10 `

But in ‘react-native-webrtc’ I find nothing change.

I want to know if do not change sdp is the expect result in ‘react-native-webrt’? Or It can change SDP automatic if I have an anther configuration.

  • React Native version: 0.44.3
  • Plugin version: 1.58.1
  • OS: : 10.3.1 iOS / iPhone 7

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
zxcpoiucommented, Jul 18, 2017

I believe it is the default behavior for trickle ice in webrtc library at least in the very first call.

This lib doesn’t implement sdp getter to refresh new sdp with candidates from native. ( not sue which is correct way though )

But if you invoke createOffer or createAnswer AGAIN AFTER all ice candidates has been gathered, then you would get sdp with all candidates returned from native.

And you don’t have to call setLocalDescription again after the second call to createOffer.

see #242 for related discussion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebRTC never fires onIceCandidate - Stack Overflow
Because of this change, the SDP returned by createOffer does not contain any media, and therefore the ICE gathering process never starts.
Read more >
RTCPeerConnection.addIceCandidate() - Web APIs | MDN
When a web site or app using RTCPeerConnection receives a new ICE candidate from the remote peer over its signaling channel, it delivers...
Read more >
Candidate from onicecandidate event and addIceCandidate ...
This attribute is set to null when an event is generated to indicate the end of candidate gathering. I guess this has just...
Read more >
when is onicecandidate event handler invoked and what is the ...
But I have seen many examples where from the onicecandidate event handler the received ice candidate event is sent to the remote peer...
Read more >
WebRTC Trickle ICE End of Candidates Gathering Indication
Although candidates are included in the SDP, WebRTC supports JavaScript APIs for getting local ICE candidate addresses (onicecandidate event ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found