Manage Media Devices
Media devices represents the hardware for the camera, microphone and speaker devices. To get the list of media devices that are currently being used, you can use the following methods:
- Kotlin
 - Java
 
// Get all audio devices
val audioDevices: List<DyteAudioDevice> = meeting.localUser.getAudioDevices()
// Get all video devices
val videoDevices: List<DyteVideoDevice> = meeting.localUser.getVideoDevices()
// Get all audio devices
List<DyteAudioDevice> audioDevices = meeting.getLocalUser().getAudioDevices();
// Get all video devices
List<DyteVideoDevice> videoDevices = meeting.getLocalUser().getVideoDevices();
Set audio device
To set a device as an active device, you can call setAudioDevice method. This
takes a DyteAudioDevice object.
- Kotlin
 - Java
 
meeting.localUser.setAudioDevice(device)
meeting.getLocalUser().setAudioDevice(device);
Set video device
To set a video device as an active device, you can call setVideoDevice method.
This takes a DyteVideoDevice object.
- Kotlin
 - Java
 
meeting.localUser.setVideoDevice(device)
meeting.getLocalUser().setVideoDevice(device);