startPreview

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

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

Parameters

previewSurface

The Surface used for camera preview

cameraId

The camera id where to start preview

See also


@RequiresPermission(allOf = ["android.permission.CAMERA"])
open fun startPreview(surfaceView: SurfaceView, cameraId: String = camera)

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

Parameters

surfaceView

The SurfaceView used for camera preview

cameraId

The camera id where to start preview

See also


@RequiresPermission(allOf = ["android.permission.CAMERA"])
open fun startPreview(surfaceHolder: SurfaceHolder, cameraId: String = camera)

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

Parameters

surfaceHolder

The SurfaceHolder used for camera preview

cameraId

The camera id where to start preview

See also


@RequiresPermission(allOf = ["android.permission.CAMERA"])
open fun startPreview(textureView: TextureView, cameraId: String = camera)

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

Parameters

textureView

The TextureView used for camera preview

cameraId

The camera id where to start preview

See also