Camera
public protocol Camera
Camera protocol.
Provides access to the device’s camera in order to take pictures and to record videos. Also provides access to various camera settings, such as:
- Exposure,
- EV compensation,
- White balance,
- Recording mode, resolution and framerate selection,
- Photo mode, format and file format selection.
-
Whether the camera is active. This state may change depending on the current mode of the drone. For example the activation / deactivation of the thermal mode can activate / deactivate some cameras.
Declaration
Swift
var isActive: Bool { get }
-
Camera mode setting. This setting allows to change the camera’s current operating mode.
Declaration
Swift
var modeSetting: CameraModeSetting { get }
-
Camera exposure settings. This setting allows to configure the camera’s current exposure mode, shutter speed, iso sensitivity and maximum iso sensitivity
Declaration
Swift
var exposureSettings: CameraExposureSettings { get }
-
Camera EV (Exposure Value) compensation setting. This setting allows to configure the camera’s current ev compensation when current exposure mode in not
.manual
.Note
This setting is only available when exposure mode is.manual
.Declaration
Swift
var exposureCompensationSetting: CameraExposureCompensationSetting { get }
-
Camera white balance settings. This setting allows to configure the camera’s current white balance mode and temperature parameters.
Declaration
Swift
var whiteBalanceSettings: CameraWhiteBalanceSettings { get }
-
White balance lock.
nil
if white balance lock is not available or when device is not connected.Declaration
Swift
var whiteBalanceLock: CameraWhiteBalanceLock? { get }
-
HDR setting. Tell if HDR must be activated when available in current recording/photo setting.
nil
if HDR is not supported by this camera.Declaration
Swift
var hdrSetting: BoolSetting? { get }
-
Camera image styles settings. This setting allows to select and customize the current image style.
Note
This setting is only available when the drone is connected.Declaration
Swift
var styleSettings: CameraStyleSettings { get }
-
Camera recording mode settings. These settings allow to configure the camera’s recording mode, resolution and framerate parameters.
Declaration
Swift
var recordingSettings: CameraRecordingSettings { get }
-
Camera photo mode settings. These settings allow to configure the camera’s photo mode, format and file format parameters.
Declaration
Swift
var photoSettings: CameraPhotoSettings { get }
-
Auto start and stop recording setting. When enabled, if the drone is in
.recording
mode, recording starts when taking-off and stops after landing.nil
if auto-record is not supported by this camera.Declaration
Swift
var autoRecordSetting: BoolSetting? { get }
-
Exposure lock.
nil
if exposure lock is not available and when device is not connected.Declaration
Swift
var exposureLock: CameraExposureLock? { get }
-
Recording state.
Declaration
Swift
var recordingState: CameraRecordingState { get }
-
Photo state.
Declaration
Swift
var photoState: CameraPhotoState { get }
-
HDR state. Tell if HDR is currently active
Declaration
Swift
var hdrState: Bool { get }
-
Whether HDR is available in the current mode and configuration.
Declaration
Swift
var hdrAvailable: Bool { get }
-
Camera zoom.
nil
if zoom is not supported by this camera.Declaration
Swift
var zoom: CameraZoom? { get }
-
Camera alignment.
nil
if camera is not the active camera, if device is not connected or if alignment is not supported.Declaration
Swift
var alignment: CameraAlignment? { get }
-
Whether
startRecording
can be called.Declaration
Swift
var canStartRecord: Bool { get }
-
Whether
stopRecord
can be called.Declaration
Swift
var canStopRecord: Bool { get }
-
Whether
startPhotoCapture
can be called.Declaration
Swift
var canStartPhotoCapture: Bool { get }
-
Whether
stopPhotoCapture
can be called.Declaration
Swift
var canStopPhotoCapture: Bool { get }
-
Starts recording. Can be called when
recordingState.functionState
isready
.Declaration
Swift
func startRecording()
-
Stops recording. Can be called when
recordingState.functionState
isinProgress
.Declaration
Swift
func stopRecording()
-
Starts taking photo(s). Can be called when
canStartPhotoCapture
istrue
.Declaration
Swift
func startPhotoCapture()
-
Stops taking photos(s). Can be called when
canStopPhotoCapture
istrue
. The command is only sent whenphotoSettings.mode
isgpslapse
ortimelapse
.Declaration
Swift
func stopPhotoCapture()