W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > December 2021

Re: [mediacapture-main] GetDisplayMedia don't capture the audio from microphone (#694)

From: kfes50509 via GitHub <sysbot+gh@w3.org>
Date: Mon, 20 Dec 2021 03:16:37 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-997557489-1639970196-sysbot+gh@w3.org>
try it!
`navigator.mediaDevices.getDisplayMedia({ video: true })
      .then(async (videoStream) => {
        const audioStream = await navigator.mediaDevices.getUserMedia({ audio: true, video: false }).catch((e) => { throw e; });
        const audioTrack = audioStream.getAudioTracks();
        videoStream.addTrack(audioTrack[0]);
      })
      .catch((e) => {
        console.log(e);
        this.startScreenRecording();
      });`

-- 
GitHub Notification of comment by kfes50509
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/694#issuecomment-997557489 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 20 December 2021 03:16:39 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:55 UTC