Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Attempt

  • Loading branch information...
commit 6fb031430c664a77c77dcb190522f207eb4e1ea8 1 parent 6c59efe
@msokk authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 public/callapp.js
View
8 public/callapp.js
@@ -30,7 +30,7 @@ var CallMap = function() {
});
socket.on('signal', function(id, message) {
- that.call(id);
+ that.call(id, 'answer');
that.peers[id].processSignalingMessage(message);
});
@@ -162,13 +162,15 @@ CallMap.prototype.initLocalVideo = function() {
}
};
-CallMap.prototype.call = function(target) {
+CallMap.prototype.call = function(target, respond) {
var that = this;
window.webkitPeerConnection = window.webkitPeerConnection || window.webkitDeprecatedPeerConnection;
var pc = this.peers[target] = new webkitPeerConnection(
"STUN stun.l.google.com:19302", function(message) {
- that.socket.emit('signal', target, message);
+ if(respond != 'answer') {
+ that.socket.emit('signal', target, message);
+ }
});
if(this.localStream) {
Please sign in to comment.
Something went wrong with that request. Please try again.