Class DefaultPreviewLoader
- java.lang.Object
-
- com.brightcove.player.mediacontroller.DefaultPreviewLoader
-
- All Implemented Interfaces:
PreviewLoader
public final class DefaultPreviewLoader extends java.lang.Object implements PreviewLoader
The defaultPreviewLoader
used in the Thumbnail plugin. It usesPicasso
to request and load the images into theThumbnailView
.Use
createDefault(Context)
to create an instance with the default configuration, or useDefaultPreviewLoader.Builder
to configure it differently.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultPreviewLoader.Builder
TheDefaultPreviewLoader
Builder.
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_NUMBER_TO_PREFETCH
Default number of preview thumbnail images to prefetch-
Fields inherited from interface com.brightcove.player.mediacontroller.PreviewLoader
EMPTY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
DEFAULT_NUMBER_TO_PREFETCH
public static final int DEFAULT_NUMBER_TO_PREFETCH
Default number of preview thumbnail images to prefetch- See Also:
- Constant Field Values
-
-
Method Detail
-
createDefault
public static DefaultPreviewLoader createDefault(android.content.Context context)
Creates aDefaultPreviewLoader
instance with the default configuration- Parameters:
context
- the Android context- Returns:
- a
DefaultPreviewLoader
instance
-
setThumbnailDocument
public void setThumbnailDocument(@NonNull ThumbnailDocument thumbnailDocument)
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
-
-