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
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.castlabs.sdk.thumbs.ThumbnailProvider
ThumbnailProvider.Callback, ThumbnailProvider.IndexRefreshListener, ThumbnailProvider.RequestQueuePosition, ThumbnailProvider.ThumbnailResult
-
Constructor Summary
ConstructorDescriptionBaseThumbnailProvider
(PlayerController playerController, com.castlabs.sdk.thumbs.ThumbnailLoader.Factory loaderFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addIndexRefreshListener
(ThumbnailProvider.IndexRefreshListener indexRefreshListener) void
destroy()
Free up all the resources, meaning this provider will not be used anymoreGets cue-points list of the thumbnails, or null if not loaded yet.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 anThumbnailProvider.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
Description copied from interface:ThumbnailProvider
- Specified by:
addIndexRefreshListener
in interfaceThumbnailProvider
- Parameters:
indexRefreshListener
- the listener
-
removeIndexRefreshListener
Description copied from interface:ThumbnailProvider
Remove anThumbnailProvider.IndexRefreshListener
- Specified by:
removeIndexRefreshListener
in interfaceThumbnailProvider
- Parameters:
indexRefreshListener
- the listener
-
getCuePointsList
Description copied from interface:ThumbnailProvider
Gets cue-points list of the thumbnails, or null if not loaded yet.- Specified by:
getCuePointsList
in interfaceThumbnailProvider
- Returns:
- The cue-points list
-
getThumbnailPosition
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 interfaceThumbnailProvider
- 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 interfaceThumbnailProvider
-