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