Package com.castlabs.android.player

## Interface ConfigurationProvider

-     public interface ConfigurationProvider

  Implementations of this interface allows to get updated configurations when needed.

       DrmConfiguration update maybe needed when Widevine
       license renewal is enabled with
       DrmTodayConfiguration.Builder.renewalThreshold(long, TimeUnit)
       and the callback is installed via
       PlayerController.setConfigurationProvider(ConfigurationProvider)

       PlayerConfig update maybe needed when automatic player restart occurs e.g. during unplug/plug
       of HDMI cable and playing L1 content. In order to resume the playback after HDMI connection is restored, the
       playback restart is required and therefore updated PlayerConfig maybe needed as well.

       playerView.getPlayerController().setConfigurationProvider(new ConfigurationProvider() {
        public DrmConfiguration getDrmConfiguration(@NonNull DrmConfiguration drmConfiguration) {
                      // We just supply here the same DRM configuration to show how the DRM configuration
                      // can be provided for the license renewal. If needed any other configuration can be created and returned here.
                      // In case the DRM configuration stays the same over license renewals then this callback is not needed to be
                      // installed and the same DRM configuration is used by default
                      return drmConfiguration;
        }

        public PlayerConfig getPlayerConfig(@NonNull PlayerConfig current) {
                      return null;
        }
       });

  Since:
    4.2.24

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `DrmConfiguration` | `getDrmConfiguration​(DrmConfiguration current)` | Provides updated `DrmConfiguration` or `null` if no updates needed
    `PlayerConfig` | `getPlayerConfig​(PlayerConfig current)` | Provides updated `PlayerConfig` or `null` if no updates needed

- - ### Method Detail

    - #### getDrmConfiguration

          @Nullable
          DrmConfiguration getDrmConfiguration​(@NonNull
                                               DrmConfiguration current)

      Provides updated `DrmConfiguration` or `null` if no updates needed
      Parameters:
        `current` - The current `DrmConfiguration`
      Returns:
        updated `DrmConfiguration` or `null`

    - #### getPlayerConfig

          @Nullable
          PlayerConfig getPlayerConfig​(@NonNull
                                       PlayerConfig current)

      Provides updated `PlayerConfig` or `null` if no updates needed
      Parameters:
        `current` - The current `PlayerConfig`
      Returns:
        updated `PlayerConfig` or `null`