1
Fork 0

Share audio in addition to video.

This commit is contained in:
Juliusz Chroboczek 2022-02-21 18:19:25 +01:00
parent 3c98e15229
commit 296fe622df
1 changed files with 4 additions and 1 deletions

View File

@ -1393,7 +1393,10 @@ async function addShareMedia() {
try {
if(!('getDisplayMedia' in navigator.mediaDevices))
throw new Error('Your browser does not support screen sharing');
stream = await navigator.mediaDevices.getDisplayMedia({video: true});
stream = await navigator.mediaDevices.getDisplayMedia({
video: true,
audio: true,
});
} catch(e) {
console.error(e);
displayError(e);