Skip to content

Commit

Permalink
Mediastream.stop() is deprecated since Chrome 45, and does not work a…
Browse files Browse the repository at this point in the history
…nymore 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.
  • Loading branch information
Severin Stöckli committed Dec 22, 2015
1 parent fe0bbf1 commit 39af7cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -28,6 +28,7 @@
"gulp-footer": "^1.0.5",
"gulp-header": "^1.0.5",
"gulp-jshint": "^1.6.1",
"gulp-livereload": "^3.8.1",
"gulp-sourcemaps": "^1.1.5",
"gulp-uglify": "^0.3.0",
"zuul": "^1.10.2"
Expand Down
2 changes: 1 addition & 1 deletion src/qcode-decoder.js
Expand Up @@ -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;
}

Expand Down

0 comments on commit 39af7cc

Please sign in to comment.