|
@@ -21,13 +21,14 @@ Negotiator._idPrefix = 'pc_';
|
|
|
Negotiator.startConnection = function(connection, options) {
|
|
|
var pc = Negotiator._getPeerConnection(connection, options);
|
|
|
|
|
|
+ // Set the connection's PC.
|
|
|
+ connection.pc = connection.peerConnection = pc;
|
|
|
+
|
|
|
if (connection.type === 'media' && options._stream) {
|
|
|
// Add the stream.
|
|
|
pc.addStream(options._stream);
|
|
|
}
|
|
|
|
|
|
- // Set the connection's PC.
|
|
|
- connection.pc = connection.peerConnection = pc;
|
|
|
// What do we need to do now?
|
|
|
if (options.originator) {
|
|
|
if (connection.type === 'data') {
|