From 230bb99bbb2a8e1c8a013a44f49baeb3d5a44a15 Mon Sep 17 00:00:00 2001 From: Manuel Odelain Date: Mon, 14 Sep 2015 09:10:11 +0100 Subject: [PATCH] MediaStream `stop()` is deprecated Use MediaStreamTrack `stop()` instead of MediaStream `stop()`. https://developers.google.com/web/updates/2015/07/mediastream-deprecations --- webcam.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webcam.js b/webcam.js index 4b5b8f1..8ea9885 100644 --- a/webcam.js +++ b/webcam.js @@ -179,7 +179,7 @@ var Webcam = { this.unflip(); if (this.userMedia) { - try { this.stream.stop(); } catch (e) {;} + try { this.stream.getTracks()[0].stop(); } catch (e) {;} delete this.stream; delete this.video; }