Package com.castlabs.android.player
Interface PlayerControllerPlugin.Component
- All Known Subinterfaces:
IAnalyticsSession
,PlayerControllerPlugin.VisualComponent
- All Known Implementing Classes:
AnalyticsSession
,AnalyticsSessionProxy
,ExoSubtitlesRendererPlugin.ExoSubtitleComponent
,VisualComponentProxy
- Enclosing interface:
PlayerControllerPlugin
public static interface PlayerControllerPlugin.Component
Implementations of this component can be used to gain controlled access to a
PlayerController
.
The component can use the PlayerController
to add
event listeners and get callbacks during the playback lifecycle.
-
Method Summary
Modifier and TypeMethodDescriptionid()
Returns the class that is used to identify this component when it is registered with the player controller.void
onDestroy
(PlayerController playerController) Called when the controller is destroyed.void
onOpenBundle
(PlayerController playerController, Bundle bundle) Called when the player controller is opened with a bundle.void
onOpenState
(PlayerController playerController, PlayerConfig playerConfig) Called when the player controller is opened with a config.
-
Method Details
-
id
Returns the class that is used to identify this component when it is registered with the player controller. This is what you need to pass toPlayerController.getComponent(Class)
to get the registered instance of this component.- Returns:
- The class that identifies this component.
-
onDestroy
Called when the controller is destroyed. Implementation must use this to unregister any listeners that were attached to the controller before.- Parameters:
playerController
- The player controller
-
onOpenBundle
Called when the player controller is opened with a bundle. Implementations can use this to extract or modify bundle data.- Parameters:
playerController
- The player controllerbundle
- The bundle
-
onOpenState
Called when the player controller is opened with a config. Implementations can use this to extract or modify config data.- Parameters:
playerController
- The player controllerplayerConfig
- The playback state
-