ericz 12 年之前
父節點
當前提交
ef46081949
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      lib/connection.js
  2. 1 1
      lib/peer.js

+ 1 - 1
lib/connection.js

@@ -250,7 +250,7 @@ DataConnection.prototype._makeOffer = function() {
         sdp: offer,
         dst: self._peer,
         src: self._id,
-        metadata: self._metadata
+        metadata: self.metadata
       }));
     }, function(err) {
       self._cb('Failed to setLocalDescription');

+ 1 - 1
lib/peer.js

@@ -40,7 +40,7 @@ Peer.prototype._socketInit = function() {
         };
         var connection = new DataConnection(self._id, peer, self._socket, function(err, connection) {
           if (!err) {
-            self.emit('connection', connection);
+            self.emit('connection', connection, metadata);
           }
         }, options);
         self.connections[peer] = connection;