"audioSource" and "videoSource" customizing issue

Both of “audioSource” and “videoSource” is set as undefined in Openvidu sample.

OV.initPublisher(‘streamPublish’, {
audioSource: undefined, // The source of audio. If undefined default microphone
videoSource: undefined, // The source of video. If undefined default webcam
publishAudio: true, // Whether you want to start publishing with your audio unmuted or not
publishVideo: true, // Whether you want to start publishing with your video enabled or not
resolution: ‘2560x1440’, // The resolution of your video
frameRate: 30, // The frame rate of your video
insertMode: ‘APPEND’, // How the video is inserted in the target element ‘streamPublish’
mirror: false // Whether to mirror your local video or not
});

If users want to use with 2K+ webcam and external mic,
how can they set “audioSource” and “videoSource”?

Hello pabloFuente,

I appreciate your link. It helps me to understand the structure a lot.

One thing question remains.

I plugged in “USB AUDIO CODEC” into my MacBookPro.
The input is set as it but not “MacBookPro MIC”.
I want to improve the audio quality.

In that case, how can I get the exact deviceId value of “USB AUDIO CODEC”?
Is any command to detect or get it so that I can input the exact deviceId value instead of “audioSource: undefined”?

You can list all attached hardware devices with OpenVidu.getDevices