CachingPlayerItemDelegate
@objc
public protocol CachingPlayerItemDelegate
Convenient delegate methods for CachingPlayerItem
status updates.
-
Called when the media file is fully downloaded.
Declaration
Swift
@objc optional func playerItem(_ playerItem: CachingPlayerItem, didFinishDownloadingFileAt filePath: String)
-
Called every time a new portion of data is received.
Declaration
Swift
@objc optional func playerItem(_ playerItem: CachingPlayerItem, didDownloadBytesSoFar bytesDownloaded: Int, outOf bytesExpected: Int)
-
Called on downloading error.
Declaration
Swift
@objc optional func playerItem(_ playerItem: CachingPlayerItem, downloadingFailedWith error: Error)
-
Called after initial prebuffering is finished, means we are ready to play.
Declaration
Swift
@objc optional func playerItemReadyToPlay(_ playerItem: CachingPlayerItem)
-
Called when the player is unable to play the data/url.
Declaration
Swift
@objc optional func playerItemDidFailToPlay(_ playerItem: CachingPlayerItem, withError error: Error?)
-
Called when the data being downloaded did not arrive in time to continue playback.
Declaration
Swift
@objc optional func playerItemPlaybackStalled(_ playerItem: CachingPlayerItem)