Package com.castlabs.sdk.thumbs

# Class BaseThumbnailProvider

java.lang.Object
com.castlabs.sdk.thumbs.BaseThumbnailProvider

All Implemented Interfaces:
  `ThumbnailProvider`

Direct Known Subclasses:
  `BifThumbnailProvider`, `JpgThumbnailProvider`, `VttThumbnailProvider`

public abstract class BaseThumbnailProvider extends Object implements ThumbnailProvider

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.castlabs.sdk.thumbs.ThumbnailProvider

  `ThumbnailProvider.Callback, ThumbnailProvider.IndexRefreshListener, ThumbnailProvider.RequestQueuePosition, ThumbnailProvider.ThumbnailResult`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BaseThumbnailProvider(PlayerController playerController, com.castlabs.sdk.thumbs.ThumbnailLoader.Factory loaderFactory)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addIndexRefreshListener(ThumbnailProvider.IndexRefreshListener indexRefreshListener)`
  Add an `ThumbnailProvider.IndexRefreshListener`
  `void`
  `destroy()`
  Free up all the resources, meaning this provider will not be used anymore
  `List<Long>`
  `getCuePointsList()`
  Gets cue-points list of the thumbnails, or null if not loaded yet.
  `Long`
  `getThumbnailPosition(long positionUs, int thumbnailIndex)`
  Gets the actual position of the thumbnail in micro seconds, or null if not loaded yet.
  `void`
  `removeIndexRefreshListener(ThumbnailProvider.IndexRefreshListener indexRefreshListener)`
  Remove an `ThumbnailProvider.IndexRefreshListener`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface com.castlabs.sdk.thumbs.ThumbnailProvider

  `cancelPendingRequests, cancelRequests, getDownloadableResources, getThumbnail, getThumbnail, getThumbnail, getThumbnail, setLoadingStrategy, setRequestQueuePosition`

- ## Constructor Details

  - ### BaseThumbnailProvider

    public BaseThumbnailProvider(@Nullable PlayerController playerController, @NonNull com.castlabs.sdk.thumbs.ThumbnailLoader.Factory loaderFactory)

- ## Method Details

  - ### addIndexRefreshListener

    public void addIndexRefreshListener(ThumbnailProvider.IndexRefreshListener indexRefreshListener)
    Description copied from interface: `ThumbnailProvider`
    Add an `ThumbnailProvider.IndexRefreshListener`
    Specified by:
      `addIndexRefreshListener` in interface `ThumbnailProvider`
    Parameters:
      `indexRefreshListener` - the listener

  - ### removeIndexRefreshListener

    public void removeIndexRefreshListener(ThumbnailProvider.IndexRefreshListener indexRefreshListener)
    Description copied from interface: `ThumbnailProvider`
    Remove an `ThumbnailProvider.IndexRefreshListener`
    Specified by:
      `removeIndexRefreshListener` in interface `ThumbnailProvider`
    Parameters:
      `indexRefreshListener` - the listener

  - ### getCuePointsList

    public List<Long> getCuePointsList()
    Description copied from interface: `ThumbnailProvider`
    Gets cue-points list of the thumbnails, or null if not loaded yet.
    Specified by:
      `getCuePointsList` in interface `ThumbnailProvider`
    Returns:
      The cue-points list

  - ### getThumbnailPosition

    public Long getThumbnailPosition(long positionUs, @ThumbnailIndex int thumbnailIndex)
    Description copied from interface: `ThumbnailProvider`
    Gets the actual position of the thumbnail in micro seconds, or null if not loaded yet.
    Specified by:
      `getThumbnailPosition` in interface `ThumbnailProvider`
    Parameters:
      `positionUs` - The requested position
    Returns:
      The actual position of the thumbnail

  - ### destroy

    @CallSuper public void destroy()
    Description copied from interface: `ThumbnailProvider`
    Free up all the resources, meaning this provider will not be used anymore
    Specified by:
      `destroy` in interface `ThumbnailProvider`