Package com.castlabs.sdk.thumbs

# Class StandaloneThumbnailFactory

java.lang.Object
com.castlabs.sdk.thumbs.StandaloneThumbnailFactory

public class StandaloneThumbnailFactory extends Object
Factory to provide instances of `StandaloneThumbnailProvider`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static StandaloneThumbnailProvider`
  `getProvider(SideloadedTrack sideloadedTrack)`
  Creates and returns an appropriate `StandaloneThumbnailProvider` to fetch thumbnails out of the provided `SideloadedTrack`.
  `static StandaloneThumbnailProvider`
  `getProvider(PlayerConfig config)`
  Creates and returns an appropriate `StandaloneThumbnailProvider` to fetch thumbnails out of the provided `PlayerConfig`.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getProvider

    @Nullable public static StandaloneThumbnailProvider getProvider(@NonNull PlayerConfig config)
    Creates and returns an appropriate `StandaloneThumbnailProvider` to fetch thumbnails out of the provided `PlayerConfig`.

    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 appropriate `StandaloneThumbnailProvider` to fetch thumbnails out of the provided `SideloadedTrack`.

    The following thumbnails are supported:

    - `VTT`
    - `JPG Template`
    Parameters:
      `sideloadedTrack` - The sideloaded track to use.
    Returns:
      a `StandaloneThumbnailProvider` or null in case the sideloaded track does not specify a compatible thumbnail track.