camera

Version: stable

FUNCTION
start_capture()
stop_capture()
get_info()
get_frame()

Functions

start_capture()

start_capture()

Start camera capture using the specified camera (front/back) and capture quality. This may trigger a camera usage permission popup. When the popup has been dismissed the callback will be invoked with camera start status.

PARAMETERS

EXAMPLES

camera.start_capture(camera.CAMERA_TYPE_BACK, camera.CAPTURE_QUALITY_HIGH, function(self, message)
    if message == camera.CAMERA_STARTED then
        -- do stuff
    end
end)

stop_capture()

stop_capture()

Stops a previously started capture session.

PARAMETERS

EXAMPLES

camera.stop_capture()

get_info()

get_info()

Gets the info from the current capture session.

PARAMETERS

EXAMPLES

local info = camera.get_info()
print("width", info.width)
print("height", info.height)

get_frame()

get_frame()

Get captured frame.

PARAMETERS

EXAMPLES

self.cameraframe = camera.get_frame()