Interface ButtonController
- All Superinterfaces:
AccessibilityListener
- All Known Implementing Classes:
AbstractButtonController
,AudioTracksButtonController
,CaptionsButtonController
,CloseButtonController
,FastForwardButtonController
,FullScreenButtonController
,LiveButtonController
,PictureInPictureButtonController
,PlayButtonController
,PlayerOptionsButtonController
,RewindButtonController
,SeekButtonController
,VRButtonController
Defines the interface for managing a media control button which
uses an icon fontset to present the button operation via a glyph
defined by the font. Each button can have one or more states (a
toggle button has two states) where each state is represented by a
different glyph (text) on the button face. Each button state can
be backed (managed) by business logic of some sort.
-
Method Summary
Modifier and TypeMethodDescriptionandroid.widget.Button
Obtains the managed button from the controller.Obtains the event emitter used to set up the controllers SDK event handling.int
getId()
Obtains the Android resource id for the button being controlled.int
Obtains the managed state information.Obtains a set of property values (name/value pairs) to emit as an optional part of handling a button action.Obtain the list of button states for the button being controlled.int
Obtains the visibility state maintained for the button.void
Removes any listeners set up by this button controller.void
Ensures that the controlled button is in sync with the managed state it represents.Methods inherited from interface com.brightcove.player.accessibility.AccessibilityListener
onAccessibilityStateChanged
-
Method Details
-
getManagedState
int getManagedState()Obtains the managed state information. -
getVisibilityState
int getVisibilityState()Obtains the visibility state maintained for the button. This is the state which the button will be assigned on a configuration change or on an Activity restart.- Returns:
- The expected visibility state, one of View.GONE, View.INVISIBLE or View.VISIBLE.
-
getButton
android.widget.Button getButton()Obtains the managed button from the controller.- Returns:
- null if the controller is not managing an Android Button widget, the managed button otherwise.
-
getId
int getId()Obtains the Android resource id for the button being controlled.- Returns:
- -1 if the controller is not managing an valid Android button, the resource id otherwise.
-
getStateList
List<ButtonState> getStateList()Obtain the list of button states for the button being controlled.- Returns:
- a non-null but possibly empty list of button states for the controlled button.
-
getProperties
Obtains a set of property values (name/value pairs) to emit as an optional part of handling a button action. -
getEventEmitter
EventEmitter getEventEmitter()Obtains the event emitter used to set up the controllers SDK event handling.- Returns:
- a non-null SDK event emitter.
-
removeListeners
void removeListeners()Removes any listeners set up by this button controller. -
syncStates
void syncStates()Ensures that the controlled button is in sync with the managed state it represents.
-