Skip to main content

Capturing Photos & Videos

Capturing Photos & Videos

Use this component to capture photos & videos from the device's camera (Front/Rear).

To get started using it, you must use KmpCamera. All functions are thread safe and main thread safe.

Below are the functions available:


_7
KmpCamera.capturePhoto{
_7
val photoPath = it // on success returns the file path of where the photo is saved
_7
}
_7
_7
KmpCamera.captureVideo{
_7
val videoPath = it // on success returns the file path of where the video is saved
_7
}

Android Setup

On android please add the following into your manifest file


_3
<uses-permission android:name="android.permission.CAMERA" />
_3
_3
<uses-feature android:name="android.hardware.camera" />

iOS Setup

Add the following into your device's info.plist file:


_5
<key>NSCameraUsageDescription</key>
_5
<string>Reason for why your app needs access to the camera</string>
_5
_5
<key>NSMicrophoneUsageDescription</key>
_5
<string>This is required for Video capturing to work</string>