|
@@ -1,4 +1,4 @@
|
|
|
-/*! peerjs.js build:0.3.2, development. Copyright(c) 2013 Michelle Bu <michelle@michellebu.com> */
|
|
|
+/*! peerjs.js build:0.3.3, development. Copyright(c) 2013 Michelle Bu <michelle@michellebu.com> */
|
|
|
(function(exports){
|
|
|
var binaryFeatures = {};
|
|
|
binaryFeatures.useBlobBuilder = (function(){
|
|
@@ -1527,7 +1527,7 @@ Peer.prototype._handleMessage = function(message) {
|
|
|
var connection = new MediaConnection(peer, this, {
|
|
|
connectionId: connectionId,
|
|
|
_payload: payload,
|
|
|
- metadata: payload.metadata,
|
|
|
+ metadata: payload.metadata
|
|
|
});
|
|
|
this._addConnection(peer, connection);
|
|
|
this.emit('call', connection);
|
|
@@ -1689,11 +1689,12 @@ Peer.prototype.destroy = function() {
|
|
|
|
|
|
/** Disconnects every connection on this peer. */
|
|
|
Peer.prototype._cleanup = function() {
|
|
|
- var peers = Object.keys(this.connections);
|
|
|
- for (var i = 0, ii = peers.length; i < ii; i++) {
|
|
|
- this._cleanupPeer(peers[i]);
|
|
|
+ if (this.connections) {
|
|
|
+ var peers = Object.keys(this.connections);
|
|
|
+ for (var i = 0, ii = peers.length; i < ii; i++) {
|
|
|
+ this._cleanupPeer(peers[i]);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
this.emit('close');
|
|
|
}
|
|
|
|
|
@@ -2159,7 +2160,7 @@ Negotiator._setupListeners = function(connection, pc, pc_id) {
|
|
|
type: connection.type,
|
|
|
connectionId: connection.id
|
|
|
},
|
|
|
- dst: peerId,
|
|
|
+ dst: peerId
|
|
|
});
|
|
|
}
|
|
|
};
|
|
@@ -2245,7 +2246,7 @@ Negotiator._makeOffer = function(connection) {
|
|
|
connectionId: connection.id,
|
|
|
sctp: util.supports.sctp
|
|
|
},
|
|
|
- dst: connection.peer,
|
|
|
+ dst: connection.peer
|
|
|
});
|
|
|
}, function(err) {
|
|
|
connection.provider.emit('error', err);
|