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:
parent
31a0d08c76
commit
58b7d85bf3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user