-
public class BrightcovePictureInPictureParams.Builder
Builder class for BrightcovePictureInPictureParams objects.
-
-
Method Summary
Modifier and Type Method Description BrightcovePictureInPictureParams.Builder
setAspectRatio(Rational aspectRatio)
Sets the aspect ratio. BrightcovePictureInPictureParams.Builder
setActions(List<RemoteAction> actions)
Sets the user actions. BrightcovePictureInPictureParams.Builder
setSourceRectHint(Rect launchBounds)
Sets the source bounds hint. BrightcovePictureInPictureParams.Builder
setClosedCaptionsEnabled(boolean closedCaptionsEnabled)
Enables or disables closed captions for Picture in Picture mode. BrightcovePictureInPictureParams.Builder
setOnUserLeaveEnabled(boolean onUserLeaveEnabled)
Enables or disables entering into Picture in Picture mode when the user has put the activity inthe background, for example, when of pressing the Home key. BrightcovePictureInPictureParams.Builder
setClosedCaptionsReductionScaleFactor(float scaleFactor)
Sets reduction the scale factor for closed captions when enteringPicture in Picture mode.The values accepted must be between 0 and 1. BrightcovePictureInPictureParams
build()
-
-
Method Detail
-
setAspectRatio
BrightcovePictureInPictureParams.Builder setAspectRatio(Rational aspectRatio)
Sets the aspect ratio. This aspect ratio is defined as the desired width / height, anddoes not change upon device rotation.
- Parameters:
aspectRatio
- the new aspect ratio for the activity in picture-in-picture, must bebetween 2.39:1 and 1:2.39 (inclusive).
-
setActions
BrightcovePictureInPictureParams.Builder setActions(List<RemoteAction> actions)
Sets the user actions. If there are more than getMaxNumPictureInPictureActions actions, then the input listwill be truncated to that number.
- Parameters:
actions
- the new actions to show in the picture-in-picture menu.
-
setSourceRectHint
BrightcovePictureInPictureParams.Builder setSourceRectHint(Rect launchBounds)
Sets the source bounds hint. These bounds are only used when an activity first enterspicture-in-picture, and describe the bounds in window coordinates of activity enteringpicture-in-picture that will be visible following the transition. For the best effect,these bounds should also match the aspect ratio in the arguments.
- Parameters:
launchBounds
- window-coordinate bounds indicating the area of the activity thatwill still be visible following the transition into picture-in-picture (eg.
-
setClosedCaptionsEnabled
BrightcovePictureInPictureParams.Builder setClosedCaptionsEnabled(boolean closedCaptionsEnabled)
Enables or disables closed captions for Picture in Picture mode.
- Parameters:
closedCaptionsEnabled
- true to enable closed captions.
-
setOnUserLeaveEnabled
BrightcovePictureInPictureParams.Builder setOnUserLeaveEnabled(boolean onUserLeaveEnabled)
Enables or disables entering into Picture in Picture mode when the user has put the activity inthe background, for example, when of pressing the Home key.
- Parameters:
onUserLeaveEnabled
- true to enable.
-
setClosedCaptionsReductionScaleFactor
BrightcovePictureInPictureParams.Builder setClosedCaptionsReductionScaleFactor(float scaleFactor)
Sets reduction the scale factor for closed captions when enteringPicture in Picture mode.The values accepted must be between 0 and 1.
- Parameters:
scaleFactor
- the scale factor
-
-
-
-