PlayButtonController

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).

Author

Paul Michael Reilly --- pmreilly@brightcove.com

Constructors

Link copied to clipboard
constructor(context: Context, videoView: BaseVideoView, controlBar: BrightcoveControlBar, font: Typeface)
Builds a play button controller object.

Properties

Link copied to clipboard
open val button: Button
The button widget.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val font: Typeface
The button font, used for testing.
Link copied to clipboard
val id: Int
The Android resource id.

Functions

Link copied to clipboard
open fun addListener(eventType: String, listener: EventListener)
Convenience method to add an EventListener for the given type using the EventEmitter.on() method.
Link copied to clipboard
open fun addOnceListener(eventType: String, listener: EventListener)
Convenience method to add an EventListener for the given type using the EventEmitter.once() method.
Link copied to clipboard
Implements a getter for the SDK event emitter.
Link copied to clipboard
open fun getManagedState(): Int
Implements a getter for the managed video state.
Link copied to clipboard
open fun getProperties(): Map<String, Any>
Implements a getter to obtain properties to emit given the current managed state.
Link copied to clipboard
Gets the button state list providing information about the states associated with a button face.
Link copied to clipboard
Gets the maintained visibility state for a button.
Link copied to clipboard
Called back on change in the accessibility state.
Link copied to clipboard
open fun onBack(event: KeyEvent): Boolean
On back key actioned
Link copied to clipboard
open fun onDpadCenter(event: KeyEvent): Boolean
On dpad center key actioned
Link copied to clipboard
open fun onDpadDown(event: KeyEvent): Boolean
On dpad down key actioned
Link copied to clipboard
open fun onDpadLeft(event: KeyEvent): Boolean
On dpad left key actioned
Link copied to clipboard
open fun onDpadRight(event: KeyEvent): Boolean
On dpad right key actioned
Link copied to clipboard
open fun onDpadUp(event: KeyEvent): Boolean
On dpad up key actioned
Link copied to clipboard
open fun onFastForward(event: KeyEvent): Boolean
On fast forward key actioned
Link copied to clipboard
open fun onHome(event: KeyEvent): Boolean
On home key actioned
Link copied to clipboard
open fun onMenu(event: KeyEvent): Boolean
On menu key actioned
Link copied to clipboard
open fun onPause(event: KeyEvent): Boolean
On pause key actioned
Link copied to clipboard
open fun onPlay(event: KeyEvent): Boolean
On play key actioned
Link copied to clipboard
open fun onPlayPause(event: KeyEvent): Boolean
On play pause key actioned
Link copied to clipboard
open fun onRewind(event: KeyEvent): Boolean
On rewind key actioned
Link copied to clipboard
open fun onSkipBackward(event: KeyEvent): Boolean
On skip backward key actioned
Link copied to clipboard
open fun onSkipForward(event: KeyEvent): Boolean
On skip forward key actioned
Link copied to clipboard
open fun removeListener(eventType: String)
Removes the specified listener from the EventEmitter.
Link copied to clipboard
open fun removeListeners()
Removes all set listeners from the EventEmitter.
Link copied to clipboard
open fun setVisibility(visibility: Int)
Sets the button visibility.
Link copied to clipboard
open fun syncStates()
Implements to update a state (toggle) button to display the correct glyph and content description for the current managed state value.