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

**URL:** <https://openvidu.discourse.group/t/it-is-possible-to-capture-the-audio-of-the-pc-in-open-vidu/268>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [March 19, 2020, 4:29am UTC](https://openvidu.discourse.group/t/it-is-possible-to-capture-the-audio-of-the-pc-in-open-vidu/268 "2020-03-19T04:29:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![melvingilberto](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/melvingilberto/32/25_2.png) [@melvingilberto](https://openvidu.discourse.group/u/melvingilberto)\
**Post date:** [March 19, 2020, 4:29am UTC](https://openvidu.discourse.group/t/it-is-possible-to-capture-the-audio-of-the-pc-in-open-vidu/268/1 "2020-03-19T04:29:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [March 19, 2020, 9:58pm UTC](https://openvidu.discourse.group/t/it-is-possible-to-capture-the-audio-of-the-pc-in-open-vidu/268/2 "2020-03-19T21:58:16Z")

</div>

Capturing system audio depends on browser, not in OpenVidu.

Please take a look to [this StackOverflow question](https://stackoverflow.com/questions/34235077/capture-system-sound-from-browser).

---

<div class="post-metadata">

**Author:** ![msalomon](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/msalomon/32/484_2.png) [@msalomon](https://openvidu.discourse.group/u/msalomon)\
**Post date:** [April 28, 2020, 10:19pm UTC](https://openvidu.discourse.group/t/it-is-possible-to-capture-the-audio-of-the-pc-in-open-vidu/268/3 "2020-04-28T22:19:10Z")

</div>

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

```auto
mediaSource: 'audioCapture' //doesn't works

```

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

```

```auto
chromeMediaSource: 'system' //doesn't works neither

```

```auto
mediaSource: 'system' //doesn't works neither

```

Chrome on Windws and Linux.

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

Any help?

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [April 28, 2020, 11:02pm UTC](https://openvidu.discourse.group/t/it-is-possible-to-capture-the-audio-of-the-pc-in-open-vidu/268/4 "2020-04-28T23:02:33Z")

</div>

`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](https://developer.mozilla.org/en-US/docs/Web/API/MediaStream) object containing an audio [MediaStreamTrack](https://developer.mozilla.org/es/docs/Web/API/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](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`.
