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

# mediaSelectionOptions(from:withMediaCharacteristics:)

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

## Declaration

```swift
class func mediaSelectionOptions(from mediaSelectionOptions: [AVMediaSelectionOption], withMediaCharacteristics mediaCharacteristics: [AVMediaCharacteristic]) -> [AVMediaSelectionOption]
```

## Parameters

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

## Return Value

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

## See Also

### Filtering selection options

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