Skip to main content
Language

Configure Camera

VideoEditor SDK supports several configuration options for the CameraViewController allowing flexible adaptation to different needs and use cases. For a detailed explanation of how to configure different editor views, refer to this guide.

showCancelButton#

By default, the camera view controller does not show a cancel button, so that it can be embedded into any other view controller. If presented inside a modal, however, as in this example we can configure the button to be visible.

allowedRecordingModes#

By default, the camera view controller allows to both record a video as well as take a photo. Since, in this example we are only using VE.SDK, we disable taking photos.

allowedCameraPositions#

The default configuration allows all camera positions. If, however, we want to open with the front camera initially. for example in a social media application, we can configure the order of allowed camera positions.

allowedRecordingOrientations#

There are also no default constraints on recording modes. To specify a set of allowed recording orientations assign them as an array. If the current orientation of the device does not match any of the specified orientations the first one of these is used.