com.brightcove.ssai.ui

## Class SSAIThumbnailDocument

- java.lang.Object
- - com.brightcove.ssai.ui.SSAIThumbnailDocument

- All Implemented Interfaces:
    ThumbnailDocument

      public final class SSAIThumbnailDocument
      extends java.lang.Object
      implements ThumbnailDocument

  A Wrapping `ThumbnailDocument` used in the SSAI plugin to better handle the relative playhead position from the SeekBar and the absolute position values in an SSAI Video and its preview thumbnails.

- - ### Field Summary

    - ### Fields inherited from interface com.brightcove.player.mediacontroller.ThumbnailDocument

      `EMPTY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SSAIThumbnailDocument(ThumbnailDocument defaultThumbnailDocument, Timeline timeline)` Creates an instance by wrapping an exising `ThumbnailDocument` object, along with a `Timeline` to calculate the absolute playhead position from the relative playhead position.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TimedThumbnail` | `get(long relativePosition)` Gets the `TimedThumbnail` given the Video's playhead position
    `java.util.List<TimedThumbnail>` | `getAll()`

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

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

- - ### Constructor Detail

    - #### SSAIThumbnailDocument

          public SSAIThumbnailDocument(@NonNull
                                       ThumbnailDocument defaultThumbnailDocument,
                                       @NonNull
                                       Timeline timeline)

      Creates an instance by wrapping an exising `ThumbnailDocument` object, along with a `Timeline` to calculate the absolute playhead position from the relative playhead position.
      Parameters:
        `defaultThumbnailDocument` - an existing `ThumbnailDocument` implementation
        `timeline` - the SSAI Video's Timeline

  - ### Method Detail

    - #### get

          @NonNull
          public TimedThumbnail get(long relativePosition)

      Description copied from interface: `ThumbnailDocument`
      Gets the `TimedThumbnail` given the Video's playhead position
      Specified by:
        `get` in interface `ThumbnailDocument`
      Parameters:
        `relativePosition` - the video playhead position
      Returns:
        a valid `TimedThumbnail` or `TimedThumbnail.EMPTY` if not found

    - #### getAll

          @NonNull
          public java.util.List<TimedThumbnail> getAll()

      Specified by:
        `getAll` in interface `ThumbnailDocument`