cameraControlDo

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
cameraControlDo <controlName>, <action> [, <actionParameter> ...]
Associationscameracontrol
Summary

Execute specific behaviors of camera controls created using cameraControlCreate.

Introduced7.1
OSmac, windows, ios, android
Parameters
NameTypeDescription
controlName

The name of the control.

action

The action to perform.

"takePicture": Take a picture with the selected camera device. The picture is returned in the result as jpeg data. The `videodevice` must be set to a valid input device id or this command will fail.
"startRecording": Start recording video to the specified output file. This will be in WMV format on Windows, and MPEG4 on all other platforms. This action should have a `fileName` parameter which is the output file path for the recorded video. At least one of the `videodevice` or `audiodevice` properties must be set to a valid input device id or this command will fail.
"stopRecording": Stop recording video.
actionParameter

Additional parameter required for the action.

Example
	cameraControlDo "myCameraControl", "takePicture"
	cameraControlDo tCameraControlName, "startRecording", specialFolderPath("engine") & "/video.mp4"
Values
NameTypeDescription
The result

Actions may return a value through the result. The takePicture action is one such example.

RelatedCommand: cameraControlDelete, cameraControlSet, cameraControlCreate
Function: cameraControls, cameraControlTarget, the result, cameraControlGet
Description

Use the cameraControlDo command to execute behaviors specific to a particular camera control created using cameraControlCreate. An action may require or have a number of optional extra parameters which are defined in the values section below.