hide QR scanner if not supported
This commit is contained in:
parent
1ec279cd83
commit
65e054c247
4 changed files with 12 additions and 2 deletions
|
|
@ -17,8 +17,13 @@ angular.module('copayApp.controllers').controller('JoinController',
|
|||
|
||||
$scope.hideAdv=true;
|
||||
|
||||
|
||||
|
||||
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
|
||||
|
||||
if (!window.cordova && !navigator.getUserMedia)
|
||||
$scope.disableScanner =1;
|
||||
|
||||
var _scan = function(evt) {
|
||||
if (localMediaStream) {
|
||||
context.drawImage(video, 0, 0, 300, 225);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
$scope.isRateAvailable = false;
|
||||
$scope.rateService = rateService;
|
||||
|
||||
|
||||
|
||||
rateService.whenAvailable(function() {
|
||||
$scope.isRateAvailable = true;
|
||||
$scope.$digest();
|
||||
|
|
@ -101,6 +103,9 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
|
||||
$scope.isMobile = isMobile.any();
|
||||
|
||||
if (!window.cordova && !navigator.getUserMedia)
|
||||
$scope.disableScanner =1;
|
||||
|
||||
$scope.submitForm = function(form) {
|
||||
if (form.$invalid) {
|
||||
var message = 'Unable to send transaction proposal.';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue