add random key for network encryption

This commit is contained in:
Matias Alejo Garcia 2014-04-30 12:58:40 -03:00
commit 2dc59de87e
8 changed files with 99 additions and 55 deletions

View file

@ -29,11 +29,6 @@ angular.module('copay.controllerUtils')
root.onError = function(scope) {
if (scope) scope.loading = false;
$rootScope.flashMessage = {
type: 'error',
message: 'Could not connect to peer: ' +
scope
};
root.logout();
}

View file

@ -7,7 +7,7 @@ var Video = function() {
this.mediaConnections = {};
this.localStream = null;
this.onlineSound = new Audio('../../sound/online.wav');
this.onlineSound = new Audio('sound/online.wav');
};
Video.prototype.setOwnPeer = function(peer, wallet, cb) {
@ -72,11 +72,13 @@ Video.prototype._addCall = function(mediaConnection, cb) {
}
Video.prototype.close = function() {
this.localStream.stop();
this.localStream.mozSrcObject = null;
this.localStream.src = "";
this.localStream.src = null;
this.localStream = null;
if (this.localStream){
this.localStream.stop();
this.localStream.mozSrcObject = null;
this.localStream.src = "";
this.localStream.src = null;
this.localStream = null;
}
for (var i = 0; this.mediaConnections.length; i++) {
this.mediaConnections[i].close();
}