Instance Method


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


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



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.


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.