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)` 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)` | Create a new loader for the given data source

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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 Detail

    - #### DataSourceThumbnailLoader

          public DataSourceThumbnailLoader​(@NonNull
                                           com.google.android.exoplayer2.upstream.DataSource dataSource)

      Create a new loader for the given data source
      Parameters:
        `dataSource` - The data source

  - ### Method Detail

    - #### 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()