-
- All Implemented Interfaces:
-
com.brightcove.player.event.Component
@ListensFor(events = {EventType.DID_SET_VIDEO})@Emits(events = {ThumbnailEventType.THUMBNAIL_FORMAT_SELECTED, EventType.SEEK_CONTROLLER_CONFIGURATION}) public final class ThumbnailComponent extends AbstractComponent
Thumbnail Component Plugin.
This plugin facilitates displaying preview thumbnail
The main code to be implemented from this class:
{@code * ThumbnailComponent thumbnailComponent = new ThumbnailComponent(brightcoveVideoView); * thumbnailComponent.setupPreviewThumbnailController(); * ... * }
If you are also using the SSAI plugin, you will need additional setup to account for the gap between the absolute and relative playhead position introduced by the Ad breaks.
{@code * eventEmitter.once(AD_DATA_READY, event -> { * Timeline timeline = event.getProperty(SSAIEvent.VMAP_TIMELINE, Timeline.class); * thumbnailComponent.setThumbnailDocumentCreator( * new SSAIThumbnailDocumentCreatorWrapper(new DefaultThumbnailDocumentCreator(), timeline) * ); * }); * }
-
-
Constructor Summary
Constructors Constructor Description ThumbnailComponent(BaseVideoView baseVideoView)
Creates a new ThumbnailComponent instance with the BaseVideoView
-
Method Summary
Modifier and Type Method Description void
setupPreviewThumbnailController()
Finish setting up the component to support Preview Thumbnail scrubbing. void
setThumbnailFormatSelector(@NonNull() PreviewThumbnailFormatSelector selector)
Sets the PreviewThumbnailFormatSelector, used to select a PreviewThumbnailFormat to create our ThumbnailDocument. PreviewLoader
getPreviewLoader()
Gets the PreviewLoader responsible to download the images and load them into the Thumbnail View. void
setPreviewLoader(@NonNull() PreviewLoader previewLoader)
Sets a PreviewLoader responsible to download the images and load them into the Thumbnail View. void
setThumbnailDocumentCreator(@NonNull() ThumbnailDocumentCreator thumbnailDocumentCreator)
Sets the ThumbnailDocumentCreator for creating the ThumbnailDocument ThumbnailDocumentCreator
getThumbnailDocumentCreator()
Returns the ThumbnailDocumentCreator -
-
Method Detail
-
setupPreviewThumbnailController
void setupPreviewThumbnailController()
Finish setting up the component to support Preview Thumbnail scrubbing.As part of the setup, a new BrightcoveMediaController instance with Preview Thumbnailsupport is created and is automatically added to the Video View.Because this method creates View components, it MUST be called from the UI thread.
-
setThumbnailFormatSelector
void setThumbnailFormatSelector(@NonNull() PreviewThumbnailFormatSelector selector)
Sets the PreviewThumbnailFormatSelector, used to select a PreviewThumbnailFormat to create our ThumbnailDocument.
- Parameters:
selector
- the PreviewThumbnailFormat selector
-
getPreviewLoader
@NonNull() PreviewLoader getPreviewLoader()
Gets the PreviewLoader responsible to download the images and load them into the Thumbnail View.
-
setPreviewLoader
void setPreviewLoader(@NonNull() PreviewLoader previewLoader)
Sets a PreviewLoader responsible to download the images and load them into the Thumbnail View.
- Parameters:
previewLoader
- the preview loader
-
setThumbnailDocumentCreator
void setThumbnailDocumentCreator(@NonNull() ThumbnailDocumentCreator thumbnailDocumentCreator)
Sets the ThumbnailDocumentCreator for creating the ThumbnailDocument
- Parameters:
thumbnailDocumentCreator
- the ThumbnailDocument creator
-
getThumbnailDocumentCreator
@NonNull() ThumbnailDocumentCreator getThumbnailDocumentCreator()
Returns the ThumbnailDocumentCreator
-
-
-
-