public class BrightcoveMediaController extends AbstractComponent implements ShowHideController
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTROL_BAR_CREATED
The event type emitted by the Brightcove media controller that provides for customization.
|
static int |
DEFAULT_TIMEOUT
The default show/hide timeout value, in milliseconds.
|
static java.lang.String |
DURATION
The event payload key for the duration time text value.
|
boolean |
isTvMode
boolean set on the constructor to check if we are on TV mode
|
static java.lang.String |
MARKER_LIST
The event property key specifying the playhead positions at which markers should be placed.
|
static java.lang.String |
PROGRESS
The event payload key for the current time text value.
|
static java.lang.String |
SEEK_BAR_MAX
The event property key for saving and restoring the seek bar max value.
|
static java.lang.String |
SEEK_BAR_PROGRESS
The event property key for saving and restoring the seek bar progress value.
|
static java.lang.String |
SET_MARKERS
Standard event type for supplying markers to the seek bar.
|
eventEmitter, listenerTokens
ANIMATION_STYLE_FADE, ANIMATION_STYLE_SLIDE, CONTROLS_HEIGHT, DID_HIDE_MEDIA_CONTROLS, DID_SHOW_MEDIA_CONTROLS, HIDE_MEDIA_CONTROLS, SHOW_HIDE_ANIMATION_STYLE, SHOW_HIDE_RESOURCES, SHOW_HIDE_TIMEOUT, SHOW_MEDIA_CONTROLS
Constructor and Description |
---|
BrightcoveMediaController(BaseVideoView videoView)
Builds a default media controller for a given video view.
|
BrightcoveMediaController(BaseVideoView videoView,
int layout)
Builds a media controller for a given video view and layout.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkTvMode(android.content.Context context)
Checks whether the current mode type is Configuration.UI_MODE_TYPE_TELEVISION or not.
|
boolean |
dispatchKeyEvent(android.view.KeyEvent event)
Dispatch the key event.
|
BrightcoveControlBar |
getBrightcoveControlBar()
Obtains the current control bar.
|
BrightcoveSeekBar |
getBrightcoveSeekBar()
Obtains the current seek bar.
|
BrightcoveMediaControlRegistry |
getMediaControlRegistry()
Obtains the button controller registry.
|
void |
hide()
Hides the media controls.
|
protected void |
init(BaseVideoView videoView,
int layout)
Initialize the BrightcoveMediaController instance.
|
boolean |
isDragging()
Obtains the dragging state.
|
boolean |
isDVRControllerEnabled()
Checks if the DVR controller is enabled.
|
boolean |
isShowing()
Determines whether or not the media controls are showing.
|
void |
setCuePointMarkersEnabled(boolean state)
Set the enable/disable state that allows (enabled) or prevents (disabled) ad markers being set automatically
whenever a cue point has been set.
|
void |
setDVRControllerEnabled(boolean enable)
Enables or disables the DVR controller.
|
void |
setShowHideAnimationStyle(com.brightcove.player.mediacontroller.BrightcoveMediaController.AnimationStyle value)
Sets the animation style.
|
void |
setShowHideTimeout(int value)
Sets the animation timeout.
|
void |
show()
Shows the media controls.
|
protected void |
updateKeyStates(android.view.KeyEvent event)
Update current RemoteControlKeyState, which is the media player button with the focus.
|
addListener, addOnceListener, getEventEmitter, removeListener, removeListeners
public static final int DEFAULT_TIMEOUT
public static final java.lang.String CONTROL_BAR_CREATED
public static final java.lang.String DURATION
public static final java.lang.String MARKER_LIST
public static final java.lang.String PROGRESS
public static final java.lang.String SEEK_BAR_PROGRESS
public static final java.lang.String SEEK_BAR_MAX
public static final java.lang.String SET_MARKERS
public final boolean isTvMode
public BrightcoveMediaController(BaseVideoView videoView)
videoView
- The Brightcove video view object which will be
attached to this media controller.public BrightcoveMediaController(BaseVideoView videoView, int layout)
videoView
- The given Brightcove video view object.layout
- The given layout resource identifier.protected void init(BaseVideoView videoView, int layout)
videoView
- The given Brightcove video view object.layout
- The given layout resource identifier.public BrightcoveControlBar getBrightcoveControlBar()
public BrightcoveSeekBar getBrightcoveSeekBar()
public BrightcoveMediaControlRegistry getMediaControlRegistry()
public boolean isDVRControllerEnabled()
public void setDVRControllerEnabled(boolean enable)
enable
- true to enablepublic boolean isDragging()
TRUE
iff the User is currently moving the scrubber along the seek bar.public void setCuePointMarkersEnabled(boolean state)
state
- The enable (true) or disable (false) state value. True iff mid-roll ad markers should be placed on
the seek bar whenever a cue point is set.public void hide()
hide
in interface ShowHideController
ShowHideController.hide()
public boolean isShowing()
isShowing
in interface ShowHideController
TRUE
iff the media controls are showing, false otherwise.ShowHideController.isShowing()
public void setShowHideAnimationStyle(com.brightcove.player.mediacontroller.BrightcoveMediaController.AnimationStyle value)
value
- The new animation style.public void setShowHideTimeout(int value)
value
- The new animation timeout, in milliseconds.public void show()
show
in interface ShowHideController
ShowHideController.show()
public static boolean checkTvMode(android.content.Context context)
context
- Android context used to get the UiModeManagerpublic boolean dispatchKeyEvent(android.view.KeyEvent event)
event
- the android.View.KeyEventprotected void updateKeyStates(android.view.KeyEvent event)
event
- the android.View.KeyEvent