Camera object

The Camera object manages a video capture device

Event Description
Camera:onClick() Event fired when the user left-clicks on the Camera widget (widget only)
Camera:onContext() Event fired when the user right-clicks on the Camera widget (widget only)
Camera:onCreate() Event fired when the Camera widget has just been created (widget only)
Camera:onDrop() Event fired when content is dropped on the Camera widget (widget only)
Camera:onHide() Event fired when the Camera widget is hidden (widget only)
Camera:onHover() Event fired when the mouse moves over the Camera widget (widget only)
Camera:onLeave() Event fired when the mouse cursor leaves the Camera widget (widget only)
Camera:onMouseDown() Event fired when the user presses a mouse button over the Camera widget (widget only)
Camera:onMouseUp() Event fired when the user releases a mouse button over the Camera widget (widget only)
Camera:onShow() Event fired when the Camera widget is shown (widget only)
Property Description Access Type
Camera.align Align the Camera widget relative to its parent (widget only) readwrite string
Camera.allowdrop Controls whether the Camera widget is a drag and drop target (widget only) readwrite boolean
Camera.aspect Get or set the preview aspect ratio mode readonly string
Camera.border Get or set the Camera widget border visibility (widget only) readonly boolean
Camera.cursor Get or set the mouse cursor when hovering the Camera widget (widget only) readwrite string
Camera.enabled Controls whether the Camera widget responds to events (widget only) readwrite boolean
Camera.height Get or set the Camera widget height (widget only) readwrite number
Camera.parent Get the Camera widget's parent widget (widget only) readonly
Camera.record Access recording controls (start and stop) readonly table
Camera.recording Check whether the camera is currently recording readonly boolean
Camera.tooltip Get or set the Camera widget tooltip text (widget only) readwrite string
Camera.visible Controls whether the Camera widget appears on screen (widget only) readwrite boolean
Camera.width Get or set the Camera widget width (widget only) readwrite number
Camera.x Get or set the Camera widget horizontal position (widget only) readwrite number
Camera.y Get or set the Camera widget vertical position (widget only) readwrite number
Methods Description Return value
Camera:center() Center the Camera widget on its parent (widget only) -
Camera:constructor() Camera object constructor
Camera:hide() Hide and deactivate the Camera widget (widget only) -
Camera:show() Show and activate the Camera widget (widget only) -
Camera:snapshot() Save a snapshot of the current camera frame to a file boolean
Camera:toback() Put the Camera widget behind other widgets (widget only) -
Camera:tofront() Bring the Camera widget in front of other widgets (widget only) -