kvision / pl.treksoft.kvision.cordova / MediaCapture

MediaCapture

(js) object MediaCapture

Main media capture object.

Types

(js)

CaptureErrorCode

enum class CaptureErrorCode

Functions

(js)

addPendingCaptureListener

Add listeners for pending capture Cordova events.

fun addPendingCaptureListener(listener: (Result<List<MediaFile>, CaptureException>) -> Unit): Unit
(js)

captureAudio

Capture audio file(s).

suspend fun captureAudio(limit: Number = 1, duration: Number? = null): Result<List<MediaFile>, CaptureException>
(js)

captureImage

Capture image file(s).

suspend fun captureImage(limit: Number = 1): Result<List<MediaFile>, CaptureException>
(js)

captureVideo

Capture video file(s).

suspend fun captureVideo(limit: Number = 1, duration: Number? = null, lowQuality: Boolean = false): Result<List<MediaFile>, CaptureException>