---
title: "availableMediaTypes(for:)"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/uiimagepickercontroller/availablemediatypes(for:)"
---

# availableMediaTypes(for:)

Retrieves the available media types for the specified source type.

## Declaration

```swift
class func availableMediaTypes(for sourceType: UIImagePickerController.SourceType) -> [String]?
```

## Parameters

- `sourceType`: The source to use to pick an image.

## Return Value

Return Value An array whose elements identify the available media types for the specified source type.

## Discussion

Discussion Some iOS devices support video recording. Use this method, along with the isSourceTypeAvailable(_:) method, to determine if video recording is available on a device. The availability of video recording is indicated by the presence of the kUTTypeMovie media type for the UIImagePickerController.SourceType.camera source type.

## See Also

### Setting the picker source

- [isSourceTypeAvailable(_:)](uikit/uiimagepickercontroller/issourcetypeavailable(_:).md)
- [sourceType](uikit/uiimagepickercontroller/sourcetype-swift.property.md)
- [UIImagePickerController.SourceType](uikit/uiimagepickercontroller/sourcetype-swift.enum.md)
