Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Captures a still image.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
AVRecorder | 6.2 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
AVSession | The ID for the AVRecorder session as returned by AVRecorder.Init. | $AVSession | |
FileName | The file name for the jpeg image. | "still.jpg" | Optional |
Returns image or error.
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]
#Cleanup
Set Variable [$r; Value:MBS( "AVRecorder.Release"; $capture )]
Created 2nd May 2016, last changed 30th August 2018
AVRecorder.AuthorizationStatusForMediaType - AVRecorder.ClosePreview
Feedback: Report problem or ask question.