Package com.castlabs.android.player
Interface PlayerViewPlugin.PlayerViewComponent
-
- All Known Implementing Classes:
PlayerViewPlugin.SingleViewPlayerViewComponent
,SubtitlesViewComponent
- Enclosing interface:
- PlayerViewPlugin
public static interface PlayerViewPlugin.PlayerViewComponent
Implementations of this view component can be used to gain controlled access to aIPlayerView
and itsPlayerController
.The component can use the
IPlayerView
or itsPlayerController
to add event listeners and get callbacks during the playback lifecycle.
-
-
Field Summary
Fields Modifier and Type Field Description static int
POSITION_DEBUG
static int
POSITION_SUBTITLES
static int
POSITION_THUMBNAILS
-
Method Summary
All Methods Instance Methods Abstract 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.int
getViewElevation()
Will be used by theIPlayerView
to decide in which order the different Components willattach
their Views.Class
id()
Returns the class that is used to identify this component when it is registered with the player view.
-
-
-
Field Detail
-
POSITION_SUBTITLES
static final int POSITION_SUBTITLES
- See Also:
- Constant Field Values
-
POSITION_THUMBNAILS
static final int POSITION_THUMBNAILS
- See Also:
- Constant Field Values
-
POSITION_DEBUG
static final int POSITION_DEBUG
- See Also:
- Constant Field Values
-
-
Method Detail
-
getViewElevation
int getViewElevation()
Will be used by theIPlayerView
to decide in which order the different Components willattach
their Views. Higher values will be called later, and thus being "higher" in terms of z-ordering.- Returns:
- the elevation required by this PlayerViewComponent
-
id
@Nullable Class id()
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.- Returns:
- The class that identifies this component.
-
attachToPlayerView
@NonNull Collection<? extends View> attachToPlayerView(@NonNull PlayerView playerView)
Create any necessary Views, attach them to the given PlayerView and return them.- Parameters:
playerView
- the PlayerView to which attach the views- Returns:
- The created Views.
-
-