com.brightcove.player.mediacontroller

## Class BrightcoveShowHideController

- java.lang.Object
- - com.brightcove.player.event.AbstractComponent
  - - com.brightcove.player.mediacontroller.BrightcoveShowHideController

- All Implemented Interfaces:
    Component, ShowHideController

      @Emits(events={"didShowMediaControls","didHideMediaControls"})
       @ListensFor(events={"showMediaControls","hideMediaControls","enterFullScreen","exitFullScreen","didEnterFullScreen","didExitFullScreen"})
      public class BrightcoveShowHideController
      extends AbstractComponent
      implements ShowHideController

  Abstracts the show/hide operations.

- - ### Field Summary

    - ### Fields inherited from class com.brightcove.player.event.AbstractComponent

      `eventEmitter, listenerTokens`

    - ### Fields inherited from interface com.brightcove.player.mediacontroller.ShowHideController

      `ANIMATION_STYLE_FADE, ANIMATION_STYLE_SLIDE, CONTROLS_HEIGHT, DID_HIDE_MEDIA_CONTROLS, DID_SHOW_MEDIA_CONTROLS, HIDE_MEDIA_CONTROLS, SHOW_HIDE_ANIMATION_STYLE, SHOW_HIDE_RESOURCES, SHOW_HIDE_TIMEOUT, SHOW_MEDIA_CONTROLS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BrightcoveShowHideController(BrightcoveControlBar controlBar, BaseVideoView videoView)` Builds the show/hide controller.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getShowHideTimeout()` Gets the animation timeout.
    `void` | `hide()` Hides the media controls.
    `boolean` | `isHideControllerEnable()` It indicates whether the hide mechanism of the ShowHideController is enable or disable.
    `boolean` | `isShowControllerEnable()` It indicates whether the hide mechanism of the ShowHideController is enable or disable.
    `boolean` | `isShowing()` Determines whether or not the media controls are showing.
    `void` | `setBrightcoveControlBar(BrightcoveControlBar brightcoveControlBar)` Sets the Brightcove control bar.
    `void` | `setHideControllerEnable(boolean hideControllerEnable)` The ShowHideController reacts to several events which causes the Media Controller to hide.
    `void` | `setShowControllerEnable(boolean showControllerEnable)` The ShowHideController reacts to several events which causes the Media Controller to show.
    `void` | `setShowHideAnimationStyle(com.brightcove.player.mediacontroller.BrightcoveMediaController.AnimationStyle value)` Sets the animation style.
    `void` | `setShowHideTimeout(int value)` Sets the animation timeout.
    `void` | `show()` Shows the media controls.

    - ### Methods inherited from class com.brightcove.player.event.AbstractComponent

      `addListener, addOnceListener, getEventEmitter, removeListener, removeListeners`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BrightcoveShowHideController

          public BrightcoveShowHideController(BrightcoveControlBar controlBar,
                                              BaseVideoView videoView)

      Builds the show/hide controller.
      Parameters:
        `controlBar` - The control bar object being shown and hidden.
        `videoView` - The SDK base video view.

  - ### Method Detail

    - #### isShowControllerEnable

          public boolean isShowControllerEnable()

      It indicates whether the hide mechanism of the ShowHideController is enable or disable. It's enabled by default.
      Returns:
        true if enabled.

    - #### isHideControllerEnable

          public boolean isHideControllerEnable()

      It indicates whether the hide mechanism of the ShowHideController is enable or disable. It's enabled by default.
      Returns:
        true if enabled.

    - #### setShowControllerEnable

          public void setShowControllerEnable(boolean showControllerEnable)

      The ShowHideController reacts to several events which causes the Media Controller to show. This methods allows you to enable or disable the hide functionality. It's enabled by default.
      Parameters:
        `showControllerEnable` - true to enable.

    - #### setHideControllerEnable

          public void setHideControllerEnable(boolean hideControllerEnable)

      The ShowHideController reacts to several events which causes the Media Controller to hide. This methods allows you to enable or disable the hide functionality. It's enabled by default.
      Parameters:
        `hideControllerEnable` - true to enable.

    - #### hide

          public void hide()

      Hides the media controls.
      Specified by:
        `hide` in interface `ShowHideController`
      See Also:
        `ShowHideController.hide()`

    - #### isShowing

          public boolean isShowing()

      Determines whether or not the media controls are showing.
      Specified by:
        `isShowing` in interface `ShowHideController`
      Returns:
        `TRUE` iff the media controls are showing, false otherwise.
      See Also:
        `ShowHideController.isShowing()`

    - #### setShowHideAnimationStyle

          public void setShowHideAnimationStyle(com.brightcove.player.mediacontroller.BrightcoveMediaController.AnimationStyle value)

      Sets the animation style.
      Parameters:
        `value` - The new animation style.

    - #### setShowHideTimeout

          public void setShowHideTimeout(int value)

      Sets the animation timeout.
      Parameters:
        `value` - The new animation timeout, in milliseconds.

    - #### getShowHideTimeout

          public int getShowHideTimeout()

      Gets the animation timeout.
      Returns:
        The animation timeout, in milliseconds.

    - #### setBrightcoveControlBar

          public void setBrightcoveControlBar(BrightcoveControlBar brightcoveControlBar)

      Sets the Brightcove control bar.
      Parameters:
        `brightcoveControlBar` - the Brightcove control bar

    - #### show

          public void show()

      Shows the media controls.
      Specified by:
        `show` in interface `ShowHideController`
      See Also:
        `ShowHideController.show()`