-
public class MediaControllerConfig.Builder
The MediaControllerConfig Builder.
-
-
Field Summary
Fields Modifier and Type Field Description private int
layoutId
private View.OnTouchListener
onTouchListener
private int
initialDuration
private int
initialPlayheadPosition
private boolean
showControlsOnCreation
private boolean
showControlsWhenAdIsPlaying
private MediaControllerKeyDispatcher
mediaControllerKeyDispatcher
-
Constructor Summary
Constructors Constructor Description MediaControllerConfig.Builder()
Instantiates a new MediaControllerConfig.Builder.
-
Method Summary
Modifier and Type Method Description MediaControllerConfig.Builder
setLayoutId(int layoutId)
Sets the resource layout id. MediaControllerConfig.Builder
setOnTouchListener(@Nullable() View.OnTouchListener onTouchListener)
Sets on touch listener. MediaControllerConfig.Builder
setInitialDuration(int initialDuration)
Deprecated. MediaControllerConfig.Builder
setInitialPlayheadPosition(int initialPlayheadPosition)
Deprecated. MediaControllerConfig.Builder
setShowControlsOnCreation(boolean showControlsOnCreation)
Sets whether the Media Controller will be shown when the controller is created.The Default value is true. MediaControllerConfig.Builder
setShowControlsWhenAdIsPlaying(boolean showControlsWhenAdIsPlaying)
Sets whether the Media Controller will be allowed to be shown when an Ad is playing.The Default value is false. MediaControllerConfig.Builder
setMediaControllerKeyDispatcher(@Nullable() MediaControllerKeyDispatcher mediaControllerKeyDispatcher)
Sets the MediaControllerKeyDispatcher.The default value is null. MediaControllerConfig
build()
Builds the MediaControllerConfig. -
-
Method Detail
-
setLayoutId
MediaControllerConfig.Builder setLayoutId(int layoutId)
Sets the resource layout id.
The default value is -1, which will be ignoredby the BrightcoveMediaController.
- Parameters:
layoutId
- the layout id
-
setOnTouchListener
MediaControllerConfig.Builder setOnTouchListener(@Nullable() View.OnTouchListener onTouchListener)
Sets on touch listener.
The default value is null, which will be ignoredby the BrightcoveMediaController.
- Parameters:
onTouchListener
- the on touch listener
-
setInitialDuration
@Deprecated() MediaControllerConfig.Builder setInitialDuration(int initialDuration)
Deprecated. Instead use {setInitialDuration}
-
setInitialPlayheadPosition
@Deprecated() MediaControllerConfig.Builder setInitialPlayheadPosition(int initialPlayheadPosition)
Deprecated. Instead use {setInitialPlayheadPosition}
-
setShowControlsOnCreation
MediaControllerConfig.Builder setShowControlsOnCreation(boolean showControlsOnCreation)
Sets whether the Media Controller will be shown when the controller is created.The Default value is true.
- Parameters:
showControlsOnCreation
- true to show the controller when it is created.
-
setShowControlsWhenAdIsPlaying
MediaControllerConfig.Builder setShowControlsWhenAdIsPlaying(boolean showControlsWhenAdIsPlaying)
Sets whether the Media Controller will be allowed to be shown when an Ad is playing.The Default value is false.
- Parameters:
showControlsWhenAdIsPlaying
- true to show the controller when an Ad is playing.
-
setMediaControllerKeyDispatcher
MediaControllerConfig.Builder setMediaControllerKeyDispatcher(@Nullable() MediaControllerKeyDispatcher mediaControllerKeyDispatcher)
Sets the MediaControllerKeyDispatcher.The default value is null.
- Parameters:
mediaControllerKeyDispatcher
- the media controller key dispatcher
-
build
MediaControllerConfig build()
Builds the MediaControllerConfig.
-
-
-
-