AssetThumbnails

public class AssetThumbnails : NSObject

Entry point for the Thumbnail on Seek functionality

  • Default constructor used to build the AssetThumbnail class

    Declaration

    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 are nil, this function performs no operation

    Declaration

    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 after prepared() has been called on ThumbnailsDelegatepassed with prepareThumbnails(), otherwise returns nil. Once called this instance will no longer hold a reference to the thumbnail data, further calls to this function without a call to prepareThumbnails will return nil.

    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