Contents

selectedMediaOption(in:)

Returns the media selection option that’s currently selected in the specified group.

Declaration

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

Parameters

  • mediaSelectionGroup:

    A media selection group obtained from the associated asset.

Return Value

The currently selected AVMediaSelectionOption. The return value may be nil.

Discussion

This method returns the currently selected AVMediaSelectionOption in the specified AVMediaSelectionGroup, but may return nil if media selection group’s allowsEmptySelection is set to true.

See Also

Inspecting the media selection