Contents

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.