ICE gathering state does not get changed at the right time
|Reported by jmil...@aliax.net, Jun 3 2013||Back to list|
What steps will reproduce the problem? 1. Create a new RTCPeerconnection instance 2. Add a local stream to RTCPeerconnection 3. Execute createOffer and setLocalDescription What is the expected result? During setLocalDescription execution, and before firing onSuccess callback, ice gathering state should be changed from 'new' to 'gathering'. Such behavior is defined in steps 4 and 5 of the spec if the RTCSessionDescription argument is applied successfully: http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-RTCPeerConnection-setLocalDescription-void-RTCSessionDescription-description-VoidFunction-successCallback-RTCPeerConnectionErrorCallback-failureCallback What do you see instead? ice gathering state value is 'new' by the time onSuccess callback is fired What version of the product are you using? On what operating system? Version 29.0.1521.3 dev GNU Linux (Debian) Please provide any additional information below. Attached a .html file to reproduce it. Steps are: 1- Start() 2- Call() Interesting logs are displayed in red in the browser console (console.error)
Jun 3 2013,
It can also be seen when using "https://apprtc.appspot.com", accessing "chrome://webrtc-internals/" in chrome. There can be seen, that before queuing setLocalDescription's onSuccessCallback, signaling state change is made, but not ice gathering state, which should, according to the spec.
Jun 4 2013,
Jun 4 2013,
This behavior is very desirable for those signaling mechanisms which need to send the ICE candidates within the SDP. On setLocalDescription's onSuccessCallback, if the ice gathering state is not complete, the Offer/Answer sending is postponed until the last candidate is gathered or immediately sent if the description didn't cause an ICE restart. There is no other way AFAIK, among the createOffer/createAnwser or setLocalDescription callbacks, to know if setLocaDescription caused an ICE restart. Thanks
Jun 5 2013,
Jun 5 2013,
Thanks for the explanation. I will look into what's needed to fix this.
Jun 9 2013,
Thanks a lot Justin. Here some additional log from 'chrome://webrtc-internals' while running 'https://apprtc.appspot.com': " 6/9/2013 5:06:37 PM setLocalDescription 6/9/2013 5:06:37 PM signalingStateChange -> SignalingStateHaveLocalOffer 6/9/2013 5:06:37 PM setLocalDescriptionOnSuccess 6/9/2013 5:06:37 PM iceGatheringStateChange -> ICEGatheringStateGathering " Ice Gathering State is changed after firing setLocalDescription onSuccess callback, and not before, making impossible to know whether the local description has fired an ICE update or not on the onSuccess callback.
Oct 16 2014,
Nov 4 2015,
This bug hasn't been modified for more than a year. Is this still a valid open issue?
Nov 8 2016,
Dec 14 2016,
I'm still seeing the issue above, are there any updates?
Sign in to add a comment