0

Can we set the device from which the audio should be recorded in mediastreamRecorder API using enumerateDevices using Web Audio APIs?

Sajjad Hossain
  • 111
  • 1
  • 9
Kishore
  • 23
  • 3

2 Answers2

0

Sure, you have to first get the specific device's audio stream using navigator.getUserMedia and then pass the stream to mediastreamRecorder

Sajjad Hossain
  • 111
  • 1
  • 9
0

As stated in this answer, Selecting the audio device is the job of the operating system as you can see in the picture below. Thus you would need to construct a plugin that operates at the OS level in order to call into the OS to switch audio devices.

It would be a security risk to just let an app choose what media input device it wanted to use

enter image description here

Osvaldo Maria
  • 340
  • 5
  • 14