Constructor
new CameraCaptureController()
Methods
connect()
- Description:
Initialize controller
- Source:
detectMobileDevice()
- Description:
Detect if user is on mobile device Updates UI to show mobile-specific instructions
- Source:
formatFileSize(bytes) → {string}
- Description:
Format file size
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
bytes |
number | File size in bytes |
Returns:
Formatted size
- Type
- string
handleCapture(event)
- Description:
Handle image capture Called when user selects/captures an image
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
Event | File input change event |
showImagePreview(file)
- Description:
Show image preview (optional enhancement)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
file |
File | Image file to preview |
triggerCamera(event)
- Description:
Trigger camera input Useful if you have a custom camera button instead of using the file input directly
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
Event | Button click event |
(static) supportsCameraCapture() → {boolean}
- Description:
Check if browser supports camera capture
- Source:
Returns:
True if capture is supported
- Type
- boolean