Class DefaultPreviewLoader
java.lang.Object
com.brightcove.player.mediacontroller.DefaultPreviewLoader
- All Implemented Interfaces:
PreviewLoader
The default
PreviewLoader
used in the Thumbnail plugin.
It uses Picasso
to request and load the images into the ThumbnailView
.
Use createDefault(Context)
to create an instance with the default configuration,
or use DefaultPreviewLoader.Builder
to configure it differently.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default number of preview thumbnail images to prefetchFields inherited from interface com.brightcove.player.mediacontroller.PreviewLoader
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultPreviewLoader
createDefault
(android.content.Context context) Creates aDefaultPreviewLoader
instance with the default configurationvoid
loadPreview
(ThumbnailView thumbnailView, long seekBarPosition, long seekBarMax) Given a playhead position, finds aTimedThumbnail
in theThumbnailDocument
set withPreviewLoader.setThumbnailDocument(ThumbnailDocument)
, and loads it into theThumbnailView
.void
setThumbnailDocument
(ThumbnailDocument thumbnailDocument)
-
Field Details
-
DEFAULT_NUMBER_TO_PREFETCH
public static final int DEFAULT_NUMBER_TO_PREFETCHDefault number of preview thumbnail images to prefetch- See Also:
-
-
Method Details
-
createDefault
Creates aDefaultPreviewLoader
instance with the default configuration- Parameters:
context
- the Android context- Returns:
- a
DefaultPreviewLoader
instance
-
setThumbnailDocument
Description copied from interface:PreviewLoader
- Specified by:
setThumbnailDocument
in interfacePreviewLoader
- Parameters:
thumbnailDocument
- the Thumbnail document
-
loadPreview
public void loadPreview(@NonNull ThumbnailView thumbnailView, long seekBarPosition, long seekBarMax) Description copied from interface:PreviewLoader
Given a playhead position, finds aTimedThumbnail
in theThumbnailDocument
set withPreviewLoader.setThumbnailDocument(ThumbnailDocument)
, and loads it into theThumbnailView
.- Specified by:
loadPreview
in interfacePreviewLoader
- Parameters:
thumbnailView
- the view to load the preview thumbnail imageseekBarPosition
- the Video's playhead positionseekBarMax
- the Video's duration
-