Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-01-21 12:50:59 +0300
committerJoas Schilling <coding@schilljs.com>2022-01-25 11:59:07 +0300
commitc9eaa0e1a286490093899cc6362a0bff25fb186a (patch)
tree3b19b9b1de961ec45cd9c02a3c88e28ba362651b /src/utils
parent15d02e85dab9bd456857e213f6065716d672bab5 (diff)
Allow to share audio of screenshares
Currently only works in Chrome and Chrome based browsers and is limited to sharing a ChromeTab or the full system sound. Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/webrtc/simplewebrtc/getscreenmedia.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/utils/webrtc/simplewebrtc/getscreenmedia.js b/src/utils/webrtc/simplewebrtc/getscreenmedia.js
index e7873f84b..57fee6723 100644
--- a/src/utils/webrtc/simplewebrtc/getscreenmedia.js
+++ b/src/utils/webrtc/simplewebrtc/getscreenmedia.js
@@ -35,7 +35,16 @@ module.exports = function(mode, constraints, cb) {
}
if (navigator.mediaDevices && navigator.mediaDevices.getDisplayMedia) {
- navigator.mediaDevices.getDisplayMedia({ video: true }).then(function(stream) {
+ navigator.mediaDevices.getDisplayMedia({
+ video: true,
+ // Disable default audio optimizations, as they are meant to be used
+ // with a microphone input.
+ audio: {
+ echoCancellation: false,
+ autoGainControl: false,
+ noiseSuppression: false,
+ },
+ }).then(function(stream) {
callback(null, stream)
}).catch(function(error) {
callback(error, null)