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 final class`
  `TrickplayConfiguration.Builder`
  `TrickplayConfiguration` Builder.
  `static enum`
  `TrickplayConfiguration.SpeedupMode`
  Speedup mode to use during Trickplay

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

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

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Parcelable.Creator<TrickplayConfiguration>`
  `CREATOR`
  Creator for Parcelable implementation.
  `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.
  `final boolean`
  `keepAudioEnabled`
  Whether to keep audio renderer enabled during trickplay.
  `final boolean`
  `keepDashEventCallbackEnabled`
  Whether to keep `PlayerConfig.enableDashEventCallback` enabled during trickplay.
  `final double`
  `maxSeekFps`
  Maximum amount of frames per second to show during `seek` mode.
  `final int`
  `maxTrackBitrate`
  Defines the maximum bitrate for Trickplay track selection, if `preferTrickPlayTracks` is set to true.
  `final boolean`
  `preferTrickPlayTracks`
  If enabled, and the content contains a Trickplay (usually I-frame only) track, it will be selected during Trickplay playback.
  `final long`
  `seekModeFrameRenderedTimeoutMs`
  Timeout in milliseconds to force a new seek operation after the `pause` State is received.
  `final float`
  `speed`
  The playback speed.
  `final TrickplayConfiguration.SpeedupMode`
  `speedupMode`
  The `TrickplayConfiguration.SpeedupMode` to use
  `final 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()`
  Default constructor for TrickplayConfiguration.
  `TrickplayConfiguration(TrickplayConfiguration.SpeedupMode speedupMode, float speed, boolean preferTrickPlayTracks, boolean forceUnreferencedTrickPlayTracks, boolean keepAudioEnabled, boolean keepDashEventCallbackEnabled, int maxTrackBitrate, VideoTrackQuality trickplayTrack, double maxSeekFps, long seekModeFrameRenderedTimeoutMs)`
  Constructor for TrickplayConfiguration.

- ## Method Summary

  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 Details

  - ### CREATOR

    public static final Parcelable.Creator<TrickplayConfiguration> CREATOR
    Creator for Parcelable implementation.

  - ### 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.

    Special values:

    - 0 (default): Disables ABR and selects the lowest quality rendition
    - `Integer.MAX_VALUE`: Disables ABR and selects the highest quality rendition

  - ### 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 Details

  - ### TrickplayConfiguration

    public TrickplayConfiguration()
    Default constructor for TrickplayConfiguration. Initializes with default values.

  - ### 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)
    Constructor for TrickplayConfiguration.
    Parameters:
      `speedupMode` - The `TrickplayConfiguration.SpeedupMode` to use.
      `speed` - The playback speed.
      `preferTrickPlayTracks` - Whether to prefer trickplay tracks.
      `forceUnreferencedTrickPlayTracks` - Whether to force unreferenced trickplay tracks.
      `keepAudioEnabled` - Whether to keep audio enabled.
      `keepDashEventCallbackEnabled` - Whether to keep DASH event callback enabled.
      `maxTrackBitrate` - The maximum track bitrate.
      `trickplayTrack` - The trickplay track.
      `maxSeekFps` - The maximum seek FPS.
      `seekModeFrameRenderedTimeoutMs` - The seek mode frame rendered timeout in milliseconds.

- ## Method Details

  - ### 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`