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