Class RewindButtonController
java.lang.Object
com.brightcove.player.event.AbstractComponent
com.brightcove.player.mediacontroller.buttons.AbstractButtonController
com.brightcove.player.mediacontroller.buttons.SeekButtonController
com.brightcove.player.mediacontroller.buttons.RewindButtonController
- All Implemented Interfaces:
AccessibilityListener
,Component
,ButtonController
,RemoteControlKeyState
The default Brightcove rewind controller.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.brightcove.player.mediacontroller.buttons.SeekButtonController
SeekButtonController.HideSeekControlsHandler, SeekButtonController.OnHoldHandler, SeekButtonController.SeekConfigurationHandler, SeekButtonController.SeekHandler, SeekButtonController.SeekOffsetHandler, SeekButtonController.ShowSeekControlsHandler
Nested classes/interfaces inherited from class com.brightcove.player.mediacontroller.buttons.AbstractButtonController
AbstractButtonController.Visibility
-
Field Summary
Fields inherited from class com.brightcove.player.mediacontroller.buttons.SeekButtonController
DEFAULT_ON_HOLD_START_TIME, DEFAULT_ON_HOLD_UPDATE_FREQUENCY, DEFAULT_SEEK_PERCENTAGE, LIVE_OFFSET, onHoldHandler, onHoldUpdateFrequency, onHoldWaitTime, seekDefault, seekDefaultLong, seekPercentage, seekRelativeEnabled, seekStartPosition, seekStartPositionLong, seekTargetPosition, seekTargetPositionLong
Fields inherited from class com.brightcove.player.mediacontroller.buttons.AbstractButtonController
DEFAULT_AUDIO_TRACKS_BUTTON_ID, DEFAULT_CAPTIONS_BUTTON_ID, DEFAULT_FAST_FORWARD_BUTTON_ID, DEFAULT_FULL_SCREEN_BUTTON_ID, DEFAULT_LIVE_BUTTON_ID, DEFAULT_PLAY_BUTTON_ID, DEFAULT_REWIND_BUTTON_ID, DEFAULT_SEEK_BUTTON_ID, properties, stateList, videoView
Fields inherited from class com.brightcove.player.event.AbstractComponent
eventEmitter, listenerTokens
-
Constructor Summary
ConstructorDescriptionRewindButtonController
(android.content.Context context, BaseVideoView videoView, BrightcoveControlBar controlBar, android.graphics.Typeface font) Builds a button controller to handle the rewind button. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
computeTargetSeekPosition
(int seekStartPosition, int offset) Compute the target seek position based on the seekStartPosition and an offset.protected long
computeTargetSeekPosition
(long seekStartPosition, long offset) Compute the target seek position based on the seekStartPosition and an offset.Gets the EventListener callback to trigger when the DID_SEEK_TO event is received.boolean
onRewind
(android.view.KeyEvent event) On rewind key actionedMethods inherited from class com.brightcove.player.mediacontroller.buttons.SeekButtonController
getManagedState, getOnHoldUpdateFrequency, getOnHoldWaitTime, getProperties, getSeekDefault, getSeekDefaultLong, getSeekPercentage, getVisibilityState, handleSeekEvent, isSeekRelativeEnabled, onDpadCenter, setOnHoldUpdateFrequency, setOnHoldWaitTime, setSeekDefault, setSeekDefault, setSeekPercentage, setSeekRelativeEnabled
Methods inherited from class com.brightcove.player.mediacontroller.buttons.AbstractButtonController
getButton, getEventEmitter, getFont, getId, getStateList, onAccessibilityStateChanged, onBack, onDpadDown, onDpadLeft, onDpadRight, onDpadUp, onFastForward, onHome, onMenu, onPause, onPlay, onPlayPause, onSkipBackward, onSkipForward, setVisibility, syncStates
Methods inherited from class com.brightcove.player.event.AbstractComponent
addListener, addOnceListener, removeListener, removeListeners
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.brightcove.player.mediacontroller.buttons.ButtonController
removeListeners
-
Constructor Details
-
RewindButtonController
public RewindButtonController(android.content.Context context, BaseVideoView videoView, BrightcoveControlBar controlBar, android.graphics.Typeface font) Builds a button controller to handle the rewind button.- Parameters:
context
- The Android application context.videoView
- The SDK video view object parenting the control bar.controlBar
- The button widget parent view.font
- The, possibly null, typeface for the button.
-
-
Method Details
-
computeTargetSeekPosition
protected int computeTargetSeekPosition(int seekStartPosition, int offset) Description copied from class:SeekButtonController
Compute the target seek position based on the seekStartPosition and an offset. The offset can be overridden by calling theSeekButtonController.setSeekDefault(long)
The default offset for a Live video isSeekButtonController.LIVE_OFFSET
- Specified by:
computeTargetSeekPosition
in classSeekButtonController
- Parameters:
seekStartPosition
- the seek start positionoffset
- the amount of time in milliseconds to seek.- Returns:
- the int position in the video to seek to.
- See Also:
-
computeTargetSeekPosition
protected long computeTargetSeekPosition(long seekStartPosition, long offset) Description copied from class:SeekButtonController
Compute the target seek position based on the seekStartPosition and an offset. The offset can be overridden by calling theSeekButtonController.setSeekDefault(long)
The default offset for a Live video isSeekButtonController.LIVE_OFFSET
- Specified by:
computeTargetSeekPosition
in classSeekButtonController
- Parameters:
seekStartPosition
- the seek start positionoffset
- the amount of time in milliseconds to seek.- Returns:
- the int position in the video to seek to.
- See Also:
-
getDidSeekHandler
Description copied from class:SeekButtonController
Gets the EventListener callback to trigger when the DID_SEEK_TO event is received.- Specified by:
getDidSeekHandler
in classSeekButtonController
- Returns:
- EventListener who listens for DID_SEEK_TO
-
onRewind
public boolean onRewind(android.view.KeyEvent event) Description copied from interface:RemoteControlKeyState
On rewind key actioned- Specified by:
onRewind
in interfaceRemoteControlKeyState
- Overrides:
onRewind
in classAbstractButtonController
- Parameters:
event
- the android.view.KeyEvent- Returns:
- true if the key event was handled, false otherwies.
-