Merge pull request #868 from cmgustavo/bug/video-intermediate-page
Fixed video while waiting for copayer
This commit is contained in:
commit
137e9ca108
1 changed files with 19 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('HeaderController',
|
||||
function($scope, $rootScope, $location, notification, $http, controllerUtils, backupService) {
|
||||
function($scope, $rootScope, $location, notification, $http, $sce, controllerUtils, backupService) {
|
||||
$scope.menu = [{
|
||||
'title': 'Addresses',
|
||||
'icon': 'fi-address-book',
|
||||
|
|
@ -93,4 +93,22 @@ angular.module('copayApp.controllers').controller('HeaderController',
|
|||
backupService.download(w);
|
||||
};
|
||||
|
||||
$scope.getVideoURL = function(copayer) {
|
||||
if (config.disableVideo) return;
|
||||
|
||||
var vi = $rootScope.videoInfo[copayer]
|
||||
if (!vi) return;
|
||||
|
||||
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);
|
||||
return trusted;
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue