Package com.castlabs.sdk.thumbs
Interface ThumbnailProvider.Callback
-
- Enclosing interface:
- ThumbnailProvider
public static interface ThumbnailProvider.Callback
Because loading Thumbnails is usually an asynchronous process, this callback interface needs to be implemented to receive the results when a thumbnail was requested.Note that implementations of
ThumbnailProvider
must ensure thatonThumbnailLoaded(long, long, Bitmap)
is always called on the main application thread.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onThumbnailLoaded(long requestedPositionUs, long actualPositionUs, Bitmap thumbnail)
Called after a thumbnail load finished.
-
-
-
Method Detail
-
onThumbnailLoaded
void onThumbnailLoaded(long requestedPositionUs, long actualPositionUs, @Nullable Bitmap thumbnail)
Called after a thumbnail load finished. Note that the thumbnail might be null if no data was found for the given position.- Parameters:
requestedPositionUs
- The requested position in micro secondsactualPositionUs
- The actual position of the thumbnail in micro seconds, or -1 if no data was foundthumbnail
- The thumbnail
-
-