diff --git a/front/src/WebRtc/MediaManager.ts b/front/src/WebRtc/MediaManager.ts index 1a84d4a9..10a505cd 100644 --- a/front/src/WebRtc/MediaManager.ts +++ b/front/src/WebRtc/MediaManager.ts @@ -18,6 +18,12 @@ let videoConstraint: boolean|MediaTrackConstraints = { resizeMode: 'crop-and-scale', aspectRatio: 1.777777778 }; +let audioConstraint: boolean|MediaTrackConstraints = { + //TODO: make these values configurable in the game settings menu and store them in localstorage + autoGainControl: false, + echoCancellation: true, + noiseSuppression: false +}; export type UpdatedLocalStreamCallback = (media: MediaStream|null) => void; export type StartScreenSharingCallback = (media: MediaStream) => void; @@ -40,7 +46,7 @@ export class MediaManager { webrtcInAudio: HTMLAudioElement; private webrtcOutAudio: HTMLAudioElement; constraintsMedia : MediaStreamConstraints = { - audio: true, + audio: audioConstraint, video: videoConstraint }; updatedLocalStreamCallBacks : Set = new Set();