mirror of https://github.com/vector-im/riot-web
kill stream when using gUM for permission to device labels to kill camera
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
bbdc27019a
commit
5147246c17
|
@ -284,7 +284,12 @@ module.exports = React.createClass({
|
|||
this.setState({ electron_settings: settings });
|
||||
},
|
||||
|
||||
_refreshMediaDevices: function() {
|
||||
_refreshMediaDevices: function(stream) {
|
||||
if (stream) {
|
||||
// kill stream so that we don't leave it lingering around with webcam enabled etc
|
||||
stream.getTracks().forEach((track) => track.stop());
|
||||
}
|
||||
|
||||
Promise.resolve().then(() => {
|
||||
return CallMediaHandler.getDevices();
|
||||
}).then((mediaDevices) => {
|
||||
|
|
Loading…
Reference in New Issue