It is possible to capture the audio of the PC in open vidu?

It is possible to capture the audio of the pc when sharing screen?

¿Es posible capturar el audio de la PC cuando se comparte la pantalla?

Capturing system audio depends on browser, not in OpenVidu.

Please take a look to this StackOverflow question.

1 Like

Hello, I check the StackOverflow question but I can’t implement the audio capture using the OpenVidu Publisher.

I know if I use screen for videoSource it starts to share the screen (al the screen, one windows or one tab), but… how can I set the system audio as source? Y try with

mediaSource: 'audioCapture'  //doesn't works
audio: {  //doesn't works neither
            mandatory: {
                chromeMediaSource: 'system',
                chromeMediaSourceId: streamId
            }
        },
chromeMediaSource: 'system' //doesn't works neither
mediaSource: 'system' //doesn't works neither

Chrome on Windws and Linux.

But, if I set mediaSource to ‘undefined’ it use the mic.

Any help?

OpenVidu.initPublisher method i just a wrapper around native Web API to make simpler the process of generating a MediaStream object. But in the end what the browser needs is a MediaStream object containing an audio MediaStreamTrack and/or a video MediaStreamTrack.
That’s why OpenVidu.initPublisher also offers the possibility of initializing your Publisher object directly providing the MediaStreamTrack objects as videoSource or audioSource. Documentation is very complete in OpenVidu: https://docs.openvidu.io/en/2.13.0/api/openvidu-browser/interfaces/publisherproperties.html

So, if there is a way for the bowsers to get an audio MediaStreamTrack with the system’s audio, you will be able to pass it as audioSource.