From 842f6b8bd69bfe74636fc92781583a6dcd966d27 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Wed, 8 Apr 2020 17:00:38 +1000 Subject: [PATCH] Added better audio settings for streaming music --- src/routes/Game.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/routes/Game.js b/src/routes/Game.js index 84f7602..17486cc 100644 --- a/src/routes/Game.js +++ b/src/routes/Game.js @@ -126,7 +126,14 @@ function Game() { function handleStreamStart() { navigator.mediaDevices - .getDisplayMedia({ video: true, audio: true }) + .getDisplayMedia({ + video: true, + audio: { + noiseSuppression: false, + autoGainControl: false, + echoCancellation: false, + }, + }) .then((mediaStream) => { setStream(mediaStream); for (let peer of Object.values(peers)) {