|
@@ -582,23 +582,38 @@ Packer.prototype.pack_int64 = function(num){
|
|
this.bufferBuilder.append((low & 0x000000ff));
|
|
this.bufferBuilder.append((low & 0x000000ff));
|
|
}
|
|
}
|
|
function SinkPeer(options) {
|
|
function SinkPeer(options) {
|
|
|
|
+ var options = options || {};
|
|
|
|
+
|
|
|
|
+ debug = options.debug;
|
|
this._config = options.config || { 'iceServers': [{ 'url': 'stun:stun.l.google.com:19302' }] };
|
|
this._config = options.config || { 'iceServers': [{ 'url': 'stun:stun.l.google.com:19302' }] };
|
|
|
|
+ this._id = null;
|
|
|
|
+ // User handlers.
|
|
|
|
+ this._handlers = {};
|
|
|
|
+
|
|
|
|
+ // Source to connect to; null if waiting for a connection.
|
|
this._peer = options.source || null;
|
|
this._peer = options.source || null;
|
|
|
|
+
|
|
|
|
+ // Booleans to determine what streams to allow.
|
|
this._video = options.video;
|
|
this._video = options.video;
|
|
this._data = options.data != undefined ? options.data : true;
|
|
this._data = options.data != undefined ? options.data : true;
|
|
this._audio = options.audio;
|
|
this._audio = options.audio;
|
|
|
|
+
|
|
|
|
+ // Connections
|
|
this._pc = null;
|
|
this._pc = null;
|
|
- this._id = null;
|
|
|
|
this._dc = null;
|
|
this._dc = null;
|
|
this._socket = new WebSocket(options.ws || 'ws://localhost');
|
|
this._socket = new WebSocket(options.ws || 'ws://localhost');
|
|
|
|
+
|
|
|
|
+ // Local streams for multiple use.
|
|
|
|
+ this._localVideo = options.localVideo || null;
|
|
|
|
+ this._localAudio = options.localAudio || null;
|
|
|
|
+
|
|
|
|
+ // Init socket msg handlers
|
|
var self = this;
|
|
var self = this;
|
|
this._socket.onopen = function() {
|
|
this._socket.onopen = function() {
|
|
self.socketInit();
|
|
self.socketInit();
|
|
};
|
|
};
|
|
- this._handlers = {};
|
|
|
|
|
|
|
|
- // Testing firefox.
|
|
|
|
- // MULTICONNECTION doesn't work still.
|
|
|
|
|
|
+ // Firefoxism: connectDataConnection ports.
|
|
if (browserisms == 'Firefox' && !options.source) {
|
|
if (browserisms == 'Firefox' && !options.source) {
|
|
if (!SinkPeer.usedPorts) {
|
|
if (!SinkPeer.usedPorts) {
|
|
SinkPeer.usedPorts = [];
|
|
SinkPeer.usedPorts = [];
|
|
@@ -619,6 +634,7 @@ function SinkPeer(options) {
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
+/** Generates random port number. */
|
|
function randomPort() {
|
|
function randomPort() {
|
|
return Math.round(Math.random() * 60535) + 5000;
|
|
return Math.round(Math.random() * 60535) + 5000;
|
|
};
|
|
};
|
|
@@ -627,8 +643,8 @@ function randomPort() {
|
|
/** Start up websocket communications. */
|
|
/** Start up websocket communications. */
|
|
SinkPeer.prototype.socketInit = function() {
|
|
SinkPeer.prototype.socketInit = function() {
|
|
var self = this;
|
|
var self = this;
|
|
- // Multiple sinks to one source.
|
|
|
|
if (!!this._peer) {
|
|
if (!!this._peer) {
|
|
|
|
+ // Announce as a sink if initiated with a source.
|
|
this._socket.send(JSON.stringify({
|
|
this._socket.send(JSON.stringify({
|
|
type: 'SINK',
|
|
type: 'SINK',
|
|
source: this._peer,
|
|
source: this._peer,
|
|
@@ -651,24 +667,36 @@ SinkPeer.prototype.socketInit = function() {
|
|
try {
|
|
try {
|
|
sdp = new RTCSessionDescription(message.sdp);
|
|
sdp = new RTCSessionDescription(message.sdp);
|
|
} catch(e) {
|
|
} catch(e) {
|
|
- console.log('Firefox');
|
|
|
|
|
|
+ log('Firefox');
|
|
}
|
|
}
|
|
self._pc.setRemoteDescription(sdp, function() {
|
|
self._pc.setRemoteDescription(sdp, function() {
|
|
- console.log('setRemoteDescription: offer');
|
|
|
|
|
|
+ log('setRemoteDescription: offer');
|
|
|
|
|
|
// If we also have to set up a stream on the sink end, do so.
|
|
// If we also have to set up a stream on the sink end, do so.
|
|
self.handleStream(false, function() {
|
|
self.handleStream(false, function() {
|
|
self.maybeBrowserisms(false);
|
|
self.maybeBrowserisms(false);
|
|
});
|
|
});
|
|
}, function(err) {
|
|
}, function(err) {
|
|
- console.log('failed to setRemoteDescription with offer, ', err);
|
|
|
|
|
|
+ log('failed to setRemoteDescription with offer, ', err);
|
|
});
|
|
});
|
|
break;
|
|
break;
|
|
case 'CANDIDATE':
|
|
case 'CANDIDATE':
|
|
- console.log(message.candidate);
|
|
|
|
|
|
+ log(message.candidate);
|
|
var candidate = new RTCIceCandidate(message.candidate);
|
|
var candidate = new RTCIceCandidate(message.candidate);
|
|
self._pc.addIceCandidate(candidate);
|
|
self._pc.addIceCandidate(candidate);
|
|
break;
|
|
break;
|
|
|
|
+ case 'LEAVE':
|
|
|
|
+ log('counterpart disconnected');
|
|
|
|
+ if (!!self._pc && self._pc.readyState != 'closed') {
|
|
|
|
+ self._pc.close();
|
|
|
|
+ self._pc = null;
|
|
|
|
+ self._peer = null;
|
|
|
|
+ }
|
|
|
|
+ if (!!self._dc && self._dc.readyState != 'closed') {
|
|
|
|
+ self._dc.close();
|
|
|
|
+ self._dc = null;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
case 'PORT':
|
|
case 'PORT':
|
|
if (browserisms && browserisms == 'Firefox') {
|
|
if (browserisms && browserisms == 'Firefox') {
|
|
if (!SinkPeer.usedPorts) {
|
|
if (!SinkPeer.usedPorts) {
|
|
@@ -680,14 +708,14 @@ SinkPeer.prototype.socketInit = function() {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
case 'DEFAULT':
|
|
case 'DEFAULT':
|
|
- console.log('SINK: unrecognized message ', message.type);
|
|
|
|
|
|
+ log('SINK: unrecognized message ', message.type);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
} else {
|
|
} else {
|
|
// Otherwise, this sink is the originator to another sink and should wait
|
|
// Otherwise, this sink is the originator to another sink and should wait
|
|
- // for an alert.
|
|
|
|
|
|
+ // for an alert to begin the PC process.
|
|
this._socket.send(JSON.stringify({
|
|
this._socket.send(JSON.stringify({
|
|
type: 'SOURCE',
|
|
type: 'SOURCE',
|
|
isms: browserisms
|
|
isms: browserisms
|
|
@@ -715,10 +743,10 @@ SinkPeer.prototype.socketInit = function() {
|
|
try {
|
|
try {
|
|
sdp = new RTCSessionDescription(message.sdp);
|
|
sdp = new RTCSessionDescription(message.sdp);
|
|
} catch(e) {
|
|
} catch(e) {
|
|
- console.log('Firefox');
|
|
|
|
|
|
+ log('Firefox');
|
|
}
|
|
}
|
|
self._pc.setRemoteDescription(sdp, function() {
|
|
self._pc.setRemoteDescription(sdp, function() {
|
|
- console.log('setRemoteDescription: answer');
|
|
|
|
|
|
+ log('setRemoteDescription: answer');
|
|
// Firefoxism
|
|
// Firefoxism
|
|
if (browserisms == 'Firefox') {
|
|
if (browserisms == 'Firefox') {
|
|
self._pc.connectDataConnection(self.localPort, self.remotePort);
|
|
self._pc.connectDataConnection(self.localPort, self.remotePort);
|
|
@@ -729,29 +757,42 @@ SinkPeer.prototype.socketInit = function() {
|
|
local: self.remotePort
|
|
local: self.remotePort
|
|
}));
|
|
}));
|
|
}
|
|
}
|
|
- console.log('ORIGINATOR: PeerConnection success');
|
|
|
|
|
|
+ log('ORIGINATOR: PeerConnection success');
|
|
}, function(err) {
|
|
}, function(err) {
|
|
- console.log('failed to setRemoteDescription, ', err);
|
|
|
|
|
|
+ log('failed to setRemoteDescription, ', err);
|
|
});
|
|
});
|
|
break;
|
|
break;
|
|
case 'CANDIDATE':
|
|
case 'CANDIDATE':
|
|
- console.log(message.candidate);
|
|
|
|
|
|
+ log(message.candidate);
|
|
var candidate = new RTCIceCandidate(message.candidate);
|
|
var candidate = new RTCIceCandidate(message.candidate);
|
|
self._pc.addIceCandidate(candidate);
|
|
self._pc.addIceCandidate(candidate);
|
|
break;
|
|
break;
|
|
|
|
+ case 'LEAVE':
|
|
|
|
+ log('counterpart disconnected');
|
|
|
|
+ if (!!self._pc && self._pc.readyState != 'closed') {
|
|
|
|
+ self._pc.close();
|
|
|
|
+ self._pc = null;
|
|
|
|
+ self._peer = null;
|
|
|
|
+ }
|
|
|
|
+ if (!!self._dc && self._dc.readyState != 'closed') {
|
|
|
|
+ self._dc.close();
|
|
|
|
+ self._dc = null;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
case 'DEFAULT':
|
|
case 'DEFAULT':
|
|
- console.log('ORIGINATOR: message not recognized ', message.type);
|
|
|
|
|
|
+ log('ORIGINATOR: message not recognized ', message.type);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- // Makes sure things clean up neatly.
|
|
|
|
|
|
+
|
|
|
|
+ // Makes sure things clean up neatly when window is closed.
|
|
window.onbeforeunload = function() {
|
|
window.onbeforeunload = function() {
|
|
- if (!!self._pc) {
|
|
|
|
|
|
+ if (!!self._pc && self._pc.readyState != 'closed') {
|
|
self._pc.close();
|
|
self._pc.close();
|
|
}
|
|
}
|
|
if (!!self._socket && !!self._peer) {
|
|
if (!!self._socket && !!self._peer) {
|
|
self._socket.send(JSON.stringify({ type: 'LEAVE', dst: self._peer }));
|
|
self._socket.send(JSON.stringify({ type: 'LEAVE', dst: self._peer }));
|
|
- if (!!self._dc) {
|
|
|
|
|
|
+ if (!!self._dc && self._dc.readyState != 'closed') {
|
|
self._dc.close();
|
|
self._dc.close();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -763,7 +804,7 @@ SinkPeer.prototype.socketInit = function() {
|
|
SinkPeer.prototype.setupIce = function() {
|
|
SinkPeer.prototype.setupIce = function() {
|
|
var self = this;
|
|
var self = this;
|
|
this._pc.onicecandidate = function(event) {
|
|
this._pc.onicecandidate = function(event) {
|
|
- console.log('candidates received');
|
|
|
|
|
|
+ log('candidates received');
|
|
if (event.candidate) {
|
|
if (event.candidate) {
|
|
self._socket.send(JSON.stringify({
|
|
self._socket.send(JSON.stringify({
|
|
type: 'CANDIDATE',
|
|
type: 'CANDIDATE',
|
|
@@ -771,7 +812,7 @@ SinkPeer.prototype.setupIce = function() {
|
|
dst: self._peer
|
|
dst: self._peer
|
|
}));
|
|
}));
|
|
} else {
|
|
} else {
|
|
- console.log("End of candidates.");
|
|
|
|
|
|
+ log("End of candidates.");
|
|
}
|
|
}
|
|
};
|
|
};
|
|
};
|
|
};
|
|
@@ -788,7 +829,7 @@ SinkPeer.prototype.startPeerConnection = function() {
|
|
/** Decide whether to handle Firefoxisms. */
|
|
/** Decide whether to handle Firefoxisms. */
|
|
SinkPeer.prototype.maybeBrowserisms = function(originator) {
|
|
SinkPeer.prototype.maybeBrowserisms = function(originator) {
|
|
var self = this;
|
|
var self = this;
|
|
- if (browserisms == 'Firefox' && !this._video && !this._audio && !this._stream) {
|
|
|
|
|
|
+ if (browserisms == 'Firefox' && !this._video && !this._audio/* && !this._stream*/) {
|
|
getUserMedia({ audio: true, fake: true }, function(s) {
|
|
getUserMedia({ audio: true, fake: true }, function(s) {
|
|
self._pc.addStream(s);
|
|
self._pc.addStream(s);
|
|
|
|
|
|
@@ -798,7 +839,7 @@ SinkPeer.prototype.maybeBrowserisms = function(originator) {
|
|
self.makeAnswer();
|
|
self.makeAnswer();
|
|
}
|
|
}
|
|
|
|
|
|
- }, function(err) { console.log('crap'); });
|
|
|
|
|
|
+ }, function(err) { log('crap'); });
|
|
} else {
|
|
} else {
|
|
if (originator) {
|
|
if (originator) {
|
|
this.makeOffer();
|
|
this.makeOffer();
|
|
@@ -814,9 +855,9 @@ SinkPeer.prototype.makeAnswer = function() {
|
|
var self = this;
|
|
var self = this;
|
|
|
|
|
|
this._pc.createAnswer(function(answer) {
|
|
this._pc.createAnswer(function(answer) {
|
|
- console.log('createAnswer');
|
|
|
|
|
|
+ log('createAnswer');
|
|
self._pc.setLocalDescription(answer, function() {
|
|
self._pc.setLocalDescription(answer, function() {
|
|
- console.log('setLocalDescription: answer');
|
|
|
|
|
|
+ log('setLocalDescription: answer');
|
|
self._socket.send(JSON.stringify({
|
|
self._socket.send(JSON.stringify({
|
|
type: 'ANSWER',
|
|
type: 'ANSWER',
|
|
src: self._id,
|
|
src: self._id,
|
|
@@ -824,10 +865,10 @@ SinkPeer.prototype.makeAnswer = function() {
|
|
dst: self._peer
|
|
dst: self._peer
|
|
}));
|
|
}));
|
|
}, function(err) {
|
|
}, function(err) {
|
|
- console.log('failed to setLocalDescription, ', err)
|
|
|
|
|
|
+ log('failed to setLocalDescription, ', err)
|
|
});
|
|
});
|
|
}, function(err) {
|
|
}, function(err) {
|
|
- console.log('failed to create answer, ', err)
|
|
|
|
|
|
+ log('failed to create answer, ', err)
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
@@ -837,9 +878,9 @@ SinkPeer.prototype.makeOffer = function() {
|
|
var self = this;
|
|
var self = this;
|
|
|
|
|
|
this._pc.createOffer(function(offer) {
|
|
this._pc.createOffer(function(offer) {
|
|
- console.log('createOffer')
|
|
|
|
|
|
+ log('createOffer')
|
|
self._pc.setLocalDescription(offer, function() {
|
|
self._pc.setLocalDescription(offer, function() {
|
|
- console.log('setLocalDescription: offer');
|
|
|
|
|
|
+ log('setLocalDescription: offer');
|
|
self._socket.send(JSON.stringify({
|
|
self._socket.send(JSON.stringify({
|
|
type: 'OFFER',
|
|
type: 'OFFER',
|
|
sdp: offer,
|
|
sdp: offer,
|
|
@@ -847,7 +888,7 @@ SinkPeer.prototype.makeOffer = function() {
|
|
src: self._id
|
|
src: self._id
|
|
}));
|
|
}));
|
|
}, function(err) {
|
|
}, function(err) {
|
|
- console.log('failed to setLocalDescription, ', err);
|
|
|
|
|
|
+ log('failed to setLocalDescription, ', err);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
};
|
|
};
|
|
@@ -856,10 +897,10 @@ SinkPeer.prototype.makeOffer = function() {
|
|
/** Sets up A/V stream handler. */
|
|
/** Sets up A/V stream handler. */
|
|
SinkPeer.prototype.setupAudioVideo = function() {
|
|
SinkPeer.prototype.setupAudioVideo = function() {
|
|
var self = this;
|
|
var self = this;
|
|
- console.log('onaddstream handler added');
|
|
|
|
|
|
+ log('onaddstream handler added');
|
|
this._pc.onaddstream = function(obj) {
|
|
this._pc.onaddstream = function(obj) {
|
|
- console.log('Remote stream added');
|
|
|
|
- this._stream = true;
|
|
|
|
|
|
+ log('Remote stream added');
|
|
|
|
+ //this._stream = true;
|
|
if (!!self._handlers['remotestream']) {
|
|
if (!!self._handlers['remotestream']) {
|
|
self._handlers['remotestream'](obj.type, obj.stream);
|
|
self._handlers['remotestream'](obj.type, obj.stream);
|
|
}
|
|
}
|
|
@@ -879,41 +920,55 @@ SinkPeer.prototype.handleStream = function(originator, cb) {
|
|
/** Get A/V streams. */
|
|
/** Get A/V streams. */
|
|
SinkPeer.prototype.getAudioVideo = function(originator, cb) {
|
|
SinkPeer.prototype.getAudioVideo = function(originator, cb) {
|
|
var self = this;
|
|
var self = this;
|
|
- if (this._video) {
|
|
|
|
|
|
+ if (this._video && !this._localVideo) {
|
|
getUserMedia({ video: true }, function(vstream) {
|
|
getUserMedia({ video: true }, function(vstream) {
|
|
self._pc.addStream(vstream);
|
|
self._pc.addStream(vstream);
|
|
- console.log('Local video stream added');
|
|
|
|
|
|
+ self._localVideo = vstream;
|
|
|
|
+ log('Local video stream added');
|
|
|
|
|
|
if (!!self._handlers['localstream']) {
|
|
if (!!self._handlers['localstream']) {
|
|
self._handlers['localstream']('video', vstream);
|
|
self._handlers['localstream']('video', vstream);
|
|
}
|
|
}
|
|
|
|
|
|
- if (self._audio) {
|
|
|
|
|
|
+ if (self._audio && !self._localAudio) {
|
|
getUserMedia({ audio: true }, function(astream) {
|
|
getUserMedia({ audio: true }, function(astream) {
|
|
self._pc.addStream(astream);
|
|
self._pc.addStream(astream);
|
|
- console.log('Local audio stream added');
|
|
|
|
|
|
+ self._localAudio = astream;
|
|
|
|
+ log('Local audio stream added');
|
|
|
|
|
|
if (!!self._handlers['localstream']) {
|
|
if (!!self._handlers['localstream']) {
|
|
self._handlers['localstream']('audio', astream);
|
|
self._handlers['localstream']('audio', astream);
|
|
}
|
|
}
|
|
|
|
|
|
cb();
|
|
cb();
|
|
- }, function(err) { console.log('Audio cannot start'); cb(); });
|
|
|
|
|
|
+ }, function(err) { log('Audio cannot start'); cb(); });
|
|
} else {
|
|
} else {
|
|
|
|
+ if (self._audio) {
|
|
|
|
+ self._pc.addStream(self._localAudio);
|
|
|
|
+ }
|
|
cb();
|
|
cb();
|
|
}
|
|
}
|
|
- }, function(err) { console.log('Video cannot start', err); cb(); });
|
|
|
|
- } else if (this._audio) {
|
|
|
|
|
|
+ }, function(err) { log('Video cannot start', err); cb(); });
|
|
|
|
+ } else if (this._audio && !this._localAudio) {
|
|
getUserMedia({ audio: true }, function(astream) {
|
|
getUserMedia({ audio: true }, function(astream) {
|
|
self._pc.addStream(astream);
|
|
self._pc.addStream(astream);
|
|
|
|
+ self._localAudio = astream;
|
|
|
|
+ log('Local audio stream added');
|
|
|
|
|
|
if (!!self._handlers['localstream']) {
|
|
if (!!self._handlers['localstream']) {
|
|
self._handlers['localstream']('audio', astream);
|
|
self._handlers['localstream']('audio', astream);
|
|
}
|
|
}
|
|
|
|
|
|
cb();
|
|
cb();
|
|
- }, function(err) { console.log('Audio cannot start'); cb(); });
|
|
|
|
|
|
+ }, function(err) { log('Audio cannot start'); cb(); });
|
|
} else {
|
|
} else {
|
|
|
|
+ if (this._audio) {
|
|
|
|
+ this._pc.addStream(this._localAudio);
|
|
|
|
+ }
|
|
|
|
+ if (this._video) {
|
|
|
|
+ this._pc.addStream(this._localVideo);
|
|
|
|
+ }
|
|
|
|
+ log('no audio/video streams initiated');
|
|
cb();
|
|
cb();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -928,9 +983,9 @@ SinkPeer.prototype.setupDataChannel = function(originator, cb) {
|
|
if (browserisms == 'Webkit') {
|
|
if (browserisms == 'Webkit') {
|
|
|
|
|
|
this._pc.onstatechange = function() {
|
|
this._pc.onstatechange = function() {
|
|
- console.log('State Change: ', self._pc.readyState);
|
|
|
|
|
|
+ log('State Change: ', self._pc.readyState);
|
|
/*if (self._pc.readyState == 'active') {
|
|
/*if (self._pc.readyState == 'active') {
|
|
- console.log('ORIGINATOR: active state detected');
|
|
|
|
|
|
+ log('ORIGINATOR: active state detected');
|
|
|
|
|
|
self._dc = self._pc.createDataChannel('StreamAPI', { reliable: false });
|
|
self._dc = self._pc.createDataChannel('StreamAPI', { reliable: false });
|
|
self._dc.binaryType = 'blob';
|
|
self._dc.binaryType = 'blob';
|
|
@@ -947,7 +1002,7 @@ SinkPeer.prototype.setupDataChannel = function(originator, cb) {
|
|
|
|
|
|
} else {
|
|
} else {
|
|
this._pc.onconnection = function() {
|
|
this._pc.onconnection = function() {
|
|
- console.log('ORIGINATOR: onconnection triggered');
|
|
|
|
|
|
+ log('ORIGINATOR: onconnection triggered');
|
|
|
|
|
|
self.startDataChannel();
|
|
self.startDataChannel();
|
|
};
|
|
};
|
|
@@ -955,7 +1010,7 @@ SinkPeer.prototype.setupDataChannel = function(originator, cb) {
|
|
} else {
|
|
} else {
|
|
/** TARGET SETUP */
|
|
/** TARGET SETUP */
|
|
this._pc.ondatachannel = function(dc) {
|
|
this._pc.ondatachannel = function(dc) {
|
|
- console.log('SINK: ondatachannel triggered');
|
|
|
|
|
|
+ log('SINK: ondatachannel triggered');
|
|
self._dc = dc;
|
|
self._dc = dc;
|
|
self._dc.binaryType = 'blob';
|
|
self._dc.binaryType = 'blob';
|
|
|
|
|
|
@@ -969,7 +1024,7 @@ SinkPeer.prototype.setupDataChannel = function(originator, cb) {
|
|
};
|
|
};
|
|
|
|
|
|
this._pc.onconnection = function() {
|
|
this._pc.onconnection = function() {
|
|
- console.log('SINK: onconnection triggered');
|
|
|
|
|
|
+ log('SINK: onconnection triggered');
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1022,6 +1077,14 @@ SinkPeer.prototype.on = function(code, cb) {
|
|
this._handlers[code] = cb;
|
|
this._handlers[code] = cb;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function log() {
|
|
|
|
+ if (debug) {
|
|
|
|
+ for (var i = 0; i < arguments.length; i++) {
|
|
|
|
+ console.log('*', i, '-- ', arguments[i]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
exports.Peer = SinkPeer;
|
|
exports.Peer = SinkPeer;
|
|
|
|
|
|
})(this);
|
|
})(this);
|