Package com.castlabs.android.player
Class IPTVComponent
java.lang.Object
com.castlabs.android.player.IPTVComponent
- All Implemented Interfaces:
PlayerControllerPlugin.Component
IPTV Clear Player component.
To get an instance of this class, use
PlayerController.getComponent(Class).-
Constructor Summary
ConstructorsConstructorDescriptionIPTVComponent(IPTVPlayerPlugin iptvPlayerPluginWeakReference) Creates a new instance ofIPTVComponent. -
Method Summary
Modifier and TypeMethodDescriptionid()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.voidsetEventDispatcher(com.google.android.exoplayer2.analytics.IptvAnalyticsListener.EventDispatcher eventDispatcher) Sets theIptvAnalyticsListenerEvent Dispatcher for the IPTV Plugin.voidsetTransferListener(com.google.android.exoplayer2.upstream.TransferListener transferListener) Sets theTransferListenerfor the IPTV Plugin DataSource.
-
Constructor Details
-
IPTVComponent
Creates a new instance ofIPTVComponent.- Parameters:
iptvPlayerPluginWeakReference- TheIPTVPlayerPlugininstance.
-
-
Method Details
-
setEventDispatcher
public void setEventDispatcher(@Nullable com.google.android.exoplayer2.analytics.IptvAnalyticsListener.EventDispatcher eventDispatcher) Sets theIptvAnalyticsListenerEvent Dispatcher for the IPTV Plugin.- Parameters:
eventDispatcher- TheIptvAnalyticsListener.EventDispatcherto set.
-
setTransferListener
public void setTransferListener(@Nullable com.google.android.exoplayer2.upstream.TransferListener transferListener) Sets theTransferListenerfor the IPTV Plugin DataSource.- Parameters:
transferListener- TheTransferListenerto set.
-
id
Description copied from interface:PlayerControllerPlugin.ComponentReturns 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.- Specified by:
idin interfacePlayerControllerPlugin.Component- Returns:
- The class that identifies this component.
-
onDestroy
Description copied from interface:PlayerControllerPlugin.ComponentCalled when the controller is destroyed. Implementation must use this to unregister any listeners that were attached to the controller before.- Specified by:
onDestroyin interfacePlayerControllerPlugin.Component- Parameters:
playerController- The player controller
-
onOpenBundle
Description copied from interface:PlayerControllerPlugin.ComponentCalled when the player controller is opened with a bundle. Implementations can use this to extract or modify bundle data.- Specified by:
onOpenBundlein interfacePlayerControllerPlugin.Component- Parameters:
playerController- The player controllerbundle- The bundle
-
onOpenState
public void onOpenState(@NonNull PlayerController playerController, @NonNull PlayerConfig playerConfig) Description copied from interface:PlayerControllerPlugin.ComponentCalled when the player controller is opened with a config. Implementations can use this to extract or modify config data.- Specified by:
onOpenStatein interfacePlayerControllerPlugin.Component- Parameters:
playerController- The player controllerplayerConfig- The playback state
-