-
- All Implemented Interfaces:
-
com.brightcove.player.accessibility.AccessibilityListener
,com.brightcove.player.event.Component
,com.brightcove.player.mediacontroller.buttons.ButtonController
,com.brightcove.player.mediacontroller.buttons.RemoteControlKeyState
public abstract class SeekButtonController extends AbstractButtonController
Provides an abstract class that allows a subclass to either seek back or seek forward. You are required to implemented both, the computeTargetSeekPosition and the getDidSeekHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected int
seekDefault
protected long
seekDefaultLong
protected boolean
seekRelativeEnabled
protected int
seekPercentage
protected int
onHoldWaitTime
protected int
onHoldUpdateFrequency
-
Constructor Summary
Constructors Constructor Description SeekButtonController(Context context, BaseVideoView videoView, View controlBar, int id, Typeface font, String eventType)
Builds a button controller to handle the rewind button.
-
Method Summary
Modifier and Type Method Description int
getSeekDefault()
Deprecated. void
setSeekDefault(int value)
Deprecated. long
getSeekDefaultLong()
Gets default seek time. void
setSeekRelativeEnabled(boolean seekRelativeEnabled)
Enable or disable relative seeking. int
getSeekPercentage()
Gets the seek percentage relative to video duration, used to set the seekDefaultLong The values are greater than 0 and lower than 100 void
setSeekPercentage(int seekPercentage)
Sets the seek percentage relative to video duration, used to set the seekDefaultLong The values are greater than 0 and lower than 100 int
getOnHoldWaitTime()
Gets the on hold button wait time, which is the time in milliseconds to be waited, so thatthe key event is considered a long press instead of a regular press. void
setOnHoldWaitTime(int onHoldWaitTime)
Sets the on hold button wait time, which is the time in milliseconds to be waited, so thatthe key event is considered a long press instead of a regular press. int
getOnHoldUpdateFrequency()
Gets the on hold update frequency time in milliseconds, used to send the SEEKBAR_DRAGGING_PROGRESS eventto update the Media Controller seek bar. void
setOnHoldUpdateFrequency(int onHoldUpdateFrequency)
Sets the on hold update frequency time in milliseconds, used to send the SEEKBAR_DRAGGING_PROGRESS eventto update the Media Controller seek bar. int
getManagedState()
Implements a getter for the managed state. Map<String, Object>
getProperties()
Implements a getter to add the current playhead position to the payload when emitting a rewind event. int
getVisibilityState()
Gets the current visibility state. boolean
isSeekRelativeEnabled()
If enabled, the seekDefaultLong will be set relative to the video durationand the seekPercentage. boolean
onDpadCenter(KeyEvent event)
On dpad center key actioned -
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, onRewind, 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
-
-
Constructor Detail
-
SeekButtonController
SeekButtonController(Context context, BaseVideoView videoView, View controlBar, int id, Typeface font, String eventType)
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 Detail
-
getSeekDefault
@Deprecated() int getSeekDefault()
Deprecated. Instead use {getSeekDefaultLong}
-
setSeekDefault
@Deprecated() void setSeekDefault(int value)
Deprecated. Instead use {setSeekDefault}
-
getSeekDefaultLong
long getSeekDefaultLong()
Gets default seek time.
-
setSeekRelativeEnabled
void setSeekRelativeEnabled(boolean seekRelativeEnabled)
Enable or disable relative seeking.If enabled, the seekDefaultLong will be set relative to the video durationand the seekPercentage. seekDefaultLong is calculated on VIDEO_DURATION_CHANGED event.
-
getSeekPercentage
int getSeekPercentage()
Gets the seek percentage relative to video duration, used to set the seekDefaultLong The values are greater than 0 and lower than 100
-
setSeekPercentage
void setSeekPercentage(int seekPercentage)
Sets the seek percentage relative to video duration, used to set the seekDefaultLong The values are greater than 0 and lower than 100
- Parameters:
seekPercentage
- the seek percentage
-
getOnHoldWaitTime
int getOnHoldWaitTime()
Gets the on hold button wait time, which is the time in milliseconds to be waited, so thatthe key event is considered a long press instead of a regular press.
-
setOnHoldWaitTime
void setOnHoldWaitTime(int onHoldWaitTime)
Sets the on hold button wait time, which is the time in milliseconds to be waited, so thatthe key event is considered a long press instead of a regular press.
- Parameters:
onHoldWaitTime
- the on hold start time
-
getOnHoldUpdateFrequency
int getOnHoldUpdateFrequency()
Gets the on hold update frequency time in milliseconds, used to send the SEEKBAR_DRAGGING_PROGRESS eventto update the Media Controller seek bar.
-
setOnHoldUpdateFrequency
void setOnHoldUpdateFrequency(int onHoldUpdateFrequency)
Sets the on hold update frequency time in milliseconds, used to send the SEEKBAR_DRAGGING_PROGRESS eventto update the Media Controller seek bar.
- Parameters:
onHoldUpdateFrequency
- the time in milliseconds
-
getManagedState
int getManagedState()
Implements a getter for the managed state.
-
getProperties
Map<String, Object> getProperties()
Implements a getter to add the current playhead position to the payload when emitting a rewind event.
-
getVisibilityState
int getVisibilityState()
Gets the current visibility state. For the Rewind button, it is visible in non-live videos and when a DVRcapability is detected with live videos.
-
isSeekRelativeEnabled
boolean isSeekRelativeEnabled()
If enabled, the seekDefaultLong will be set relative to the video durationand the seekPercentage. seekDefaultLong is calculated on VIDEO_DURATION_CHANGED event.
-
onDpadCenter
boolean onDpadCenter(KeyEvent event)
On dpad center key actioned
- Parameters:
event
- the android.view.
-
-
-
-