Platform
Language
Framework
Configure the Mobile Camera
In this example, we will show you how to configure the camera.
Explore a full code sample on GitHub.
License#
All the basic configuration settings are part of the EngineSettings
which are required to initialize the camera.
license
– the license to activate the Engine with.
userID
– an optional unique ID tied to your application's user. This helps us accurately calculate monthly active users (MAU). Especially useful when one person uses the app on multiple devices with a sign-in feature, ensuring they're counted once. Providing this aids in better data accuracy. The default value isnil
.
Configuration#
You can optionally pass a CameraConfiguration
struct to the Camera
initializer.
recordingColor
– the color of the record button.
highlightColor
– the highlight color of the delete and confirm buttons.
maxTotalDuration
– the total duration that the camera is allowed to record.
allowModeSwitching
– Set tofalse
to lock the camera into its initial mode.
Mode#
You can optionally configure the initial mode of the camera.
Available Modes#
.standard
: the regular camera..dualCamera(layoutMode)
: records with both front and back camera at the same time.layoutMode
determines the layout of the two cameras. Available options are.horizontal
and.vertical
.
.reaction(layoutMode, URL, positionsSwapped)
: records with the camera while playing back a video.layoutMode
determines the layout of the two cameras. Available options are.horizontal
and.vertical
.URL
the URL to video to record a reaction to.positionsSwapped
a boolean indicating if the video and camera feed should swap positions. By default, the video being reacted to is on the top/left (depending onlayoutMode
).