Disable automatic gain control on microphone
AGC really makes the soundqulity way worse than it could be. Especially since it is so noticeable when entering a Jitsi where AGC is disabled (and suddenly some people sound much better). In the long run, this should probably be configurable. On the other hand the setting changes the audio _going out_ from a user, so it might be hard for him to judge which settings are a good or a bad idea…
This commit is contained in:
parent
8b170e6944
commit
03884eabca
@ -11,7 +11,7 @@ let valueVideo = 20;
|
|||||||
if(localValueVideo){
|
if(localValueVideo){
|
||||||
valueVideo = parseInt(localValueVideo);
|
valueVideo = parseInt(localValueVideo);
|
||||||
}
|
}
|
||||||
let videoConstraint: boolean|MediaTrackConstraints = {
|
let videoConstraint: MediaTrackConstraints = {
|
||||||
width: { min: 640, ideal: 1280, max: 1920 },
|
width: { min: 640, ideal: 1280, max: 1920 },
|
||||||
height: { min: 400, ideal: 720 },
|
height: { min: 400, ideal: 720 },
|
||||||
frameRate: { ideal: valueVideo },
|
frameRate: { ideal: valueVideo },
|
||||||
@ -19,6 +19,12 @@ let videoConstraint: boolean|MediaTrackConstraints = {
|
|||||||
resizeMode: 'crop-and-scale',
|
resizeMode: 'crop-and-scale',
|
||||||
aspectRatio: 1.777777778
|
aspectRatio: 1.777777778
|
||||||
};
|
};
|
||||||
|
const audioConstraint: MediaTrackConstraints = {
|
||||||
|
// TODO: Make these values configurable in the game settings menu and store them in local storage
|
||||||
|
autoGainControl: false,
|
||||||
|
echoCancellation: true,
|
||||||
|
noiseSuppression: false
|
||||||
|
};
|
||||||
|
|
||||||
export type UpdatedLocalStreamCallback = (media: MediaStream|null) => void;
|
export type UpdatedLocalStreamCallback = (media: MediaStream|null) => void;
|
||||||
export type StartScreenSharingCallback = (media: MediaStream) => void;
|
export type StartScreenSharingCallback = (media: MediaStream) => void;
|
||||||
@ -41,7 +47,7 @@ export class MediaManager {
|
|||||||
webrtcInAudio: HTMLAudioElement;
|
webrtcInAudio: HTMLAudioElement;
|
||||||
private webrtcOutAudio: HTMLAudioElement;
|
private webrtcOutAudio: HTMLAudioElement;
|
||||||
constraintsMedia : MediaStreamConstraints = {
|
constraintsMedia : MediaStreamConstraints = {
|
||||||
audio: true,
|
audio: audioConstraint,
|
||||||
video: videoConstraint
|
video: videoConstraint
|
||||||
};
|
};
|
||||||
updatedLocalStreamCallBacks : Set<UpdatedLocalStreamCallback> = new Set<UpdatedLocalStreamCallback>();
|
updatedLocalStreamCallBacks : Set<UpdatedLocalStreamCallback> = new Set<UpdatedLocalStreamCallback>();
|
||||||
@ -239,7 +245,7 @@ export class MediaManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public enableMicrophone() {
|
public enableMicrophone() {
|
||||||
this.constraintsMedia.audio = true;
|
this.constraintsMedia.audio = audioConstraint;
|
||||||
|
|
||||||
this.getCamera().then((stream) => {
|
this.getCamera().then((stream) => {
|
||||||
//TODO show error message tooltip upper of camera button
|
//TODO show error message tooltip upper of camera button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user