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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Queries authorization status for audio/video recording.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
AVRecorder | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
Parameter | Description | Example |
---|---|---|
MediaType | The media type, can be video or audio. | "video" |
Returns status or error.
NotDetermined | Indicates that the user has not yet made a choice regarding whether the client can access the hardware. |
Restricted | The client is not authorized to access the hardware for the media type. The user cannot change the client's status, possibly due to active restrictions such as parental controls being in place. |
Denied | The user explicitly denied access to the hardware supporting a media type for the client. |
Authorized | The client is authorized to access the hardware supporting a media type. |
Check status and request access:
If [ MBS("IsMacOS") ]
Set Variable [ $status ; Value: MBS( "AVRecorder.AuthorizationStatusForMediaType"; "video" ) ]
If [ $status = "NotDetermined" ]
Set Variable [ $r ; Value: MBS( "AVRecorder.RequestAccessForMediaType"; "video" ) ]
Exit Script [ Text Result: ]
Else If [ $status = "Denied" ]
Show Custom Dialog [ "Can't access camera" ; "Please go to system preferences, privacy and enable camera for FileMaker." ]
Exit Script [ Text Result: ]
Else If [ $status = "Authorized" ]
# this is fine!
End If
Else If [ MBS("IsWindows") ]
# nothing needed
End If
This function checks for a license.
Created 2nd September 2018, last changed 24th February 2022