select(_:in:)
Selects a media option in a given media selection group and deselects all other options in that group.
Declaration
nonisolated func select(_ mediaSelectionOption: AVMediaSelectionOption?, in mediaSelectionGroup: AVMediaSelectionGroup)Parameters
- mediaSelectionOption:
The option to select.
If the value of the Allowsemptyselection property of
mediaSelectionGroupis True, you can passnilto deselect all media selection options in the group. - mediaSelectionGroup:
The media selection group, obtained from the receiver’s asset, that contains
mediaSelectionOption.
Mentioned in
Discussion
If mediaSelectionOption isn’t a member of the mediaSelectionGroup, no change in presentation state will result.
If multiple options within a group meet your criteria for selection according to locale or other considerations, and if these options are otherwise indistinguishable to you according to media characteristics that are meaningful for your application, content is typically authored so that the first available option that meets your criteria is appropriate for selection.