bugfix and linting

* use 'const' on constraints which never change
* also re-enable constraints ater mic was re-enabled (after mute/unmute)
This commit is contained in:
TabascoEye 2021-01-30 02:24:36 +01:00 committed by GitHub
parent 31a0d08c76
commit 58b7d85bf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ let videoConstraint: boolean|MediaTrackConstraints = {
resizeMode: 'crop-and-scale',
aspectRatio: 1.777777778
};
let audioConstraint: boolean|MediaTrackConstraints = {
const audioConstraint: boolean|MediaTrackConstraints = {
//TODO: make these values configurable in the game settings menu and store them in localstorage
autoGainControl: false,
echoCancellation: true,
@ -243,7 +243,7 @@ export class MediaManager {
}
public enableMicrophone() {
this.constraintsMedia.audio = true;
this.constraintsMedia.audio = audioConstraint;
this.getCamera().then((stream) => {
//TODO show error message tooltip upper of camera button