com.brightcove.player.pictureinpicture

## Class BrightcovePictureInPictureParams

- java.lang.Object
- - com.brightcove.player.pictureinpicture.BrightcovePictureInPictureParams

- All Implemented Interfaces:
    android.os.Parcelable

      public final class BrightcovePictureInPictureParams
      extends java.lang.Object
      implements android.os.Parcelable

  Represents a set of parameters used to initialize and update an Activity in picture-in-picture mode. This class is a derivative of android.app.PictureInPictureParams

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BrightcovePictureInPictureParams.Builder` Builder class for `BrightcovePictureInPictureParams` objects.

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

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

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static android.os.Parcelable.Creator<BrightcovePictureInPictureParams>` | `CREATOR`

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

      `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `copyOnlySet(BrightcovePictureInPictureParams otherArgs)` Copies the set parameters from the other picture-in-picture args.
    `int` | `describeContents()`
    `java.util.List<android.app.RemoteAction>` | `getActions()`
    `android.app.PictureInPictureParams` | `getAndroidPictureInPictureParams()` Gets the Android `PictureInPictureParams`.
    `float` | `getAspectRatio()`
    `android.util.Rational` | `getAspectRatioRational()` Gets aspect ratio rational.
    `float` | `getClosedCaptionsReductionScaleFactor()`
    `android.graphics.Rect` | `getSourceRectHint()`
    `boolean` | `hasSetActions()`
    `boolean` | `hasSetAspectRatio()`
    `boolean` | `hasSourceBoundsHint()`
    `boolean` | `isClosedCaptionsEnabled()`
    `boolean` | `isOnUserLeaveEnabled()` Returns true if the Activity will enter into Picture in Picture mode when the user puts the activity in the background, for example, when of pressing the Home key.
    `void` | `truncateActions(int size)` Truncates the set of actions to the given .
    `void` | `writeToParcel(android.os.Parcel out, int flags)`

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

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

- - ### Field Detail

    - #### CREATOR

          public static final android.os.Parcelable.Creator<BrightcovePictureInPictureParams> CREATOR

  - ### Method Detail

    - #### copyOnlySet

          public void copyOnlySet(BrightcovePictureInPictureParams otherArgs)

      Copies the set parameters from the other picture-in-picture args.

    - #### getAspectRatio

          public float getAspectRatio()

      Returns:
        the aspect ratio. If none is set, return 0.

    - #### getAspectRatioRational

          public android.util.Rational getAspectRatioRational()

      Gets aspect ratio rational.
      Returns:
        the aspect ratio rational

    - #### hasSetAspectRatio

          public boolean hasSetAspectRatio()

      Returns:
        whether the aspect ratio is set.

    - #### getActions

          public java.util.List<android.app.RemoteAction> getActions()

      Returns:
        the set of user actions.

    - #### hasSetActions

          public boolean hasSetActions()

      Returns:
        whether the user actions are set.

    - #### truncateActions

          public void truncateActions(int size)

      Truncates the set of actions to the given .

    - #### getSourceRectHint

          public android.graphics.Rect getSourceRectHint()

      Returns:
        the source rect hint

    - #### hasSourceBoundsHint

          public boolean hasSourceBoundsHint()

      Returns:
        whether there are launch bounds set

    - #### isClosedCaptionsEnabled

          public boolean isClosedCaptionsEnabled()

      Returns:
        true if Closed captions are enabled.

    - #### isOnUserLeaveEnabled

          public boolean isOnUserLeaveEnabled()

      Returns true if the Activity will enter into Picture in Picture mode when the user puts the activity in the background, for example, when of pressing the Home key.
      Returns:
        true if enabled.

    - #### getClosedCaptionsReductionScaleFactor

          public float getClosedCaptionsReductionScaleFactor()

      Returns:
        the reduction scale factor for closed captions when entering Picture in Picture mode.

    - #### getAndroidPictureInPictureParams

          public android.app.PictureInPictureParams getAndroidPictureInPictureParams()

      Gets the Android `PictureInPictureParams`. Available only for Android 8+
      Returns:
        the android picture in picture params

    - #### describeContents

          public int describeContents()

      Specified by:
        `describeContents` in interface `android.os.Parcelable`

    - #### writeToParcel

          public void writeToParcel(android.os.Parcel out,
                                    int flags)

      Specified by:
        `writeToParcel` in interface `android.os.Parcelable`