Instance Property

isPlayableOffline

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

Declaration

var isPlayableOffline: Bool { get }

Discussion

You should query this property before presenting or attempting to play an offline asset to determine if it’s available for use. A return value of true indicates a complete rendition of this asset is available for offline playback.

A return value of true does not indicate that all of an asset’s associated media selection options are available for offline playback. You should call mediaSelectionOptions(in:) to determine which media selection options are available for offline use.

See Also

Inspecting the Cached Media

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

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