|
@@ -48,9 +48,7 @@ Negotiator.startConnection = function(connection, options) {
|
|
connection.initialize(dc);
|
|
connection.initialize(dc);
|
|
}
|
|
}
|
|
|
|
|
|
- if (!util.supports.onnegotiationneeded) {
|
|
|
|
- Negotiator._makeOffer(connection);
|
|
|
|
- }
|
|
|
|
|
|
+ Negotiator._makeOffer(connection);
|
|
} else {
|
|
} else {
|
|
Negotiator.handleSDP("OFFER", connection, options.sdp);
|
|
Negotiator.handleSDP("OFFER", connection, options.sdp);
|
|
}
|
|
}
|
|
@@ -175,19 +173,6 @@ Negotiator._setupListeners = function(connection, pc, pc_id) {
|
|
// Fallback for older Chrome impls.
|
|
// Fallback for older Chrome impls.
|
|
pc.onicechange = pc.oniceconnectionstatechange;
|
|
pc.onicechange = pc.oniceconnectionstatechange;
|
|
|
|
|
|
- // ONNEGOTIATIONNEEDED (Chrome)
|
|
|
|
- util.log("Listening for `negotiationneeded`");
|
|
|
|
- pc.onnegotiationneeded = function() {
|
|
|
|
- util.log("`negotiationneeded` triggered");
|
|
|
|
- if (pc.signalingState == "stable") {
|
|
|
|
- Negotiator._makeOffer(connection);
|
|
|
|
- } else {
|
|
|
|
- util.log(
|
|
|
|
- "onnegotiationneeded triggered when not stable. Is another connection being established?"
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
// DATACONNECTION.
|
|
// DATACONNECTION.
|
|
util.log("Listening for data channel");
|
|
util.log("Listening for data channel");
|
|
// Fired between offer and answer, so options should already be saved
|
|
// Fired between offer and answer, so options should already be saved
|