startPreview

@RequiresPermission(allOf = ["android.permission.CAMERA"])
open override fun startPreview(previewSurface: Surface, cameraId: String)

Starts audio and video capture. BaseStreamer.configure must have been called at least once.

Inside, it launches both camera and microphone capture.

Parameters

previewSurface

Where to display camera capture. Could be a Surface from a SurfaceView or a TextureView.

cameraId

camera id (get camera id list from Context.cameraList)

See also

Throws

if audio or video capture couldn't be launch