# CameraMediaItemType

> A media object from the camera or photo gallery.

- Source: https://titaniumsdk.com/docs/sdk/12.5.0/CameraMediaItemType
- Titanium SDK version: 12.5.0
- Kind: pseudo
- Platforms: Android, iPhone, iPad, macOS
- Extends: SuccessResponse
- Inheritance: SuccessResponse > ErrorResponse

## Properties

### code

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 3.1.0

Error code. Returns 0.

Error code will be 0.

### cropRect

- Type: Dimension
- Platforms: Android, iPhone, iPad, macOS

Simple object defining the user's selected crop rectangle, or `null` if the user has not edited the photo. `width`/`height` values are assumed to be in pixels.

### error

- Type: String
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 3.1.0

Error message, if any returned.

Will be undefined.

### livePhoto

- Type: Titanium.UI.iOS.LivePhoto
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 5.2.0
- Requires: iOS 9.1+

The live photo object, as a [Titanium.UI.iOS.LivePhoto](https://titaniumsdk.com/docs/sdk/Titanium.UI.iOS.LivePhoto.md) and
`undefined` if no live photo is selected.

### media

- Type: Titanium.Blob
- Platforms: Android, iPhone, iPad, macOS

The media object, as a [Blob](https://titaniumsdk.com/docs/sdk/Titanium.Blob.md).

### mediaType

- Type: String
- Platforms: Android, iPhone, iPad, macOS

The type of media, either `MEDIA_TYPE_PHOTO`, `MEDIA_TYPE_LIVEPHOTO` or `MEDIA_TYPE_VIDEO` defined in [Titanium.Media](https://titaniumsdk.com/docs/sdk/Titanium.Media.md).

### path

- Type: String
- Platforms: Android
- Since: Titanium SDK 12.5.0

The path of the image when returning data from the gallery.

### previewRect

- Type: Size
- Platforms: Android

Simple object defining the preview image size. This will be undefined when custom camera overlay is not used. Values are assumed to be in pixels.

### success

- Type: Boolean
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 3.1.0

Indicates if the operation succeeded. Returns `true`.

Returns `true`.

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

