javascript - What does peer_connection.onicecandidate() function do?what is an ice_event? -


i having difficulty in understanding puropse of onicecandidate function. how ice candidates helps in establishing peer connection.and sends ice candidates first?

  • under hood, webrtc gather local candidate depending on available network connections, , list of ice servers passed through js api.
  • once ice candidate ready, provided js layer through onicecandidate api.
  • if you're using trickle ice, can send candidate right away through signaling path remote peer. otherwise, wait last (null) candidate, order them priority, add them offer/answer sdp, , send offer/answer through signaling path. done automatically browser.
  • you might @ handshake specifications here: https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-09

Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -