iOS Developer Library

Developer

AV Foundation Framework Reference AVMediaSelectionGroup Class Reference

Options
Deployment Target:

On This Page
Language:

AVMediaSelectionGroup

An AVMediaSelectionGroup represents a collection of mutually exclusive options for the presentation of media within an asset.

  • A collection of mutually exclusive media selection options (read-only)

    Declaration

    Swift

    var options: [AVMediaSelectionOption] { get }

    Objective-C

    @property(nonatomic, readonly) NSArray <AVMediaSelectionOption *> *options

    Discussion

    The value of the property is an array of AVMediaSelectionOption objects.

    Availability

    Available in iOS 5.0 and later.

  • Returns the instance of AVMediaSelectionOption with properties that match the given property list.

    Declaration

    Swift

    func mediaSelectionOptionWithPropertyList(_ plist: AnyObject) -> AVMediaSelectionOption?

    Objective-C

    - (AVMediaSelectionOption *)mediaSelectionOptionWithPropertyList:(id)plist

    Parameters

    plist

    A property list previously obtained from an option in the group using propertyList (AVMediaSelectionOption).

    Return Value

    If the properties in plist match those of an option in the group, a corresponding instance of AVMediaSelectionOption, otherwise nil.

    Availability

    Available in iOS 5.0 and later.

  • The default option in the group. (read-only)

    Declaration

    Swift

    var defaultOption: AVMediaSelectionOption? { get }

    Objective-C

    @property(nonatomic, readonly) AVMediaSelectionOption *defaultOption

    Discussion

    The default option is intended for use in the absence of a specific end-user selection or preference. Can be nil, indicating that without a specific end-user selection or preference, no option in the group is intended to be selected.

    Availability

    Available in iOS 8.0 and later.

  • Indicates whether it’s possible to present none of the options in the group when an associated player item is played. (read-only)

    Declaration

    Swift

    var allowsEmptySelection: Bool { get }

    Objective-C

    @property(nonatomic, readonly) BOOL allowsEmptySelection

    Discussion

    If the value of this property is YEStrue, you can deselect all of the available media options in the group by passing nil as the specified AVMediaSelectionOption object to selectMediaOption:inMediaSelectionGroup:.

    Availability

    Available in iOS 5.0 and later.