Package com.castlabs.android.player

# Class ClearkeyTrackRendererBuilder

java.lang.Object
com.castlabs.android.player.ClearkeyTrackRendererBuilder

All Implemented Interfaces:
  `TrackRendererPlugin.TrackRendererBuilder`

public class ClearkeyTrackRendererBuilder extends Object
A `MediaCodecTrackRendererBuilder` that builds `Renderer` instances that support Clearkey DRM.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClearkeyTrackRendererBuilder()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `TrackRendererPlugin.TrackRendererContainer`
  `createRenderer(TrackRendererPlugin.Type type, PlayerController playerController, CasConfiguration configuration)`
  Creates a track renderer container for the given type, player controller and CAS configuration.
  `TrackRendererPlugin.TrackRendererContainer`
  `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.RendererCapabilities`
  `getRendererCapabilities(Context context, TrackRendererPlugin.Type type, DrmConfiguration drmConfiguration)`
  Returns the renderer capabilities for the given type and DRM configuration.
  `boolean`
  `isDefault()`
  Checks if this builder is the default one.
  `boolean`
  `isTypeSupported(TrackRendererPlugin.Type type, CasConfiguration configuration)`
  Checks if this builder supports the given type and CAS configuration.
  `boolean`
  `isTypeSupported(TrackRendererPlugin.Type type, DrmConfiguration configuration)`
  Checks if this builder supports the given type and DRM configuration.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.TrackRendererBuilder`
    Checks if this builder supports the given type and DRM configuration.
    Specified by:
      `isTypeSupported` in interface `TrackRendererPlugin.TrackRendererBuilder`
    Parameters:
      `type` - the content type
      `configuration` - 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.TrackRendererBuilder`
    Checks if this builder supports the given type and CAS configuration.
    Parameters:
      `type` - the content type
      `configuration` - the cas configuration
    Returns:
      true if this builder supports the given type and configuration

  - ### isDefault

    public boolean isDefault()
    Description copied from interface: `TrackRendererPlugin.TrackRendererBuilder`
    Checks if this builder is the default one.
    Specified by:
      `isDefault` in interface `TrackRendererPlugin.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.TrackRendererBuilder`
    Creates a track renderer container for the given type, player controller and CAS configuration.
    Parameters:
      `type` - the content type
      `playerController` - the player controller
      `configuration` - 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.TrackRendererBuilder`
    Returns the renderer capabilities for the given type and DRM configuration.
    Specified by:
      `getRendererCapabilities` in interface `TrackRendererPlugin.TrackRendererBuilder`
    Parameters:
      `context` - the context
      `type` - the content type
      `drmConfiguration` - 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.TrackRendererBuilder`
    Creates a track renderer container for the given type, player controller and DRM configuration.
    Specified by:
      `createRenderer` in interface `TrackRendererPlugin.TrackRendererBuilder`
    Parameters:
      `type` - the content type
      `playerController` - the player controller
      `drmConfiguration` - the drm configuration
    Returns:
      the created track renderer container or null
    Throws:
      `CastlabsPlayerException` - in case of an error while preparing the renderer