Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1    Statistic  


Captures a still image.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
AVRecorder 6.2 Yes Yes No No Yes

MBS( "AVRecorder.CaptureStillPhoto"; AVSession { ; FileName } )


Parameter Description Example value
AVSession The ID for the AVRecorder session as returned by AVRecorder.Init. $AVSession
FileName Optional
The file name for the jpeg image.


Returns image or error.


Captures a still image.
The image is returned a JPEG image as container value on Mac and BMP on Windows.
Added Windows support with plugin version 6.5.
May require running the preview as we capture only current preview frame on Windows.


Init and Capture photo:

#Start session
Set Variable [$capture; Value:MBS( "AVRecorder.Init" )]
#Pick first video device
Set Variable [$r; Value:MBS( "AVRecorder.SetVideoDevice"; $capture; 0 )]
#Start preview
Set Variable [$r; Value:MBS("AVRecorder.StartPreview"; $capture)]
#Wait a bit to have camera get up and running
Pause/Resume Script [Duration (seconds): ,5]
#Take a picture
Set Variable [$r; Value:MBS( "AVRecorder.CaptureStillPhoto"; $capture )]
#Put in container
Set Field [test::Test; $r]
Set Variable [$r; Value:MBS( "AVRecorder.Release"; $capture )]

See also

AVRecorder.AudioDeviceInfo   -   AVRecorder.ClosePreview

Feedback: Report problem or ask question.

MBS Xojo PDF Plugins