Skip to main content

Kotlin Multiplatform device selection and effects

Use com.mediasfu:mediasfu-sdk 1.0.7 platform APIs for device selection, audio routing, and the virtual-background processor. The actual available implementation remains target-specific.

Enumerate and switch inputs​

import com.mediasfu.sdk.methods.utils.getMediaDevicesList
import com.mediasfu.sdk.webrtc.MediaDeviceInfo

suspend fun availableInputs(): Pair<List<MediaDeviceInfo>, List<MediaDeviceInfo>> {
val cameras = getMediaDevicesList("videoinput")
val microphones = getMediaDevicesList("audioinput")
return cameras to microphones
}

Pass a selected device through the active room's SwitchVideoOptions or SwitchAudioOptions. The SDK also provides audio-output selection through its media settings and switchAudioOutput boundary. Permission, routing, and effect support depend on the platform target.

Backgrounds and translation​

VirtualBackgroundProcessor and the room's background state define the effect boundary. A common interface does not mean all targets have the same working processor; retain the ordinary camera and a None choice. Translation models and receive handlers can present data in a configured room, but do not create a transcription provider or guarantee language support, accuracy, translated audio, or transcript storage.

For target-specific room composition, see the Kotlin SDK guide and Kotlin media recovery.