Package com.castlabs.android.player

# Class PlayerViewPlugin.SingleViewPlayerViewComponent<ViewType extends View>

java.lang.Object
com.castlabs.android.player.PlayerViewPlugin.SingleViewPlayerViewComponent<ViewType>

Type Parameters:
  `ViewType` - the type of the specific View

All Implemented Interfaces:
  `PlayerViewPlugin.PlayerViewComponent`

Direct Known Subclasses:
  `SubtitlesViewComponent`

Enclosing interface:
  `PlayerViewPlugin`

public abstract static class PlayerViewPlugin.SingleViewPlayerViewComponent<ViewType extends View> extends Object implements PlayerViewPlugin.PlayerViewComponent
Helper class which extracts all the common logic in a `PlayerViewPlugin.PlayerViewComponent` in case it only operates on one single View.

- ## Field Summary

  ### Fields inherited from interface com.castlabs.android.player.PlayerViewPlugin.PlayerViewComponent

  `POSITION_DEBUG, POSITION_SUBTITLES, POSITION_THUMBNAILS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SingleViewPlayerViewComponent()`
  Default constructor for the `PlayerViewPlugin.SingleViewPlayerViewComponent`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Collection<? extends View>`
  `attachToPlayerView(PlayerView playerView)`
  Create any necessary Views, attach them to the given PlayerView and return them.
  `ViewType`
  `getView()`
  Returns the View that was created by this component.
  `Class`
  `id()`
  Returns the class that is used to identify this component when it is registered with the player view.

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

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

  ### Methods inherited from interface com.castlabs.android.player.PlayerViewPlugin.PlayerViewComponent

  `getViewElevation`

- ## Constructor Details

  - ### SingleViewPlayerViewComponent

    public SingleViewPlayerViewComponent()
    Default constructor for the `PlayerViewPlugin.SingleViewPlayerViewComponent`.

- ## Method Details

  - ### id

    @Nullable public Class id()
    Description copied from interface: `PlayerViewPlugin.PlayerViewComponent`
    Returns the class that is used to identify this component when it is registered with the player view. This is what you need to pass to `PlayerView.getComponent(Class)` to get the registered instance of this component.
    Specified by:
      `id` in interface `PlayerViewPlugin.PlayerViewComponent`
    Returns:
      The class that identifies this component.

  - ### attachToPlayerView

    @NonNull public Collection<? extends View> attachToPlayerView(@NonNull PlayerView playerView)
    Description copied from interface: `PlayerViewPlugin.PlayerViewComponent`
    Create any necessary Views, attach them to the given PlayerView and return them.
    Specified by:
      `attachToPlayerView` in interface `PlayerViewPlugin.PlayerViewComponent`
    Parameters:
      `playerView` - the PlayerView to which attach the views
    Returns:
      The created Views.

  - ### getView

    @Nullable public ViewType getView()
    Returns the View that was created by this component.
    Returns:
      the created View or null if it was not created yet