function negotiateBetween(caller, callee) {
  console.log("Negotiating call...");
  // Not stable = negotiation is ongoing. The behavior of re-negotiating while
  // a negotiation is ongoing is more or less undefined, so avoid this.
  if (caller.signalingState != 'stable' || callee.signalingState != 'stable')
    throw 'You can only negotiate when the connection is stable!';

  connectOnIceCandidate_(caller, callee);

  caller.createOffer(
    function (offer) {
      onOfferCreated_(offer, caller, callee);
    },
    function(error) {}
  );
}
/**
 * Negotiate a call between two peer connections.
 *
 * Offer/Answer will be created and SDP candidates exchanged;
 * the functions verifiy the peer connections reach a steady
 * state.
 *
 * Offer and Answer SDP can be modified by setting one of
 * the transform functions above.
 *
 * Args:
 *   caller, callee: RTCPeerConnection instances.
 */
Negotiate a call between two peer connections.
Offer/Answer will be created and SDP candidates exchanged;
the functions verifiy the peer connections reach a steady
state.

Offer and Answer SDP can be modified by setting one of
the transform functions above.

caller, callee: RTCPeerConnection instances.
Negotiate a call between two peer connections . Offer / Answer will be created and SDP candidates exchanged ; the functions verifiy the peer connections reach a steady state . Offer and Answer SDP can be modified by setting one of the transform functions above . caller callee : RTCPeerConnection instances .
function negotiateBetween(caller, callee) {
  console.log("Negotiating call...");
  if (caller.signalingState != 'stable' || callee.signalingState != 'stable')
    throw 'You can only negotiate when the connection is stable!';
  connectOnIceCandidate_(caller, callee);
  caller.createOffer(
    function (offer) {
      onOfferCreated_(offer, caller, callee);
    },
    function(error) {}
  );
}
function negotiateBetween ( caller , callee ) { console . log ( "Negotiating call..." ) ; if ( caller . signalingState != 'stable' || callee . signalingState != 'stable' ) throw 'You can only negotiate when the connection is stable!' ; connectOnIceCandidate_ ( caller , callee ) ; caller . createOffer ( function ( offer ) { onOfferCreated_ ( offer , caller , callee ) ; } , function ( error ) { } ) ; }
Negotiate a call between two peer connections.
Negotiate a call between two peer connections .
// Not stable = negotiation is ongoing. The behavior of re-negotiating while // a negotiation is ongoing is more or less undefined, so avoid this.