diff --git a/src/qcode-decoder.js b/src/qcode-decoder.js index 9d3d20b..fc6336d 100644 --- a/src/qcode-decoder.js +++ b/src/qcode-decoder.js @@ -178,7 +178,7 @@ QCodeDecoder.prototype.decodeFromImage = function (img, cb) { */ QCodeDecoder.prototype.stop = function() { if (this.stream) { - this.stream.stop(); + this.stream.getTracks().forEach(function (track) { track.stop(); }); this.stream = undefined; }