Skip to main content
added 2 characters in body
Source Link
Kevin
  • 2.7k
  • 37
  • 62

Here is a page with some graphs showing how the signaling process works. Basically, you set some client side stuff first:

  • PeerConnectionFactory; to generate PeerConnections,
  • PeerConnection; one for every connection to another peer you want (usually 1),
  • MediaStream; to hook up the audio and video from your client device.

Then you generate an SDP offer

peerConnection.createOffer();  

on the caller side and send it to the callee. The callee sets this offer

peerConnection.setRemoteDescription(insert-the-offer-here);

and generates an SDP answer

peerConnection.createAnswer();

and sends it back to the caller. The caller receives this answer and sets it.

peerConnection.setRemoteDescription(insert-the-answer-here);

Both the caller and callee get a call to

onAddStream() {...} //needs to be implemented in your code

The callee when the caller's offer is set and the caller when the callee's answeranswer is set. This callback signals the beginning of the connection.
You can also use ICE (STUN/TURN) to avoid firewall and NAT issues, but this is optional. Although in production code, you probably want to implement it anyway.

Note: Webrtc documentation is scarce and subject to change, take everything you read about webrtc (at least anything written as of now) with a grain of salt...

Here is a page with some graphs showing how the signaling process works. Basically, you set some client side stuff first:

  • PeerConnectionFactory; to generate PeerConnections,
  • PeerConnection; one for every connection to another peer you want (usually 1),
  • MediaStream; to hook up the audio and video from your client device.

Then you generate an SDP offer

peerConnection.createOffer();  

on the caller side and send it to the callee. The callee sets this offer

peerConnection.setRemoteDescription(insert-the-offer-here);

and generates an SDP answer

peerConnection.createAnswer();

and sends it back to the caller. The caller receives this answer and sets it.

peerConnection.setRemoteDescription(insert-the-answer-here);

Both the caller and callee get a call to

onAddStream() {...} //needs to be implemented in your code

The callee when the caller's offer is set and the caller when the callee's answer is set. This callback signals the beginning of the connection.
You can also use ICE (STUN/TURN) to avoid firewall and NAT issues, but this is optional. Although in production code, you probably want to implement it anyway.

Note: Webrtc documentation is scarce and subject to change, take everything you read about webrtc (at least anything written as of now) with a grain of salt...

Here is a page with some graphs showing how the signaling process works. Basically, you set some client side stuff first:

  • PeerConnectionFactory; to generate PeerConnections,
  • PeerConnection; one for every connection to another peer you want (usually 1),
  • MediaStream; to hook up the audio and video from your client device.

Then you generate an SDP offer

peerConnection.createOffer();  

on the caller side and send it to the callee. The callee sets this offer

peerConnection.setRemoteDescription(insert-the-offer-here);

and generates an SDP answer

peerConnection.createAnswer();

and sends it back to the caller. The caller receives this answer and sets it.

peerConnection.setRemoteDescription(insert-the-answer-here);

Both the caller and callee get a call to

onAddStream() {...} //needs to be implemented in your code

The callee when the caller's offer is set and the caller when the callee's answer is set. This callback signals the beginning of the connection.
You can also use ICE (STUN/TURN) to avoid firewall and NAT issues, but this is optional. Although in production code, you probably want to implement it anyway.

Note: Webrtc documentation is scarce and subject to change, take everything you read about webrtc (at least anything written as of now) with a grain of salt...

clarification
Source Link
Kevin
  • 2.7k
  • 37
  • 62

Here is a page with some graphs showing how the signaling process works. Basically, you set some client side stuff first (peerconnectionfactory, peerconnection, streams, etc...).:

  • PeerConnectionFactory; to generate PeerConnections,
  • PeerConnection; one for every connection to another peer you want (usually 1),
  • MediaStream; to hook up the audio and video from your client device.

Then you generate an offerSDP offer

peerConnection.createOffer();  

on the caller side and send it to the callee. The callee sets this offeroffer

peerConnection.setRemoteDescription(insert-the-offer-here);

and generates an answerSDP answer

peerConnection.createAnswer();

and sends it back to the caller. The caller receives this answeranswer and sets it.
Both

peerConnection.setRemoteDescription(insert-the-answer-here);

Both the caller and callee get a call to onaddstream(), the

onAddStream() {...} //needs to be implemented in your code

The callee when the caller's offeroffer is set and the caller when the callee's answer is set. This callback signals the beginning of the connection.
You can also use ICEICE (STUNSTUN/TURNTURN) to avoid firewall/NATfirewall and NAT issues, but this is optional. Although in production code, you probably want to implement it anyway.

Note: Webrtc documentation is scarce and subject to change, take everything you ever read about webrtc (at least anything written as of now) with a grain of salt...

Here is a page with some graphs showing how the signaling process works. Basically, you set some client side stuff first (peerconnectionfactory, peerconnection, streams, etc...). Then you generate an offer on the caller side and send it to the callee. The callee sets this offer and generates an answer and sends it back to the caller. The caller receives this answer and sets it.
Both the caller and callee get a call to onaddstream(), the callee when the caller's offer is set and the caller when the callee's answer is set. This callback signals the beginning of the connection.
You can also use ICE (STUN/TURN) to avoid firewall/NAT issues, but this is optional. Although in production code, you probably want to implement it anyway.

Note: Webrtc documentation is scarce and subject to change, take everything you ever read about webrtc with a grain of salt...

Here is a page with some graphs showing how the signaling process works. Basically, you set some client side stuff first:

  • PeerConnectionFactory; to generate PeerConnections,
  • PeerConnection; one for every connection to another peer you want (usually 1),
  • MediaStream; to hook up the audio and video from your client device.

Then you generate an SDP offer

peerConnection.createOffer();  

on the caller side and send it to the callee. The callee sets this offer

peerConnection.setRemoteDescription(insert-the-offer-here);

and generates an SDP answer

peerConnection.createAnswer();

and sends it back to the caller. The caller receives this answer and sets it.

peerConnection.setRemoteDescription(insert-the-answer-here);

Both the caller and callee get a call to

onAddStream() {...} //needs to be implemented in your code

The callee when the caller's offer is set and the caller when the callee's answer is set. This callback signals the beginning of the connection.
You can also use ICE (STUN/TURN) to avoid firewall and NAT issues, but this is optional. Although in production code, you probably want to implement it anyway.

Note: Webrtc documentation is scarce and subject to change, take everything you read about webrtc (at least anything written as of now) with a grain of salt...

Source Link
Kevin
  • 2.7k
  • 37
  • 62

Here is a page with some graphs showing how the signaling process works. Basically, you set some client side stuff first (peerconnectionfactory, peerconnection, streams, etc...). Then you generate an offer on the caller side and send it to the callee. The callee sets this offer and generates an answer and sends it back to the caller. The caller receives this answer and sets it.
Both the caller and callee get a call to onaddstream(), the callee when the caller's offer is set and the caller when the callee's answer is set. This callback signals the beginning of the connection.
You can also use ICE (STUN/TURN) to avoid firewall/NAT issues, but this is optional. Although in production code, you probably want to implement it anyway.

Note: Webrtc documentation is scarce and subject to change, take everything you ever read about webrtc with a grain of salt...