Instance Method

selectMediaOptionAutomatically(in:)

Selects the media option in the specified media selection group that best matches the receiver’s automatic selection criteria.

Declaration

func selectMediaOptionAutomatically(in mediaSelectionGroup: AVMediaSelectionGroup)

Parameters

mediaSelectionGroup

The media selection group, obtained from the receiver's asset, that contains the specified option.

Discussion

This method has no effect unless the appliesMediaSelectionCriteriaAutomatically property of the associated AVPlayer is true and unless automatic media selection has previously been overridden by invoking select(_:in:).

See Also

Selecting Media Options

var currentMediaSelection: AVMediaSelection

The current media selections for each of the receiver's media selection groups.

func select(AVMediaSelectionOption?, in: AVMediaSelectionGroup)

Selects a media option in a given media selection group and deselects all other options in that group.

func selectedMediaOption(in: AVMediaSelectionGroup) -> AVMediaSelectionOption?

Returns the media selection option that's currently selected from the specified group.

Deprecated

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software