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

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ClearkeyTrackRendererBuilder()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `TrackRendererPlugin.TrackRendererContainer` | `createRenderer​(TrackRendererPlugin.Type type, PlayerController playerController, CasConfiguration configuration)` |
    `TrackRendererPlugin.TrackRendererContainer` | `createRenderer​(TrackRendererPlugin.Type type, PlayerController playerController, DrmConfiguration drmConfiguration)` |
    `com.google.android.exoplayer2.RendererCapabilities` | `getRendererCapabilities​(Context context, TrackRendererPlugin.Type type, DrmConfiguration drmConfiguration)` |
    `boolean` | `isDefault()` |
    `boolean` | `isTypeSupported​(TrackRendererPlugin.Type type, CasConfiguration configuration)` |
    `boolean` | `isTypeSupported​(TrackRendererPlugin.Type type, DrmConfiguration configuration)` |

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

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

- - ### Constructor Detail

    - #### ClearkeyTrackRendererBuilder

          public ClearkeyTrackRendererBuilder()

  - ### Method Detail

    - #### isTypeSupported

          public boolean isTypeSupported​(@NonNull
                                         TrackRendererPlugin.Type type,
                                         @Nullable
                                         DrmConfiguration 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)

      Parameters:
        `type` - the content type
        `configuration` - the cas configuration
      Returns:
        true if this builder supports the given type and configuration

    - #### isDefault

          public boolean isDefault()

      Specified by:
        `isDefault` in interface `TrackRendererPlugin.TrackRendererBuilder`

    - #### createRenderer

          @Nullable
          public TrackRendererPlugin.TrackRendererContainer createRenderer​(@NonNull
                                                                           TrackRendererPlugin.Type type,
                                                                           @NonNull
                                                                           PlayerController playerController,
                                                                           @Nullable
                                                                           CasConfiguration configuration)
                                                                    throws CastlabsPlayerException

      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)

      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

      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