title: What is the difference between WebRTC offer and answer?
body: <p>I am trying to add audio/video chat feature using WebRTC to existing text chat app. Chat room participants already are chatting, but when they decide they need audio/video, they press a button to start audio/video. Whichever client presses a button, I am calling <code>myPeerConnection.createOffer().then(function(offer){setLocalDescription(offer)}</code> and then sending the <code>offer</code> (JSON.stringified) to the server along with clientID. After <code>X</code> seconds, I disable the button to join the audio/video chat, send a notice to the server to distribute all the <code>offers</code> to the participants. At this point, all the clients willing to join audio/video chat have entire set of SDPs from all the remaining peers.</p>
  <p>My question is, do I need to send answers to each offer from each client? My understanding is that SDP describes capabilities of the client to handle audio/video. Can I use the offer SDPs from others to <code>setRemoteDescription(SDP)</code>? All the examples, tutorials, questions, and posts I came across are using the paradigm of offer/answer and none of them are talking about what the difference between offer and answer is. Any information or pointers are appreciated.</p>
  <p>Here is a <a href="https://jsfiddle.net/tkgf0vLh/3/" rel="nofollow noreferrer">jsFiddle</a> code segment simplified from my code. Please take a look at the console output, which shows nothing other than media capabilities. All the ICE and networking information which might distinguish SDPs comes after exchanging this offer SDP and the answer, so that is not yet part of this offer (and answer) exchange done through signaling channel.</p>
  <p>PS: Strictly speaking, my scenario does not have any initiator or sender that is starting the channel. All participants are equal. No way to determine or sequence them either. When capabilities and network info are exchanged properly, they start audio/video chat.</p>