com.aliyun.thumbnail

## Class ThumbnailHelper

- java.lang.Object
- - com.aliyun.thumbnail.ThumbnailHelper

-     public class ThumbnailHelper
      extends java.lang.Object

  Thumbnail image tool. Follow these steps to use the tool: 1. Create a thumbnail image. 2. Set callbacks: setOnPrepareListener(OnPrepareListener) and setOnThumbnailGetListener(OnThumbnailGetListener). 3. Prepare. 4. After the preparation is complete, call requestBitmapAtPosition(long) to retrieve the thumbnail image. 5. Call ThumbnailHelper.OnThumbnailGetListener to return the thumbnail image retrieval result.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `ThumbnailHelper.OnPrepareListener` Prepare thumbnail image information.
    `static interface` | `ThumbnailHelper.OnThumbnailGetListener` Thumbnail image retrieval callback.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ThumbnailHelper(java.lang.String url)` Create a thumbnail image.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `loadClass()`
    `void` | `prepare()` Prepare thumbnail image data.
    `void` | `requestBitmapAtPosition(long positionMs)` Get the position of the thumbnail image.
    `void` | `setOnPrepareListener(ThumbnailHelper.OnPrepareListener l)` Set a preparation callback.
    `void` | `setOnThumbnailGetListener(ThumbnailHelper.OnThumbnailGetListener l)` Set a thumbnail image retrieval callback.

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

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

- - ### Constructor Detail

    - #### ThumbnailHelper

          public ThumbnailHelper(java.lang.String url)

      Create a thumbnail image.
      Parameters:
        `url` - The URL of the VTT file of the thumbnail image.

  - ### Method Detail

    - #### loadClass

          public static void loadClass()

    - #### setOnPrepareListener

          public void setOnPrepareListener(ThumbnailHelper.OnPrepareListener l)

      Set a preparation callback.
      Parameters:
        `l` - Preparation notification. See ThumbnailHelper.OnPrepareListener.

    - #### setOnThumbnailGetListener

          public void setOnThumbnailGetListener(ThumbnailHelper.OnThumbnailGetListener l)

      Set a thumbnail image retrieval callback.
      Parameters:
        `l` - Thumbnail image retrieval notification.

    - #### prepare

          public void prepare()

      Prepare thumbnail image data.

    - #### requestBitmapAtPosition

          public void requestBitmapAtPosition(long positionMs)

      Get the position of the thumbnail image. Call ThumbnailHelper.OnThumbnailGetListener to return the retrieval result.
      Parameters:
        `positionMs` - The position of the thumbnail image. Unit: milliseconds.