Package com.castlabs.android.player
Class ClearkeyTrackRendererBuilder
java.lang.Object
com.castlabs.android.player.ClearkeyTrackRendererBuilder
- All Implemented Interfaces:
TrackRendererPlugin.TrackRendererBuilder
A
MediaCodecTrackRendererBuilder that builds Renderer
instances that support Clearkey DRM.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRenderer(TrackRendererPlugin.Type type, PlayerController playerController, CasConfiguration configuration) Creates a track renderer container for the given type, player controller and CAS configuration.createRenderer(TrackRendererPlugin.Type type, PlayerController playerController, DrmConfiguration drmConfiguration) Creates a track renderer container for the given type, player controller and DRM configuration.com.google.android.exoplayer2.RendererCapabilitiesgetRendererCapabilities(Context context, TrackRendererPlugin.Type type, DrmConfiguration drmConfiguration) Returns the renderer capabilities for the given type and DRM configuration.booleanChecks if this builder is the default one.booleanisTypeSupported(TrackRendererPlugin.Type type, CasConfiguration configuration) Checks if this builder supports the given type and CAS configuration.booleanisTypeSupported(TrackRendererPlugin.Type type, DrmConfiguration configuration) Checks if this builder supports the given type and DRM configuration.
-
Constructor Details
-
ClearkeyTrackRendererBuilder
public ClearkeyTrackRendererBuilder()Default constructor.
-
-
Method Details
-
isTypeSupported
public boolean isTypeSupported(@NonNull TrackRendererPlugin.Type type, @Nullable DrmConfiguration configuration) Description copied from interface:TrackRendererPlugin.TrackRendererBuilderChecks if this builder supports the given type and DRM configuration.- Specified by:
isTypeSupportedin interfaceTrackRendererPlugin.TrackRendererBuilder- Parameters:
type- the content typeconfiguration- the drm configuration- Returns:
- true if this builder supports the given type and configuration
-
isTypeSupported
public boolean isTypeSupported(@NonNull TrackRendererPlugin.Type type, @Nullable CasConfiguration configuration) Description copied from interface:TrackRendererPlugin.TrackRendererBuilderChecks if this builder supports the given type and CAS configuration.- Parameters:
type- the content typeconfiguration- the cas configuration- Returns:
- true if this builder supports the given type and configuration
-
isDefault
public boolean isDefault()Description copied from interface:TrackRendererPlugin.TrackRendererBuilderChecks if this builder is the default one.- Specified by:
isDefaultin interfaceTrackRendererPlugin.TrackRendererBuilder- Returns:
- true if this builder is the default one
-
createRenderer
@Nullable public TrackRendererPlugin.TrackRendererContainer createRenderer(@NonNull TrackRendererPlugin.Type type, @NonNull PlayerController playerController, @Nullable CasConfiguration configuration) throws CastlabsPlayerException Description copied from interface:TrackRendererPlugin.TrackRendererBuilderCreates a track renderer container for the given type, player controller and CAS configuration.- Parameters:
type- the content typeplayerController- the player controllerconfiguration- the cas configuration- Returns:
- the created track renderer container or null
- Throws:
CastlabsPlayerException- in case of an error while preparing the renderer
-
getRendererCapabilities
@Nullable public com.google.android.exoplayer2.RendererCapabilities getRendererCapabilities(@NonNull Context context, @NonNull TrackRendererPlugin.Type type, @Nullable DrmConfiguration drmConfiguration) Description copied from interface:TrackRendererPlugin.TrackRendererBuilderReturns the renderer capabilities for the given type and DRM configuration.- Specified by:
getRendererCapabilitiesin interfaceTrackRendererPlugin.TrackRendererBuilder- Parameters:
context- the contexttype- the content typedrmConfiguration- the drm configuration- Returns:
- RendererCapabilities if this builder supports the given type and configuration
-
createRenderer
@Nullable public TrackRendererPlugin.TrackRendererContainer createRenderer(@NonNull TrackRendererPlugin.Type type, @NonNull PlayerController playerController, @Nullable DrmConfiguration drmConfiguration) throws CastlabsPlayerException Description copied from interface:TrackRendererPlugin.TrackRendererBuilderCreates a track renderer container for the given type, player controller and DRM configuration.- Specified by:
createRendererin interfaceTrackRendererPlugin.TrackRendererBuilder- Parameters:
type- the content typeplayerController- the player controllerdrmConfiguration- the drm configuration- Returns:
- the created track renderer container or null
- Throws:
CastlabsPlayerException- in case of an error while preparing the renderer
-