Capture Media
This documentation provides guidelines on capturing images and recording videos using the TruVideo Camera SDK. The SDK offers simple methods to integrate camera functionalities into your application.
Prerequisites
Ensure you have integrated the TruVideo Core SDK into your project and completed with the authentication process
Capturing an Image
To capture an image, follow these steps:
Step 1: Create new configuration to give to the camera
final config = CameraConfiguration(
lensFacing: TruvideoSdkCameraLensFacing.front,
//lensFacing: TruvideoSdkCameraLensFacing.front,
//lensFacing: TruvideoSdkCameraLensFacing.back,
flashMode: TruvideoSdkCameraFlashMode.off,
//flashMode: TruvideoSdkCameraFlashMode.off,
//flashMode: TruvideoSdkCameraFlashMode.on
orientation: TruvideoSdkCameraOrientation.portrait,
//orientation: TruvideoSdkCameraOrientation.portrait
//orientation: TruvideoSdkCameraOrientation.landscapeRight,
//orientation: TruvideoSdkCameraOrientation.landscapeRight,
//orientation: TruvideoSdkCameraOrientation.portraitReverse,
outputPath: outputPath,
mode: CameraMode.videoAndImage(),
// mode: CameraMode.videoAndImage(),
// mode: CameraMode.video(),
// mode: CameraMode.image(),
// mode: CameraMode.singleImage(),
// mode: CameraMode.singleVideo(),
// mode: CameraMode.singleMedia(),
// mode: CameraMode.singleVideoOrImage(),
);Step 2 : Present the camera with the configuration
Finalize :
After completing this steps the function should look like
What’s Next?
Now that you can capture media, you’re ready to:
By following this guide, you’ve enabled rich media capture in your iOS app with just a few lines of code. Let’s keep going!
Last updated
Was this helpful?