Package com.castlabs.android.player
Interface ConfigurationProvider
-
public interface ConfigurationProviderImplementations of this interface allows to get updated configurations when needed.DrmConfigurationupdate maybe needed when Widevine license renewal is enabled withDrmTodayConfiguration.Builder.renewalThreshold(long, TimeUnit)and the callback is installed viaPlayerController.setConfigurationProvider(ConfigurationProvider)PlayerConfigupdate 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 updatedPlayerConfigmaybe 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 DrmConfigurationgetDrmConfiguration(DrmConfiguration current)Provides updatedDrmConfigurationornullif no updates neededPlayerConfiggetPlayerConfig(PlayerConfig current)Provides updatedPlayerConfigornullif no updates needed
-
-
-
Method Detail
-
getDrmConfiguration
@Nullable DrmConfiguration getDrmConfiguration(@NonNull DrmConfiguration current)
Provides updatedDrmConfigurationornullif no updates needed- Parameters:
current- The currentDrmConfiguration- Returns:
- updated
DrmConfigurationornull
-
getPlayerConfig
@Nullable PlayerConfig getPlayerConfig(@NonNull PlayerConfig current)
Provides updatedPlayerConfigornullif no updates needed- Parameters:
current- The currentPlayerConfig- Returns:
- updated
PlayerConfigornull
-
-