startPreview

Starts video preview.

Throws

if the video source is not previewable


suspend fun IWithVideoSource.startPreview(surface: Surface)

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)

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)

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)

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