Creates an initialized media selection criteria instance with the specified settings.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 6.0+Beta
An array of strings containing language identifiers, in the preferred order. Can be
An array of strings indicating additional media characteristics, the preferred order. Can be
Supported media characteristics are defined in AVMediaSelectionOption Constants and Media Characteristics.
When making selections,
AVPlayer treats the
preferred as the paramount criterion and the preference for preferredMediaCharacteristics as secondary.
The objects in the
preferred array are indicated using BCP 47 language identifiers or ISO 639-2/T language codes.
If no option with any of the
preferred is available, a selection is made according to the default enabling and disabling of media options as stored in the asset.
preferred are used when selecting media for the
For example, desirable characteristics of legible media may include
Similarly, desirable characteristics of audible media may include
If no option is found that possesses all of the desired characteristics, the option that best matches the desired characteristics will be selected.