Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
ImagePicker.AvailableMediaTypesForSourceType
Returns an array of the available media types for the specified source type.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
ImagePicker | 7.3 | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
sourceType | The source to use to pick an image. Can be PhotoLibrary, Camera or SavedPhotosAlbum. |
"Camera" |
Result
Returns list or error.
Description
Returns an array of the available media types for the specified source type.Some iOS devices support video recording. Use this method, along with the ImagePicker.IsSourceTypeAvailable function, to determine if video recording is available on a device. The availability of video recording is indicated by the presence of the
kUTTypeMovie (public.movie) media type for the camera source type.
Examples
Check availability:
Set Variable [ $CameraAvailable ; Value: MBS("ImagePicker.IsSourceTypeAvailable"; "Camera") ]
Set Variable [ $PhotoLibraryAvailable ; Value: MBS("ImagePicker.IsSourceTypeAvailable"; "PhotoLibrary") ]
Set Variable [ $SavedPhotosAlbumAvailable ; Value: MBS("ImagePicker.IsSourceTypeAvailable"; "SavedPhotosAlbum") ]
Check available types:
Set Variable [ $CameraTypes ; Value: MBS("ImagePicker.AvailableMediaTypesForSourceType"; "Camera") ]
Set Variable [ $PhotoLibraryTypes ; Value: MBS("ImagePicker.AvailableMediaTypesForSourceType"; "PhotoLibrary") ]
Set Variable [ $SavedPhotosAlbumTypes ; Value: MBS("ImagePicker.AvailableMediaTypesForSourceType"; "SavedPhotosAlbum") ]
See also
This function is free to use.
Created 17th June 2017, last changed 2nd May 2023
ImagePicker.AvailableCaptureModesForCameraDevice - ImagePicker.ClearMedia