# GraffitiCamera
Class Inherits GraffitiWebUIControl
## About
Allows your users to take and upload images using a live preview directly within your Xojo web applications.
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Web
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| FacingModes | User <br > Environment | (None) |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| DevicesLoaded | (None) | (None) | Raised when the browser has sent the list of supported devices. |
| FrameReceived | frame as Picture <br> frameData as String | (None) | BASE64 encoded image data received from camera. |
| GotFocus | (None) | (None) | (None) |
| LostFocus | (None) | (None) | (None) |
| MouseEnter | (None) | (None) | (None) |
| MouseExit | (None) | (None) | (None) |
| Open | (None) | (None) | (None) |
| Shown | (None) | (None) | (None) |
| StreamError | errorMessage as String | (None) | Raised when an error has occurred while streaming the media. This is usually a fatal error meaning that support is lacking in the browser or there's a problem with the device. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| isMobile | (None) | Boolean | Returns True if the current browser is running on an Android or iOS device. |
| Pause | (None) | (None) | Pause real-time display. |
| Play | fromDevice as GraffitiCameraDevice <br> frameSize as Size = Nil | (None) | Play real-time display. |
| RequestFrame | (None) | (None) | Get a single frame from the real-time display. |
| Stop | (None) | (None) | Stop real-time display. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Devices() | GraffitiCameraDevice | (None) | Array of all available devices. |
| FacingMode | FacingModes | (None) | Camera used for mobile devices that only supply one camera device ID but differentiate between User and Environment facings. |
| isPaused | Boolean | False | True when real-time display is paused. |
| isPlaying | Boolean | False | True when real-time display is playing. |
| Supported | Boolean | (None) | True if the user's browser supports the API . |