video works both ways!!
This commit is contained in:
parent
f5b8aa7c61
commit
97014cdace
2 changed files with 12 additions and 12 deletions
|
|
@ -5,7 +5,11 @@ angular.module('copay.controllerUtils')
|
|||
var root = {};
|
||||
$rootScope.videoSrc = {};
|
||||
$rootScope.getVideoURL = function(copayer) {
|
||||
return $sce.trustAsResourceUrl(decodeURI($rootScope.videoSrc[copayer]));
|
||||
var encoded = $rootScope.videoSrc[copayer];
|
||||
if (!encoded) return;
|
||||
var url = decodeURI(encoded);
|
||||
var trusted = $sce.trustAsResourceUrl(url);
|
||||
return trusted;
|
||||
};
|
||||
|
||||
root.logout = function() {
|
||||
|
|
@ -34,8 +38,8 @@ angular.module('copay.controllerUtils')
|
|||
var handlePeerVideo = function(err, peerID, url) {
|
||||
if (err) {
|
||||
root.onErrorDigest(err);
|
||||
return;
|
||||
}
|
||||
alert('add this video url='+url+' for peer '+peerID);
|
||||
$rootScope.videoSrc[peerID] = encodeURI(url);
|
||||
$rootScope.$apply();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue