Package com.castlabs.sdk.thumbs

# Class DataSourceThumbnailLoader

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

public class DataSourceThumbnailLoader extends Object
Loads thumbnail data using a `DataSource`. You can create instances of this class manually for example by using the `PlayerController.getDataSourceFactory()` to create the `DataSource`.

Note that if you are using `ThumbsPlugin.createProvider(PlayerController, ThumbnailDataTrack, LoadingStrategy, String, ThumbnailLoader.Factory)` there is no need to create an instance of the class manually.

Since:
  4.0.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DataSourceThumbnailLoader(com.google.android.exoplayer2.upstream.DataSource dataSource)`
  Creates a new thumbnail loader that uses the specified data source.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `dispose()`
  `boolean`
  `isStreamingSupported()`
  `byte[]`
  `load(Uri uri)`
  `InputStream`
  `loadStream(Uri uri)`

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

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

- ## Constructor Details

  - ### DataSourceThumbnailLoader

    public DataSourceThumbnailLoader(@NonNull com.google.android.exoplayer2.upstream.DataSource dataSource)
    Creates a new thumbnail loader that uses the specified data source.
    Parameters:
      `dataSource` - The data source to use for loading thumbnail data

- ## Method Details

  - ### isStreamingSupported

    public boolean isStreamingSupported()

  - ### load

    public byte[] load(Uri uri) throws Exception
    Throws:
      `Exception`

  - ### loadStream

    public InputStream loadStream(Uri uri) throws Exception
    Throws:
      `Exception`

  - ### dispose

    public void dispose()