Package com.castlabs.sdk.debug

# Class OverlayControllerComponent

java.lang.Object
com.castlabs.sdk.debug.OverlayControllerComponent

All Implemented Interfaces:
  `PlayerControllerPlugin.Component`, `PlayerControllerPlugin.ComponentViewListener`, `PlayerControllerPlugin.VisualComponent`

public final class OverlayControllerComponent extends Object implements PlayerControllerPlugin.VisualComponent
A PlayerControllerPlugin.VisualComponent that displays debug information as an overlay on top of the player.

It shows player state, bandwidth estimation, buffer levels, and ABR quality information. The position of the overlay can be configured with `setDebugOverlayPosition(DebugPlugin.DebugOverlayPosition)` and can be enabled or disabled with `enableDebugOverlay()` and `disableDebugOverlay()`.

In order to interact with the component you need to get an instance of it through `DebugPlugin.getOverlayController(PlayerController)`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OverlayControllerComponent(DebugPlugin.DebugOverlayPosition debugOverlayPosition)`
  Constructor for OverlayControllerComponent.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `disableDebugOverlay()`
  Disables the debug overlay, making it invisible and disconnecting it from the player controller.
  `void`
  `enableDebugOverlay()`
  Enables the debug overlay, making it visible and connecting it to the player controller.
  `Class`
  `id()`
  `void`
  `onComponentViewsChanged(PlayerController playerController)`
  `void`
  `onDestroy(PlayerController playerController)`
  `void`
  `onOpenBundle(PlayerController playerController, Bundle bundle)`
  `void`
  `onOpenState(PlayerController playerController, PlayerConfig playerConfig)`
  `Collection<Pair<Integer,View>>`
  `scanComponentViews(ViewGroup container)`
  `void`
  `setDebugOverlayPosition(DebugPlugin.DebugOverlayPosition debugOverlayPosition)`
  Sets the position of the debug overlay.

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

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

- ## Constructor Details

  - ### OverlayControllerComponent

    public OverlayControllerComponent(@NonNull DebugPlugin.DebugOverlayPosition debugOverlayPosition)
    Constructor for OverlayControllerComponent.
    Parameters:
      `debugOverlayPosition` - The initial position of the debug overlay.

- ## Method Details

  - ### onComponentViewsChanged

    public void onComponentViewsChanged(@NonNull PlayerController playerController)
    Specified by:
      `onComponentViewsChanged` in interface `PlayerControllerPlugin.ComponentViewListener`

  - ### scanComponentViews

    @Nullable public Collection<Pair<Integer,View>> scanComponentViews(@NonNull ViewGroup container)
    Specified by:
      `scanComponentViews` in interface `PlayerControllerPlugin.ComponentViewListener`

  - ### setDebugOverlayPosition

    public void setDebugOverlayPosition(@NonNull DebugPlugin.DebugOverlayPosition debugOverlayPosition)
    Sets the position of the debug overlay.
    Parameters:
      `debugOverlayPosition` - The new position for the debug overlay.

  - ### enableDebugOverlay

    public void enableDebugOverlay()
    Enables the debug overlay, making it visible and connecting it to the player controller.

  - ### disableDebugOverlay

    public void disableDebugOverlay()
    Disables the debug overlay, making it invisible and disconnecting it from the player controller.

  - ### id

    @NonNull public Class id()
    Specified by:
      `id` in interface `PlayerControllerPlugin.Component`

  - ### onDestroy

    public void onDestroy(@NonNull PlayerController playerController)
    Specified by:
      `onDestroy` in interface `PlayerControllerPlugin.Component`

  - ### onOpenBundle

    public void onOpenBundle(@NonNull PlayerController playerController, @NonNull Bundle bundle)
    Specified by:
      `onOpenBundle` in interface `PlayerControllerPlugin.Component`

  - ### onOpenState

    public void onOpenState(@NonNull PlayerController playerController, @NonNull PlayerConfig playerConfig)
    Specified by:
      `onOpenState` in interface `PlayerControllerPlugin.Component`