public static class MediaControllerConfig.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder()
Instantiates a new MediaControllerConfig.Builder.
|
| Modifier and Type | Method and Description |
|---|---|
MediaControllerConfig |
build()
Builds the MediaControllerConfig.
|
MediaControllerConfig.Builder |
setInitialDuration(int initialDuration)
Sets the initial duration value in milliseconds.
|
MediaControllerConfig.Builder |
setInitialPlayheadPosition(int initialPlayheadPosition)
Sets the initial playhead position value in milliseconds.
|
MediaControllerConfig.Builder |
setLayoutId(int layoutId)
Sets the resource layout id.
|
MediaControllerConfig.Builder |
setMediaControllerKeyDispatcher(MediaControllerKeyDispatcher mediaControllerKeyDispatcher)
Sets the
MediaControllerKeyDispatcher. |
MediaControllerConfig.Builder |
setOnTouchListener(android.view.View.OnTouchListener onTouchListener)
Sets on touch listener.
|
MediaControllerConfig.Builder |
setShowControlsOnCreation(boolean showControlsOnCreation)
Sets whether the Media Controller will be shown when the controller is created.
|
MediaControllerConfig.Builder |
setShowControlsWhenAdIsPlaying(boolean showControlsWhenAdIsPlaying)
Sets whether the Media Controller will be allowed to be shown when an Ad is playing.
|
public MediaControllerConfig.Builder setLayoutId(int layoutId)
The default value is -1, which will be ignored
by the BrightcoveMediaController.
layoutId - the layout idpublic MediaControllerConfig.Builder setOnTouchListener(@Nullable android.view.View.OnTouchListener onTouchListener)
The default value is null, which will be ignored
by the BrightcoveMediaController.
onTouchListener - the on touch listenerpublic MediaControllerConfig.Builder setInitialDuration(int initialDuration)
The duration might later be updated by another component
or an event. For example, by the EventType.PROGRESS
or the EventType.VIDEO_DURATION_CHANGED events.
The default value is -1, which will be ignored
by the BrightcoveMediaController.
initialDuration - the initial duration value in millisecondspublic MediaControllerConfig.Builder setInitialPlayheadPosition(int initialPlayheadPosition)
The playhead position might later be updated by another component
or an event. For example, by the EventType.PROGRESS
or the EventType.VIDEO_DURATION_CHANGED events.
The default value is -1, which will be ignored
by the BrightcoveMediaController.
initialPlayheadPosition - the initial playhead position value in millisecondspublic MediaControllerConfig.Builder setShowControlsOnCreation(boolean showControlsOnCreation)
showControlsOnCreation - true to show the controller when it is created.public MediaControllerConfig.Builder setShowControlsWhenAdIsPlaying(boolean showControlsWhenAdIsPlaying)
showControlsWhenAdIsPlaying - true to show the controller when an Ad is playing.public MediaControllerConfig.Builder setMediaControllerKeyDispatcher(@Nullable MediaControllerKeyDispatcher mediaControllerKeyDispatcher)
MediaControllerKeyDispatcher.
The default value is null.mediaControllerKeyDispatcher - the media controller key dispatcherpublic MediaControllerConfig build()