Package com.castlabs.android.player
Interface TrackRendererPlugin
- All Known Implementing Classes:
ClearTrackRendererPlugin
,ExoSubtitlesRendererPlugin
public interface TrackRendererPlugin
This plugin interface can be used to implement a track renderer integration. When a player is
initialised, registered track renderer plugins are checked and eventually a renderer is created
if the plugin claims to be able to handle the requested content type and drm configuration.
A player initialization uses one instance of the
TrackRendererPlugin.TrackRendererBuilder
to create renderer. That means that you can hold state in within the builder. This is useful
if you need to create a drm session that is used for both video and audio tracks. You can store that
session globally in the TrackRendererPlugin.TrackRendererBuilder
implementation
because there will only be one builder per player instance.
Implementations of this plugin can be registered with PlayerSDK.register(TrackRendererPlugin)
.
The renderer builder creates instances of TrackRendererPlugin.TrackRendererContainer
that hold a reference
to a renderer and an optional reference to a view component that is required for the renderer.- Since:
- 3.0.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Implementations of the builder a responsible to createRenderer
instances.static final class
The builder interface creates instances of this container that wraps the renderer instance and an optional view component.static enum
The different content types -
Method Summary
-
Method Details
-
create
- Returns:
- a new instance of the builder
-