Package com.castlabs.android.player

## Interface TrackRendererPlugin.TrackRendererBuilder

- All Known Implementing Classes:
    `ClearkeyTrackRendererBuilder`
  Enclosing interface:
    TrackRendererPlugin

      public static interface TrackRendererPlugin.TrackRendererBuilder

  Implementations of the builder a responsible to create `Renderer` instances. The player will create one instance of this builder.

- - ### Method Summary

    All Methods Instance Methods Abstract 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 configuration)` |
    `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)` |

- - ### Method Detail

    - #### isTypeSupported

          boolean isTypeSupported​(@NonNull
                                  TrackRendererPlugin.Type type,
                                  @Nullable
                                  DrmConfiguration configuration)

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

    - #### isTypeSupported

          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

          boolean isDefault()

    - #### getRendererCapabilities

          @Nullable
          com.google.android.exoplayer2.RendererCapabilities getRendererCapabilities​(@NonNull
                                                                                     Context context,
                                                                                     @NonNull
                                                                                     TrackRendererPlugin.Type type,
                                                                                     @Nullable
                                                                                     DrmConfiguration drmConfiguration)

      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
          TrackRendererPlugin.TrackRendererContainer createRenderer​(@NonNull
                                                                    TrackRendererPlugin.Type type,
                                                                    @NonNull
                                                                    PlayerController playerController,
                                                                    @Nullable
                                                                    DrmConfiguration configuration)
                                                             throws CastlabsPlayerException

      Parameters:
        `type` - the content type
        `playerController` - the player controller
        `configuration` - the drm configuration
      Returns:
        the created track renderer container or null
      Throws:
        `CastlabsPlayerException` - in case of an error while preparing the renderer

    - #### createRenderer

          @Nullable
          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