remove offline peers
This commit is contained in:
parent
55d1a2f671
commit
f29ff47e44
1 changed files with 9 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue