onicecandidate event is firing before acceping the answer onicecandidate event is firing before acceping the answer google-chrome google-chrome

onicecandidate event is firing before acceping the answer


I figured it out my self. problem is actually in chrome as soon as the peer connection local description is set, it will start ice gathering. we need to forward these ice candidate only after the offer/answer is complete. util it we need to store in locally in some way. The reason for this code perfectly working on firefox is In firefox the icecandidates will be gathered and placed in offer itself. so icecandidate are exchanged on offer/answer itself.


I'd create the answerer PeerConnection earlier - on Firefox at least it lets it start harvesting ICE candidates and speeds up connection; and I think it would fix your problem.