Skip to content

Commit 39af7cc

Browse files
author
Severin Stöckli
committed
Mediastream.stop() is deprecated since Chrome 45, and does not work anymore in Chrome 47 (https://developers.google.com/web/updates/2015/07/mediastream-deprecations?hl=en)
fixed stopping each track individually. See also https://developer.mozilla.org/en/docs/Web/API/MediaStream for browser compatibility. Library gulp-livereload was missing for building the sources.
1 parent fe0bbf1 commit 39af7cc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"gulp-footer": "^1.0.5",
2929
"gulp-header": "^1.0.5",
3030
"gulp-jshint": "^1.6.1",
31+
"gulp-livereload": "^3.8.1",
3132
"gulp-sourcemaps": "^1.1.5",
3233
"gulp-uglify": "^0.3.0",
3334
"zuul": "^1.10.2"

src/qcode-decoder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ QCodeDecoder.prototype.decodeFromImage = function (img, cb) {
178178
*/
179179
QCodeDecoder.prototype.stop = function() {
180180
if (this.stream) {
181-
this.stream.stop();
181+
this.stream.getTracks().forEach(function (track) { track.stop(); });
182182
this.stream = undefined;
183183
}
184184

0 commit comments

Comments
 (0)