Class PlayButtonController
- java.lang.Object
-
- com.brightcove.player.event.AbstractComponent
-
- com.brightcove.player.mediacontroller.buttons.AbstractButtonController
-
- com.brightcove.player.mediacontroller.buttons.PlayButtonController
-
- All Implemented Interfaces:
AccessibilityListener
,Component
,ButtonController
,RemoteControlKeyState
public class PlayButtonController extends AbstractButtonController
The default Brightcove play button controller. This class is responsible for putting the video into play and pause modes in response to programatic (via SDK events) or user interactions (button clicks).
-
-
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 PlayButtonController(android.content.Context context, BaseVideoView videoView, BrightcoveControlBar controlBar, android.graphics.Typeface font)
Builds a play button controller object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getManagedState()
Implements a getter for the managed video state.java.util.Map<java.lang.String,java.lang.Object>
getProperties()
Implements a getter to obtain properties to emit given the current managed state.boolean
onPlayPause(android.view.KeyEvent event)
On play pause key actioned-
Methods inherited from class com.brightcove.player.mediacontroller.buttons.AbstractButtonController
getButton, getEventEmitter, getFont, getId, getStateList, getVisibilityState, onAccessibilityStateChanged, onBack, onDpadCenter, onDpadDown, onDpadLeft, onDpadRight, onDpadUp, onFastForward, onHome, onMenu, onPause, onPlay, 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
-
PlayButtonController
public PlayButtonController(android.content.Context context, BaseVideoView videoView, BrightcoveControlBar controlBar, android.graphics.Typeface font)
Builds a play button controller object.- Parameters:
context
- The Android application context.videoView
- the SDK video view object.controlBar
- The button widget parent view.font
- The, possibly null, typeface for the button.
-
-
Method Detail
-
getManagedState
public int getManagedState()
Implements a getter for the managed video state.- See Also:
ButtonController.getManagedState()
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Implements a getter to obtain properties to emit given the current managed state. Both play and pause simply pass the playhead position.- Specified by:
getProperties
in interfaceButtonController
- Overrides:
getProperties
in classAbstractButtonController
- See Also:
ButtonController.getProperties()
-
onPlayPause
public boolean onPlayPause(android.view.KeyEvent event)
Description copied from interface:RemoteControlKeyState
On play pause key actioned- Specified by:
onPlayPause
in interfaceRemoteControlKeyState
- Overrides:
onPlayPause
in classAbstractButtonController
- Parameters:
event
- the android.view.KeyEvent- Returns:
- true if the key event was handled, false otherwies.
-
-