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 TypeMethodDescriptioncreateDrmLicenseManager(Context context, TrackRendererPlugin.Type type, DrmConfiguration drmConfiguration, ConfigurationProvider configurationProvider, SSLSocketFactory sslSocketFactory, DataSourceFactory dataSourceFactory, NetworkConfiguration networkConfiguration, List<RequestModifier> requestModifiers, List<ResponseModifier> responseModifiers) 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, 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
-
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
-
createDrmLicenseManager
@Nullable public DrmLicenseManager createDrmLicenseManager(@NonNull Context context, @NonNull TrackRendererPlugin.Type type, @Nullable DrmConfiguration drmConfiguration, @Nullable ConfigurationProvider configurationProvider, @Nullable SSLSocketFactory sslSocketFactory, @NonNull DataSourceFactory dataSourceFactory, @NonNull NetworkConfiguration networkConfiguration, @NonNull List<RequestModifier> requestModifiers, @NonNull List<ResponseModifier> responseModifiers) throws CastlabsPlayerException Description copied from interface:TrackRendererPlugin.TrackRendererBuilder- Specified by:
createDrmLicenseManagerin interfaceTrackRendererPlugin.TrackRendererBuilder- Parameters:
context- The context.type- The track type.drmConfiguration- The DRM configuration.configurationProvider- The configuration providernullsslSocketFactory- The SSL socket factory ornulldataSourceFactory- The data source factorynetworkConfiguration- THe network configurationrequestModifiers- The list of request modifiersresponseModifiers- The list of response modifiers- Returns:
- The
DrmLicenseManagerornullif no suitable builder was found. - Throws:
CastlabsPlayerException- in case of an error while preparing theDrmLicenseManager
-
getRendererCapabilities
@Nullable public com.google.android.exoplayer2.RendererCapabilities getRendererCapabilities(@NonNull Context context, @NonNull TrackRendererPlugin.Type type, @Nullable DrmConfiguration drmConfiguration) throws CastlabsPlayerException 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
- Throws:
CastlabsPlayerException- in case of an error while preparing the renderer
-
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
-