Instance Method

selectedMediaOption(in:)

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

Declaration

func selectedMediaOption(in mediaSelectionGroup: AVMediaSelectionGroup) -> AVMediaSelectionOption?

Parameters

mediaSelectionGroup

A media selection group obtained from the player item’s asset.

Return Value

An instance of AVMediaSelectionOption that describes the currently selected option in the group.

Discussion

If the value of the allowsEmptySelection property of mediaSelectionGroup is true, the currently selected option in the group may be nil.

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 selectMediaOptionAutomatically(in: AVMediaSelectionGroup)

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

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