startPreview

Starts video preview.

Throws

if the video source is not previewable


Sets preview surface and start video preview.

Parameters

surface

The Surface used for the source preview

See also

Throws

if the video source is not previewable


@RequiresPermission(value = "android.permission.CAMERA")
suspend fun IWithVideoSource.startPreview(surfaceView: SurfaceView)(source)

Sets preview surface and start video preview.

Parameters

surfaceView

The SurfaceView used for the source preview

See also

Throws

if the video source is not previewable


@RequiresPermission(value = "android.permission.CAMERA")
suspend fun IWithVideoSource.startPreview(surfaceHolder: SurfaceHolder)(source)

Sets preview surface and start video preview.

Parameters

surfaceHolder

The SurfaceHolder used for camera preview

See also

Throws

if the video source is not previewable


@RequiresPermission(value = "android.permission.CAMERA")
suspend fun IWithVideoSource.startPreview(textureView: TextureView)(source)

Sets preview surface and start video preview.

Parameters

textureView

The TextureView used for camera preview

See also

Throws

if the video source is not previewable