From 769c25e09b02e696c6b4fa2dab6d9ab65e389d08 Mon Sep 17 00:00:00 2001 From: Kevin Perez Date: Thu, 19 Jan 2017 14:08:10 -0600 Subject: [PATCH] update stream.stop() call stream.stop()has been deprecated. In Chrome 55, this call produces an Uncaught TypeError: this.stream.stop is not a function. This method call has been changed to the new syntax this.stream.getTracks()[0].stop(). --- src/qcode-decoder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qcode-decoder.js b/src/qcode-decoder.js index 9d3d20b..50ef7de 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()[0].stop(); this.stream = undefined; }