Skip to content

Commit

Permalink
[microphone] Close stream after recording
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Mar 30, 2020
1 parent 2efafec commit 967f40a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion node-red-node-ui-microphone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-node-ui-microphone",
"version": "0.1.0",
"version": "0.1.1",
"description": "A Node-RED ui node to record audio on a dashboard.",
"author": "Nick O'Leary",
"license": "Apache-2.0",
Expand Down
2 changes: 2 additions & 0 deletions node-red-node-ui-microphone/ui_microphone.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ module.exports = function(RED) {
clearTimeout(stopTimeout);
stopTimeout = null;
}

stream.getTracks().forEach( function(track) { track.stop() });
}
};
// Timeslice is not current exposed.
Expand Down

0 comments on commit 967f40a

Please sign in to comment.