AssetThumbnails
public class AssetThumbnails : NSObject
Entry point for the Thumbnail on Seek functionality
-
Default constructor used to build the
AssetThumbnail
classDeclaration
Swift
public override init()
-
Fetches the thumbnails from the given URI and notifies the state when prepared/failed back through the passed listener
Note
if either of the passed parameters arenil
, this function performs no operationDeclaration
Swift
public func prepareThumbnails(delegate: ThumbnailsDelegate, url: URL)
Parameters
url
URL object to fetch the thumbnails playlist
delegate
the
ThumbnailsDelegate
interfacing object to be notified of success/errors -
Reset the object to it’s initial state, cancelling any ongoing operations and clearing any fetched data and the listener pointer. To be called if the thumbnail fetch operation is no longer required before the passed
ThumbnailsDelegate
object is notified of completion (in error or success)Declaration
Swift
public func reset()
-
Return the ordered start times (in milliseconds) and prepared Dictionary of start time (in milliseconds) to thumbnails to the caller.
Note
will only return data afterprepared()
has been called onThumbnailsDelegate
passed withprepareThumbnails()
, otherwise returnsnil
. Once called this instance will no longer hold a reference to the thumbnail data, further calls to this function without a call toprepareThumbnails
will returnnil
.Declaration
Swift
public func thumbnails() -> ThumbnailPair?
Return Value
the available thumbnail data, or
nil
if prepared has not been called on the delegate or the data has already been returned