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 aPlayerViewPlugin.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()
-
Method Summary
All Methods Instance Methods Concrete Methods 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()
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
-
-
-
-
Method Detail
-
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 toPlayerView.getComponent(Class)
to get the registered instance of this component.- Specified by:
id
in interfacePlayerViewPlugin.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 interfacePlayerViewPlugin.PlayerViewComponent
- Parameters:
playerView
- the PlayerView to which attach the views- Returns:
- The created Views.
-
getView
@Nullable public ViewType getView()
-
-