Manage Media Devices
Get audio devices
To obtain the list of all currently available audio devices, use the getAudioDevices()
method.
This method returns a list of AudioDevice
objects.
// Get all audio devices
final audioDevices = await meeting.localUser.getAudioDevices();
Get video devices
To obtain the list of all currently available camera devices, use the getVideoDevices()
method.
This method returns a list of VideoDevice
objects.
// Get all video devices
final videoDevices = await meeting.localUser.getVideoDevices();
Set an Audio Device
To set an active audio device, use the setAudioDevice()
method. This
method takes a AudioDevice
object.
// get all available audio devices
final audioDevices = await meeting.localUser.getAudioDevices();
// switch audio device
await meeting.localUser.setAudioDevice(audioDevices[1]);
Set a Video Device
To set an active audio device, use the setVideoDevice()
method. This
method takes a VideoDevice
object.
// get all available video devices
final videoDevices = await meeting.localUser.getVideoDevices();
// switch video device
await meeting.localUser.setVideoDevice(videoDevices[1]);