Package com.castlabs.android.player

# Class IPTVComponent

java.lang.Object
com.castlabs.android.player.IPTVComponent

All Implemented Interfaces:
  `PlayerControllerPlugin.Component`

public class IPTVComponent extends Object implements PlayerControllerPlugin.Component
IPTV Clear Player component. To get an instance of this class, use `PlayerController.getComponent(Class)`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IPTVComponent(IPTVPlayerPlugin iptvPlayerPluginWeakReference)`
  Creates a new instance of `IPTVComponent`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Class`
  `id()`
  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.
  `void`
  `setEventDispatcher(com.google.android.exoplayer2.analytics.IptvAnalyticsListener.EventDispatcher eventDispatcher)`
  Sets the `IptvAnalyticsListener` Event Dispatcher for the IPTV Plugin.
  `void`
  `setTransferListener(com.google.android.exoplayer2.upstream.TransferListener transferListener)`
  Sets the `TransferListener` for the IPTV Plugin DataSource.

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

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

- ## Constructor Details

  - ### IPTVComponent

    public IPTVComponent(@NonNull IPTVPlayerPlugin iptvPlayerPluginWeakReference)
    Creates a new instance of `IPTVComponent`.
    Parameters:
      `iptvPlayerPluginWeakReference` - The `IPTVPlayerPlugin` instance.

- ## Method Details

  - ### setEventDispatcher

    public void setEventDispatcher(@Nullable com.google.android.exoplayer2.analytics.IptvAnalyticsListener.EventDispatcher eventDispatcher)
    Sets the `IptvAnalyticsListener` Event Dispatcher for the IPTV Plugin.
    Parameters:
      `eventDispatcher` - The `IptvAnalyticsListener.EventDispatcher` to set.

  - ### setTransferListener

    public void setTransferListener(@Nullable com.google.android.exoplayer2.upstream.TransferListener transferListener)
    Sets the `TransferListener` for the IPTV Plugin DataSource.
    Parameters:
      `transferListener` - The `TransferListener` to set.

  - ### id

    @NonNull public Class id()
    Description copied from interface: `PlayerControllerPlugin.Component`
    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 to `PlayerController.getComponent(Class)` to get the registered instance of this component.
    Specified by:
      `id` in interface `PlayerControllerPlugin.Component`
    Returns:
      The class that identifies this component.

  - ### onDestroy

    public void onDestroy(@NonNull PlayerController playerController)
    Description copied from interface: `PlayerControllerPlugin.Component`
    Called when the controller is destroyed. Implementation must use this to unregister any listeners that were attached to the controller before.
    Specified by:
      `onDestroy` in interface `PlayerControllerPlugin.Component`
    Parameters:
      `playerController` - The player controller

  - ### onOpenBundle

    public void onOpenBundle(@NonNull PlayerController playerController, @NonNull Bundle bundle)
    Description copied from interface: `PlayerControllerPlugin.Component`
    Called when the player controller is opened with a bundle. Implementations can use this to extract or modify bundle data.
    Specified by:
      `onOpenBundle` in interface `PlayerControllerPlugin.Component`
    Parameters:
      `playerController` - The player controller
      `bundle` - The bundle

  - ### onOpenState

    public void onOpenState(@NonNull PlayerController playerController, @NonNull PlayerConfig playerConfig)
    Description copied from interface: `PlayerControllerPlugin.Component`
    Called when the player controller is opened with a config. Implementations can use this to extract or modify config data.
    Specified by:
      `onOpenState` in interface `PlayerControllerPlugin.Component`
    Parameters:
      `playerController` - The player controller
      `playerConfig` - The playback state