Class

AVMediaSelectionOption

An object that represents a specific option for the presentation of media within a group of options.

Declaration

class AVMediaSelectionOption : NSObject

Topics

Managing Media Types

var mediaType: AVMediaType

The media type of the media data.

var mediaSubTypes: [NSNumber]

The media sub-types of the media data associated with the option.

func hasMediaCharacteristic(AVMediaCharacteristic) -> Bool

Returns a Boolean value that indicates whether the receiver has media with the given media characteristic.

Managing Metadata

var commonMetadata: [AVMetadataItem]

An array of metadata items for each common metadata key for which a value is available.

var availableMetadataFormats: [String]

The metadata formats that contain metadata associated with the option.

func metadata(forFormat: String) -> [AVMetadataItem]

Returns an array of metadata items—one for each metadata item in the container of a given format.

Getting the Selection Playable Status

var isPlayable: Bool

A Boolean value that indicates whether the media selection option is playable.

Getting the Language and Locale Settings

var displayName: String

A string suitable for display using the current system locale.

func displayName(with: Locale) -> String

Returns a string suitable for display using the specified locale.

var locale: Locale?

The locale for which the media option was authored.

var extendedLanguageTag: String?

The IETF BCP 47 language tag associated with the option

Getting the Property List

func propertyList() -> Any

Returns a serializable property list that’s sufficient to identify the option within its group.

Getting the Associated Media Selection Option

func associatedMediaSelectionOption(in: AVMediaSelectionGroup) -> AVMediaSelectionOption?

Returns a media selection option associated with the receiver in a given group.

Relationships

Inherits From

See Also

Media Selection

Adding Subtitles and Alternative Audio Tracks

Extend your app's appeal to users by adding subtitles and alternative audio tracks in their native language.

class AVMediaSelection

An object that represents a complete rendition of media selection options on an asset.

class AVMediaSelectionGroup

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

class AVMutableMediaSelection

A mutable object that represents a complete rendition of media selection options on an asset.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software