# CameraOptionsType
Simple object for specifying options to showCamera.
NOTE
This is an abstract type. Any object of this structure can be used where this type is used.
# Properties
# allowEditing
Specifies if the media should be editable after capture/selection.
Default: false
# androidback
Function to call if the user presses the back button.
On Android, this property is considered only if overlay
is also set. If the user presses
the back button on the phone this callback function will be called. The camera view stays
open and you will need to call Ti.Media.hideCamera();
if you want to close it.
# animated
Specifies if the dialog should be animated upon showing and hiding.
Default: true
# arrowDirection
Controls the type of arrow and position of the popover.
This property is only used if the camera is displayed in a
popover (inPopOver
is true
).
# autohide
Specifies if the camera should be hidden automatically after the media capture is completed.
On Android, this property is considered only if overlay
is also set. When an
overlay is not set, the default Android Camera Activity is used, which is only
capable of reporting back the results of one taken photo, making autohide
meaningless in that context.
Default: true
# autorotate
Determines if the camera preview should rotate or not.
Set to false
to disable rotating the camera preview. The camera preview will remain
in the same orientation it was opened in.
Set to true
to allow the camera preview to rotate when the device rotates.
Black bars will appear and disappear as the device is rotated.
Default: true
# inPopOver
Show the camera in a popover.
Use inPopOver: true
on iPad to display the camera view in a popover.
Default: false
# mediaTypes
Array of media type constants to allow. Note: If you want to select live photos, iOS only allows you to select existing live photos from the gallery, capturing new live photos is not supported by iOS public API, yet.
Default: Both photo and video allowed.
# overlay
View to added as an overlay to the camera UI (on top).
On iOS, the overlay view is usually used in conjunction with showControls: false
.
The transform
property can be used to scale and position the camera preview inside
the overlay view.
Default: no overlay view
# popoverView
View to position the camera or photo gallery popover on top of.
This property is only used if the camera is displayed in a
popover (inPopOver
is true
).
# recording
Function to call during recording. Returns size and duration.
# saveToPhotoGallery
Specifies if the media should be saved to the photo gallery upon successful capture.
Default: false
# showControls
Indicates if the built-in camera controls should be displayed.
Default: true
# success
Function to call when the camera is closed after a successful capture/selection.
# targetImageHeight
Maximum height of the saved image. Depending on your phone and your value this might not be
exactly the value you specify. Check Ti.Media.cameraOutputSizes
first.
Default: false
# targetImageWidth
Maximum width of the saved image. Depending on your phone and your value this might not be
exactly the value you specify. Check Ti.Media.cameraOutputSizes
first.
Default: false
# transform
Transformation matrix to apply to the camera or photogallery view.
Can be used to size and position the camera or photogallery view behind an overlay view. iOS 10 note: There was a known iOS 10 issue caused by Apple that breaks the native camera transformation. Apple fixed this issue in the iOS 10.2 release.
Default: identity matrix
# videoMaximumDuration
Maximum duration (in milliseconds) to allow video capture before completing.
# videoQuality
Constant to indicate the video quality during capture.
# whichCamera
Opens the camera with the specified camera direction.