diff --git a/Gruntfile.js b/Gruntfile.js index 4f4747dc4..98e6ef651 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -58,7 +58,7 @@ module.exports = function(grunt) { 'bower_components/angular-foundation/mm-foundation-tpls.js', 'bower_components/angular-moment/angular-moment.js', 'bower_components/ng-lodash/build/ng-lodash.js', - 'bower_components/angular-qrcode/qrcode.js', + 'bower_components/angular-qrcode/angular-qrcode.js', 'bower_components/angular-gettext/dist/angular-gettext.js', 'bower_components/angular-touch/angular-touch.js', 'bower_components/angular-bitcore-wallet-client/angular-bitcore-wallet-client.js', diff --git a/bower.json b/bower.json index c0e08a17b..3bae25503 100644 --- a/bower.json +++ b/bower.json @@ -7,23 +7,20 @@ "bitcore" ], "dependencies": { - "angular": "~1.3.13", - "angular-foundation": "*", - "angular-qrcode": "~5.1.0", - "angular-gettext": "~2.0.5", - "animate.css": "3.4.0", - "foundation": "zurb/bower-foundation#~5.5.1", - "foundation-icon-fonts": "*", - "ng-lodash": "~0.2.0", - "angular-moment": "0.10.1", - "moment": "2.10.3", + "angular": "1.4.6", "angular-bitcore-wallet-client": "0.4.4", - "angular-ui-router": "~0.2.13", - "qrcode-decoder-js": "*", - "fastclick": "*", - "angular-ui-switch": "~0.1.0" - }, - "resolutions": { - "qrcode-generator": "0.0.1" + "angular-foundation": "0.7.0", + "angular-gettext": "2.1.0", + "angular-moment": "0.10.3", + "angular-qrcode": "monospaced/angular-qrcode#~6.0.3", + "angular-ui-router": "0.2.15", + "angular-ui-switch": "0.1.1", + "animate.css": "3.4.0", + "fastclick": "1.0.6", + "foundation": "5.5.2", + "foundation-icon-fonts": "*", + "moment": "2.10.6", + "ng-lodash": "0.2.3", + "qrcode-decoder-js": "*" } } diff --git a/src/js/directives/qrScanner.js b/src/js/directives/qrScanner.js index ac4ed7b80..cfc68ee93 100644 --- a/src/js/directives/qrScanner.js +++ b/src/js/directives/qrScanner.js @@ -61,7 +61,12 @@ angular.module('copayApp.directives') }; var _scanStop = function() { - if (localMediaStream && localMediaStream.stop) localMediaStream.stop(); + if (localMediaStream && localMediaStream.active) { + var localMediaStreamTrack = localMediaStream.getTracks(); + for (var i = 0; i < localMediaStreamTrack.length; i++) { + localMediaStreamTrack[i].stop(); + } + } localMediaStream = null; video.src = ''; }; @@ -156,4 +161,4 @@ angular.module('copayApp.directives') template: '' } } - ]); \ No newline at end of file + ]);