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.ComponentImplementations of this component can be used to gain controlled access to aPlayerController.The component can use the
PlayerControllerto add event listeners and get callbacks during the playback lifecycle.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Classid()Returns the class that is used to identify this component when it is registered with the player controller.voidonDestroy(PlayerController playerController)Called when the controller is destroyed.voidonOpenBundle(PlayerController playerController, Bundle bundle)Called when the player controller is opened with a bundle.voidonOpenState(PlayerController playerController, PlayerConfig playerConfig)Called when the player controller is opened with a config.
-
-
-
Method Detail
-
id
@NonNull Class 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
void onDestroy(@NonNull PlayerController playerController)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
void onOpenBundle(@NonNull PlayerController playerController, @NonNull Bundle bundle)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
void onOpenState(PlayerController playerController, PlayerConfig playerConfig)
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
-
-