---
title: "mediaSelectionOptions(from:with:)"
framework: avfoundation
role: symbol
role_heading: Type Method
path: "avfoundation/avmediaselectiongroup/mediaselectionoptions(from:with:)"
---

# mediaSelectionOptions(from:with:)

Returns an array containing the media selection options from a given array that match the specified locale.

## Declaration

```swift
class func mediaSelectionOptions(from mediaSelectionOptions: [AVMediaSelectionOption], with locale: Locale) -> [AVMediaSelectionOption]
```

## Parameters

- `mediaSelectionOptions`: An array of doc://com.apple.avfoundation/documentation/AVFoundation/AVMediaSelectionOption objects to be filtered.
- `locale`: The locale that must be matched for a media selection option to be copied to the output array.

## Return Value

Return Value An array containing the media selection options from array that match the locale.

## See Also

### Filtering selection options

- [playableMediaSelectionOptions(from:)](avfoundation/avmediaselectiongroup/playablemediaselectionoptions(from:).md)
- [mediaSelectionOptions(from:withMediaCharacteristics:)](avfoundation/avmediaselectiongroup/mediaselectionoptions(from:withmediacharacteristics:).md)
- [mediaSelectionOptions(from:withoutMediaCharacteristics:)](avfoundation/avmediaselectiongroup/mediaselectionoptions(from:withoutmediacharacteristics:).md)
- [mediaSelectionOptions(from:filteredAndSortedAccordingToPreferredLanguages:)](avfoundation/avmediaselectiongroup/mediaselectionoptions(from:filteredandsortedaccordingtopreferredlanguages:).md)
- [customMediaSelectionScheme](avfoundation/avmediaselectiongroup/custommediaselectionscheme.md)
