Skip to main content
Version: 3.x.x

VideoSDK Class Properties - Android

getSelectedAudioDevice()​

  • type: MicrophoneDeviceInfo?

  • The getSelectedAudioDevice() method returns the audio device the SDK is set to use. room.setAudioDevice() changes it.

  • The SDK picks a device the first time you read it. It is null only before VideoSDK.initialize() has run, or when the device reports no audio device at all.

val selectedAudioDevice: MicrophoneDeviceInfo? = VideoSDK.getSelectedAudioDevice()
Log.d("VideoSDK", "Selected audio device: ${selectedAudioDevice?.label}")

getActiveAudioDevice()​

  • type: MicrophoneDeviceInfo?

  • The getActiveAudioDevice() method returns the audio device that Android is actually playing the call audio through. While a change of audio device is still being applied, it can differ from getSelectedAudioDevice().

  • It is null before VideoSDK.initialize() has run.

val activeAudioDevice: MicrophoneDeviceInfo? = VideoSDK.getActiveAudioDevice()
Log.d("VideoSDK", "Playing through: ${activeAudioDevice?.label}")

getSelectedVideoDevice()​

  • type: CameraDeviceInfo?

  • The getSelectedVideoDevice() method returns the camera the SDK opened last, or the one set with setSelectedVideoDevice().

  • It is null before any camera has been used.

val selectedVideoDevice: CameraDeviceInfo? = VideoSDK.getSelectedVideoDevice()
Log.d("VideoSDK", "Selected camera: ${selectedVideoDevice?.label}")

Got a Question? Ask us on discord