Package com.castlabs.android.player

## Class TrickplayConfiguration

- java.lang.Object
- - com.castlabs.android.player.TrickplayConfiguration

- All Implemented Interfaces:
    `Parcelable`

      public final class TrickplayConfiguration
      extends Object
      implements Parcelable

  Container which groups several Trickplay (speedup) configuration.
  Since:
    4.2.3

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `TrickplayConfiguration.Builder` | `TrickplayConfiguration` Builder.
    `static class` | `TrickplayConfiguration.SpeedupMode` | Speedup mode to use during Trickplay

    - ### Nested classes/interfaces inherited from interface android.os.Parcelable

      `Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Parcelable.Creator<TrickplayConfiguration>` | `CREATOR` |
    `boolean` | `forceUnreferencedTrickPlayTracks` | If enabled, and the content contains a Trickplay (usually I-frame only) tracks, the first one will be selected even no trick play track can be related to the currently selected main video.
    `boolean` | `keepAudioEnabled` | Whether to keep audio renderer enabled during trickplay.
    `boolean` | `keepDashEventCallbackEnabled` | Whether to keep `PlayerConfig.enableDashEventCallback` enabled during trickplay.
    `double` | `maxSeekFps` | Maximum amount of frames per second to show during `seek` mode.
    `int` | `maxTrackBitrate` | Defines the maximum bitrate for Trickplay track selection, if `preferTrickPlayTracks` is set to true.
    `boolean` | `preferTrickPlayTracks` | If enabled, and the content contains a Trickplay (usually I-frame only) track, it will be selected during Trickplay playback.
    `long` | `seekModeFrameRenderedTimeoutMs` | Timeout in milliseconds to force a new seek operation after the `pause` State is received.
    `float` | `speed` | The playback speed.
    `TrickplayConfiguration.SpeedupMode` | `speedupMode` | The `TrickplayConfiguration.SpeedupMode` to use
    `VideoTrackQuality` | `trickplayTrack` | If informed, this will be the track that will be loaded for trickplay playback.

    - ### Fields inherited from interface android.os.Parcelable

      `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TrickplayConfiguration()` |
    `TrickplayConfiguration​(TrickplayConfiguration.SpeedupMode speedupMode, float speed, boolean preferTrickPlayTracks, boolean forceUnreferencedTrickPlayTracks, boolean keepAudioEnabled, boolean keepDashEventCallbackEnabled, int maxTrackBitrate, VideoTrackQuality trickplayTrack, double maxSeekFps, long seekModeFrameRenderedTimeoutMs)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `describeContents()` |
    `boolean` | `equals​(Object obj)` |
    `int` | `hashCode()` |
    `String` | `toString()` |
    `void` | `writeToParcel​(Parcel dest, int flags)` |

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### CREATOR

          public static final Parcelable.Creator<TrickplayConfiguration> CREATOR

    - #### speedupMode

          public final TrickplayConfiguration.SpeedupMode speedupMode

      The `TrickplayConfiguration.SpeedupMode` to use

    - #### speed

          public final float speed

      The playback speed. 1 corresponds to normal playback and negative values to rewind playback.
      See Also:
        `to learn which ranges are accepted in each mode.`

    - #### preferTrickPlayTracks

          public final boolean preferTrickPlayTracks

      If enabled, and the content contains a Trickplay (usually I-frame only) track, it will be selected during Trickplay playback.

    - #### forceUnreferencedTrickPlayTracks

          public final boolean forceUnreferencedTrickPlayTracks

      If enabled, and the content contains a Trickplay (usually I-frame only) tracks, the first one will be selected even no trick play track can be related to the currently selected main video. If disabled and trick tracks are present but can not be referenced to the main video, then no trick track but main video will be selected

    - #### trickplayTrack

          public final VideoTrackQuality trickplayTrack

      If informed, this will be the track that will be loaded for trickplay playback. Takes preference over `maxTrackBitrate`.

    - #### maxTrackBitrate

          public final int maxTrackBitrate

      Defines the maximum bitrate for Trickplay track selection, if `preferTrickPlayTracks` is set to true. `trickplayTrack` will take preference over this setting if it is informed.

      If you want to select the lowest rendition for trickplay playback set this value to 0, or to `Integer.MAX_VALUE` to select the highest one. Setting one of these values will disable any ABR algorithm.

    - #### keepAudioEnabled

          public final boolean keepAudioEnabled

      Whether to keep audio renderer enabled during trickplay.

    - #### keepDashEventCallbackEnabled

          public final boolean keepDashEventCallbackEnabled

      Whether to keep `PlayerConfig.enableDashEventCallback` enabled during trickplay.

    - #### maxSeekFps

          public final double maxSeekFps

      Maximum amount of frames per second to show during `seek` mode. Must be &gt; 0 Indicates the maximum number of Seek operations per second allowed. Only applicable in Seek mode.

    - #### seekModeFrameRenderedTimeoutMs

          public final long seekModeFrameRenderedTimeoutMs

      Timeout in milliseconds to force a new seek operation after the `pause` State is received. Must be &ge; 0 Only applicable in `seek` mode.

  - ### Constructor Detail

    - #### TrickplayConfiguration

          public TrickplayConfiguration()

    - #### TrickplayConfiguration

          public TrickplayConfiguration​(@NonNull
                                        TrickplayConfiguration.SpeedupMode speedupMode,
                                        float speed,
                                        boolean preferTrickPlayTracks,
                                        boolean forceUnreferencedTrickPlayTracks,
                                        boolean keepAudioEnabled,
                                        boolean keepDashEventCallbackEnabled,
                                        int maxTrackBitrate,
                                        @Nullable
                                        VideoTrackQuality trickplayTrack,
                                        double maxSeekFps,
                                        long seekModeFrameRenderedTimeoutMs)

  - ### Method Detail

    - #### describeContents

          public int describeContents()

      Specified by:
        `describeContents` in interface `Parcelable`

    - #### writeToParcel

          public void writeToParcel​(Parcel dest,
                                    int flags)

      Specified by:
        `writeToParcel` in interface `Parcelable`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals​(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`