switchCamera

suspend fun CameraVideoTrack.switchCamera(deviceName: String? = null): String

Attempts to switch a camera to the specified one or to the opposite one.

Return

true if the switched camera is front-facing, false otherwise

Parameters

deviceName

a name of the camera to switch to, null to switch to opposite camera

Throws

if the operation failed