Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Requests permissions for media type.
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 OK or error.
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