diff --git a/index.html b/index.html index f86ddb2a5..8dd57c46d 100644 --- a/index.html +++ b/index.html @@ -123,19 +123,17 @@
- - + + /> {{c.nick}}
@@ -240,7 +238,7 @@
-
Select required number of signatures
+
Select required signatures
diff --git a/js/directives.js b/js/directives.js index 1df4026d4..78124f461 100644 --- a/js/directives.js +++ b/js/directives.js @@ -89,12 +89,15 @@ angular.module('copay.directives') }); } } - }).directive('confvideo', function($rootScope) { + }).directive('avatar', function($rootScope) { return { link: function(scope, element, attrs) { - var peer = attrs.peer; - element.addClass(($rootScope.wallet.getOnlinePeerIDs().indexOf(peer) != -1) ? 'online' : 'offline'); - var muted = $rootScope.getVideoMutedStatus(peer); + var peer = JSON.parse(attrs.peer) + var peerId = peer.peerId; + var nick = peer.nick; + element.addClass('video-small'); + element.attr('title', peerId + (peerId == $rootScope.wallet.network.peerId ? ' (You)' : '')); + var muted = $rootScope.getVideoMutedStatus(peerId); if (muted) { element.attr("muted", true); } diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index 3638bdbf8..d3244c176 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -9,6 +9,15 @@ angular.module('copay.controllerUtils') $rootScope.getVideoURL = function(copayer) { var vi = $rootScope.videoInfo[copayer] if (!vi) return; + + //alert($rootScope.wallet.getOnlinePeerIDs()); + //alert(copayer); + if ($rootScope.wallet.getOnlinePeerIDs().indexOf(copayer) === -1) { + // peer disconnected, remove his video + delete $rootScope.videoInfo[copayer] + return; + } + var encoded = vi.url; var url = decodeURI(encoded); var trusted = $sce.trustAsResourceUrl(url);