Package com.castlabs.sdk.thumbs
Class StandaloneThumbnailFactory
java.lang.Object
com.castlabs.sdk.thumbs.StandaloneThumbnailFactory
Factory to provide instances of
StandaloneThumbnailProvider
.-
Method Summary
Modifier and TypeMethodDescriptionstatic StandaloneThumbnailProvider
getProvider
(SideloadedTrack sideloadedTrack) Creates and returns an appropriateStandaloneThumbnailProvider
to fetch thumbnails out of the providedSideloadedTrack
.static StandaloneThumbnailProvider
getProvider
(PlayerConfig config) Creates and returns an appropriateStandaloneThumbnailProvider
to fetch thumbnails out of the providedPlayerConfig
.
-
Method Details
-
getProvider
Creates and returns an appropriateStandaloneThumbnailProvider
to fetch thumbnails out of the providedPlayerConfig
.The following thumbnails are supported:
- Dash embedded. Note that a provider will always be returned in case a Dash stream is passed in the config, even if no thumbnail tracks are present in such stream.
- Sideloaded VTT
- Sideloaded JPG template
- Parameters:
config
- The config to use.- Returns:
- a
StandaloneThumbnailProvider
or null in case no sideloaded thumbnail tracks are present in the config and it's *not* a Dash stream.
-
getProvider
@Nullable public static StandaloneThumbnailProvider getProvider(@NonNull SideloadedTrack sideloadedTrack) Creates and returns an appropriateStandaloneThumbnailProvider
to fetch thumbnails out of the providedSideloadedTrack
.The following thumbnails are supported:
- Parameters:
sideloadedTrack
- The sideloaded track to use.- Returns:
- a
StandaloneThumbnailProvider
or null in case the sideloaded track does not specify a compatible thumbnail track.
-