ImagePicker.SetMediaTypes
-------------------------

Sets the list of media types to access.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [ImagePicker](component_ImagePicker.md) | [13.2](newinversion132.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "ImagePicker.SetMediaTypes"; MediaTypes ) 

**MBS**( **"ImagePicker.SetMediaTypes";** /\* Sets the list of media types to access. \*/  
**$MediaTypes**) /\* The media types to request.e.g. "public.movie¶public.image" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| MediaTypes | The media types to request. | "public.movie¶public.image" |

### Result

Returns OK or error.

### Description

Sets the list of media types to access.  
Depending on the media types you assign to this property, the picker displays a dedicated interface for still images or movies, or a selection control that lets the user choose the picker interface. Before setting this property, check which media types are available by calling the [ImagePicker.AvailableMediaTypesForSourceType](ImagePickerAvailableMediaTypesForSourceType.md) function.  
If you set this property to an empty list, or to an list in which none of the media types is available for the current source, the system returns an error.  
When capturing media, the value of this property determines the camera interface to display. When browsing saved media, this property determines the types of media presented in the interface.  
By default, the value of this property is the image identifier, which designates the still camera interface when capturing media, and specifies that only still images should be displayed in the media picker when browsing saved media. The following example shows how to designate the movie capture interface, or to indicate that only movies should be displayed when browsing saved media.  
  
You may just query [ImagePicker.AvailableMediaTypesForSourceType](ImagePickerAvailableMediaTypesForSourceType.md) for the media types.  
### Examples

Request camera as source and let's make video:

 Set Variable \[ $r ; Value: MBS ( "[ImagePicker.New](ImagePickerNew.md)" ) \]   
Set Variable \[ $r ; Value: MBS ( "[ImagePicker.SetSourceType](ImagePickerSetSourceType.md)"; "Camera" ) \]   
Set Variable \[ $r ; Value: MBS ( "ImagePicker.SetMediaTypes"; "public.movie") \]   
Set Variable \[ $r ; Value: MBS ( "[ImagePicker.Present](ImagePickerPresent.md)") \]  
Request image or video:

 Set Variable \[ $r ; Value: MBS ( "ImagePicker.SetMediaTypes"; "public.image¶public.movie") \]  
### See also

- [ImagePicker.AvailableMediaTypesForSourceType](ImagePickerAvailableMediaTypesForSourceType.md)
- [ImagePicker.MediaType](ImagePickerMediaType.md)
- [ImagePicker.MediaTypes](ImagePickerMediaTypes.md)
- [ImagePicker.New](ImagePickerNew.md)
- [ImagePicker.Present](ImagePickerPresent.md)
- [ImagePicker.SetSourceType](ImagePickerSetSourceType.md)

### Release notes

- **Version 13.2**
    - Added [ImagePicker.SetMediaTypes](https://www.mbsplugins.eu/ImagePickerSetMediaTypes.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 13.2pr5](https://www.mbsplugins.de/archive/2023-05-03/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

Created 2nd May 2023 , last changed 2nd May 2023

  
[ImagePicker.SetEvaluate](ImagePickerSetEvaluate.md) - [ImagePicker.SetOverlayImage](ImagePickerSetOverlayImage.md)

[HTML Version](ImagePickerSetMediaTypes.shtml)