Skip to content

Commit

Permalink
window.stream.getVideoTracks[0].stop
Browse files Browse the repository at this point in the history
  • Loading branch information
samdutton committed Dec 16, 2016
1 parent dc9d8c5 commit ad2e04f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion getusermedia/constraints/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ hdButton.onclick = function() {
function getMedia(constraints) {
if (window.stream) {
video.src = null;
window.stream.stop();
window.stream.getVideoTracks()[0].stop();
}
navigator.getUserMedia(constraints, successCallback, errorCallback);
}
2 changes: 1 addition & 1 deletion getusermedia/test/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function errorCallback(error) {
function start() {
if (window.stream) {
videoElement.src = null;
window.stream.stop();
window.stream.getVideoTracks()[0].stop();
}
var audioSource = audioSelect.value;
var videoSource = videoSelect.value;
Expand Down

0 comments on commit ad2e04f

Please sign in to comment.