Package 

Class AbstractButtonController

  • 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 AbstractButtonController
    extends AbstractComponent implements ButtonController, RemoteControlKeyState
                        

    Provides a class for customers which consists of basic ButtonController method implementations to simplify adding customized media controls.

    • Constructor Detail

      • AbstractButtonController

        AbstractButtonController(Context context, BaseVideoView videoView, View controlBar, int id, Typeface font)
        Builds a complete controller.
        Parameters:
        context - The given Android application context.
        videoView - The SDK video view used, possibly, to determine managed state asssociated with the button.
        controlBar - The layout widget to which the button will be added.
        id - The Android resource identifier for the button being controlled.
    • Method Detail

      • getProperties

         Map<String, Object> getProperties()

        Implements a default behavior to get the current properties without any additional processing. Subclasses shouldoverride to tailor the properties emitted on a button click.

      • getStateList

         List<ButtonState> getStateList()

        Gets the button state list providing information about the states associated with a button face.

      • getVisibilityState

         int getVisibilityState()

        Gets the maintained visibility state for a button. Defaults to View.VISIBLE but can be overridden based onevents. An example is the caption button.

      • syncStates

         void syncStates()

        Implements to update a state (toggle) button to display the correct glyph andcontent description for the current managed state value.

      • onSkipBackward

         boolean onSkipBackward(KeyEvent event)

        On skip backward key actioned

        Parameters:
        event - the android.view.
      • onSkipForward

         boolean onSkipForward(KeyEvent event)

        On skip forward key actioned

        Parameters:
        event - the android.view.
      • onHome

         boolean onHome(KeyEvent event)

        On home key actioned

        Parameters:
        event - the android.view.
      • onMenu

         boolean onMenu(KeyEvent event)

        On menu key actioned

        Parameters:
        event - the android.view.
      • onBack

         boolean onBack(KeyEvent event)

        On back key actioned

        Parameters:
        event - the android.view.
      • onRewind

         boolean onRewind(KeyEvent event)

        On rewind key actioned

        Parameters:
        event - the android.view.
      • onFastForward

         boolean onFastForward(KeyEvent event)

        On fast forward key actioned

        Parameters:
        event - the android.view.
      • onPlayPause

         boolean onPlayPause(KeyEvent event)

        On play pause key actioned

        Parameters:
        event - the android.view.
      • onPause

         boolean onPause(KeyEvent event)

        On pause key actioned

        Parameters:
        event - the android.view.
      • onPlay

         boolean onPlay(KeyEvent event)

        On play key actioned

        Parameters:
        event - the android.view.
      • onDpadCenter

         boolean onDpadCenter(KeyEvent event)

        On dpad center key actioned

        Parameters:
        event - the android.view.
      • onDpadRight

         boolean onDpadRight(KeyEvent event)

        On dpad right key actioned

        Parameters:
        event - the android.view.
      • onDpadLeft

         boolean onDpadLeft(KeyEvent event)

        On dpad left key actioned

        Parameters:
        event - the android.view.
      • onDpadDown

         boolean onDpadDown(KeyEvent event)

        On dpad down key actioned

        Parameters:
        event - the android.view.
      • onDpadUp

         boolean onDpadUp(KeyEvent event)

        On dpad up key actioned

        Parameters:
        event - the android.view.
      • onAccessibilityStateChanged

         void onAccessibilityStateChanged(boolean enabled)

        Called back on change in the accessibility state.

        Parameters:
        enabled - Whether accessibility is enabled.