You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
Copy over disablement of media streams after permissions requested
Fixes https://github.com/vector-im/riot-web/issues/8340
This commit is contained in:
@@ -40,7 +40,13 @@ export default class VoiceSettingsTab extends React.Component {
|
|||||||
this._refreshMediaDevices();
|
this._refreshMediaDevices();
|
||||||
}
|
}
|
||||||
|
|
||||||
_refreshMediaDevices = async () => {
|
_refreshMediaDevices = async (stream) => {
|
||||||
|
if (stream) {
|
||||||
|
// kill stream so that we don't leave it lingering around with webcam enabled etc
|
||||||
|
// as here we called gUM to ask user for permission to their device names only
|
||||||
|
stream.getTracks().forEach((track) => track.stop());
|
||||||
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
mediaDevices: await CallMediaHandler.getDevices(),
|
mediaDevices: await CallMediaHandler.getDevices(),
|
||||||
activeAudioOutput: CallMediaHandler.getAudioOutput(),
|
activeAudioOutput: CallMediaHandler.getAudioOutput(),
|
||||||
|
|||||||
Reference in New Issue
Block a user