Instance Method

mediaSelectionOptions(in:)

Returns an array of locally cached media selection options that are available for offline operations.

Declaration

func mediaSelectionOptions(in mediaSelectionGroup: AVMediaSelectionGroup) -> [AVMediaSelectionOption]

Parameters

mediaSelectionGroup

The owning media selection group.

Return Value

The array of AVMediaSelectionOption objects that have been downloaded for the specified AVMediaSelectionGroup.

Discussion

This method returns the array of media selection options available for offline use. The returned options can be selected during offline playback using the player item’s select(_:in:) method.

See Also

Inspecting the Cached Media

var isPlayableOffline: Bool

Determines if a complete rendition of an asset is available for playing without a network connection.