Class CaptionsButtonController
- java.lang.Object
-
- com.brightcove.player.event.AbstractComponent
-
- com.brightcove.player.mediacontroller.buttons.AbstractButtonController
-
- com.brightcove.player.mediacontroller.buttons.CaptionsButtonController
-
- All Implemented Interfaces:
AccessibilityListener
,Component
,ButtonController
,RemoteControlKeyState
@ListensFor(events={"activityResumed","captionsDialogOk","captionsDialogSettings","fragmentResumed","enterTvMode","willChangeVideo","adBreakStarted","adBreakCompleted","adProgress"}) public class CaptionsButtonController extends AbstractButtonController
The default Brightcove captions button controller.
-
-
Nested Class Summary
-
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.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
Constructors Constructor Description CaptionsButtonController(android.content.Context context, BaseVideoView videoView, BrightcoveControlBar controlBar, android.graphics.Typeface font, android.os.Bundle bundle)
DefaultMediaController requires a reference to the Context for resource lookups and toggling full-screen mode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getManagedState()
Implements a getter for the managed state.int
getVisibilityState()
Gets the current visibility state.-
Methods inherited from class com.brightcove.player.mediacontroller.buttons.AbstractButtonController
getButton, getEventEmitter, getFont, getId, getProperties, getStateList, onAccessibilityStateChanged, onBack, onDpadCenter, 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
-
Methods inherited from interface com.brightcove.player.mediacontroller.buttons.ButtonController
removeListeners
-
-
-
-
Constructor Detail
-
CaptionsButtonController
public CaptionsButtonController(android.content.Context context, BaseVideoView videoView, BrightcoveControlBar controlBar, android.graphics.Typeface font, android.os.Bundle bundle)
DefaultMediaController requires a reference to the Context for resource lookups and toggling full-screen mode. Also requires a BrightcoveVideoView to determine the play/pause state.- Parameters:
context
- The Android application context.videoView
- The base video view with the captions button.controlBar
- The caption button's parent view.font
- The, possibly null, typeface for the button.bundle
- The, possibly null, state save information generated on an Activity lifecycle or configuration change event.
-
-
Method Detail
-
getManagedState
public int getManagedState()
Implements a getter for the managed state.- See Also:
ButtonController.getManagedState()
-
getVisibilityState
public int getVisibilityState()
Gets the current visibility state. For captions, the button is visible when captions are available. Captions availability is propagated via the SDK event bus.- Specified by:
getVisibilityState
in interfaceButtonController
- Overrides:
getVisibilityState
in classAbstractButtonController
- Returns:
- The expected visibility state, one of View.GONE, View.INVISIBLE or View.VISIBLE.
- See Also:
ButtonController.getVisibilityState()
-
-