Package com.castlabs.android.player
Class ClearkeyTrackRendererBuilder
java.lang.Object
com.castlabs.android.player.ClearkeyTrackRendererBuilder
- All Implemented Interfaces:
TrackRendererPlugin.TrackRendererBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRenderer(TrackRendererPlugin.Type type, PlayerController playerController, CasConfiguration configuration) createRenderer(TrackRendererPlugin.Type type, PlayerController playerController, DrmConfiguration drmConfiguration) com.google.android.exoplayer2.RendererCapabilitiesgetRendererCapabilities(Context context, TrackRendererPlugin.Type type, DrmConfiguration drmConfiguration) booleanbooleanisTypeSupported(TrackRendererPlugin.Type type, CasConfiguration configuration) booleanisTypeSupported(TrackRendererPlugin.Type type, DrmConfiguration configuration)
-
Constructor Details
-
ClearkeyTrackRendererBuilder
public ClearkeyTrackRendererBuilder()
-
-
Method Details
-
isTypeSupported
public boolean isTypeSupported(@NonNull TrackRendererPlugin.Type type, @Nullable DrmConfiguration 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) - Parameters:
type- the content typeconfiguration- the cas configuration- Returns:
- true if this builder supports the given type and configuration
-
isDefault
public boolean isDefault()- Specified by:
isDefaultin interfaceTrackRendererPlugin.TrackRendererBuilder
-
createRenderer
@Nullable public TrackRendererPlugin.TrackRendererContainer createRenderer(@NonNull TrackRendererPlugin.Type type, @NonNull PlayerController playerController, @Nullable CasConfiguration configuration) throws CastlabsPlayerException - 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) - 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 - 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
-