Created
February 3, 2021 09:31
-
-
Save enricop89/7cf017fa87ac33a09650bf0cfd7e81f0 to your computer and use it in GitHub Desktop.
Screensharing with audio from Mic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const publish = Promise.all([ | |
OT.getUserMedia({ | |
videoSource: 'screen' | |
}), | |
OT.getUserMedia({ | |
videoSource: null | |
}) | |
]) | |
.then(([screenStream, micStream]) => { | |
return OT.initPublisher(null, { | |
videoSource: screenStream.getVideoTracks()[0], | |
audioSource: micStream.getAudioTracks()[0] | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment