ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Camera functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
CameraVideoStart (Function)
In french: CaméraVidéoDémarre
Starts recording a video via a Camera control in an Android or iOS application. The different options specified for the Camera control (flash, back or front camera, etc.) are taken into account.
To stop recording the video, use CameraVideoStop. The video is saved in the application's default directory, or in the directory specified with the WorkingDirectory property.
Note: This function can only be used with a Camera field in version 27 or higher (the field must not have the "Mode compatible 26" option ticked in the "General" tab of the field description window)..
Example
// BTN_Start_video click code
ChronoStart()
TimerSys(TimerSys_Callback, 1 s)
INTERNAL PROCEDURE TimerSys_Callback()
	dDuration is Duration = ChronoValue()
	STC_CPT_VIDEO = DurationToString(dDuration,"HH:MM:SS")
END
CameraVideoStart(CAM_Camera, CameraVideoStart_Callback)

INTERNAL PROCEDURE CameraVideoStart_Callback(bSuccess is boolean, VideoPath is string)
	ChronoEnd()
	EndTimerSys()
	STC_CPT_VIDEO = "00:00:00"
	IF bSuccess THEN
		STC_VIDEO_PATH = VideoPath
		MyWindow.Plane = 4
	ELSE
		ToastDisplay("Cannot record video." + CR + ErrorInfo())
	END
END
// Stop video 
CameraVideoStop(CAM_Camera)
Syntax
CameraVideoStart(<Camera control> , <WLanguage procedure>)
<Camera control>: Control name
Name of the Camera control that records the video.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called once the video recording has been stopped (with CameraVideoStop).
For more details on this procedure, see Parameters of the procedure used by CameraVideoStart.
Component: wd300android.aar
Minimum version required
  • Version 27
Comments
Click [Add] to post a comment

Last update: 10/01/2024

Send a report | Local help