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
ConstructorsConstructorDescriptionOverlayControllerComponent
(DebugPlugin.DebugOverlayPosition debugOverlayPosition) Constructor for OverlayControllerComponent. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Disables the debug overlay, making it invisible and disconnecting it from the player controller.void
Enables the debug overlay, making it visible and connecting it to the player controller.id()
void
onComponentViewsChanged
(PlayerController playerController) void
onDestroy
(PlayerController playerController) void
onOpenBundle
(PlayerController playerController, Bundle bundle) void
onOpenState
(PlayerController playerController, PlayerConfig playerConfig) scanComponentViews
(ViewGroup container) void
setDebugOverlayPosition
(DebugPlugin.DebugOverlayPosition debugOverlayPosition) Sets the position of the debug overlay.
-
Constructor Details
-
OverlayControllerComponent
Constructor for OverlayControllerComponent.- Parameters:
debugOverlayPosition
- The initial position of the debug overlay.
-
-
Method Details
-
onComponentViewsChanged
- Specified by:
onComponentViewsChanged
in interfacePlayerControllerPlugin.ComponentViewListener
-
scanComponentViews
- Specified by:
scanComponentViews
in interfacePlayerControllerPlugin.ComponentViewListener
-
setDebugOverlayPosition
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
- Specified by:
id
in interfacePlayerControllerPlugin.Component
-
onDestroy
- Specified by:
onDestroy
in interfacePlayerControllerPlugin.Component
-
onOpenBundle
- Specified by:
onOpenBundle
in interfacePlayerControllerPlugin.Component
-
onOpenState
public void onOpenState(@NonNull PlayerController playerController, @NonNull PlayerConfig playerConfig) - Specified by:
onOpenState
in interfacePlayerControllerPlugin.Component
-