Is my understanding of WebRTC protocol Correct?

核能气质少年 提交于 2019-12-11 15:30:40

问题


This is how I understand the protocol...

  • user on browser get media stream
  • generates own sdp (data on codecs, security, etc)
  • creates an offer with it
  • send this offer to server via signalling method (websocket)
  • signalling server, looks who is this offer for and redirect it to that client
  • client 2's browser gets the offer with sdp and in turn generate its own offer with its own sdp and send it to server
  • server redirect client 2's offer to client 1. now both know each other specs.

Meanwhile, however...

  • as soon as whichever client sends offer with sdp they also start to contact ICE (stun) server(s) to get possible reachable path to them via correct PublicIP:Port:Protocol combo, which they also send to another client via signalling server.

回答1:


Client 2 generates an answer (using createAnswer), not an offer. The main difference is that an answer is a subset of the capabilities (like codecs) contained in the offer.

Otherwise this sounds good.



来源:https://stackoverflow.com/questions/46208620/is-my-understanding-of-webrtc-protocol-correct

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!