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 withDrmTodayConfiguration.Builder.renewalThreshold(long, TimeUnit)
and the callback is installed viaPlayerController.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 updatedPlayerConfig
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 updatedDrmConfiguration
ornull
if no updates neededPlayerConfig
getPlayerConfig(PlayerConfig current)
Provides updatedPlayerConfig
ornull
if no updates needed
-
-
-
Method Detail
-
getDrmConfiguration
@Nullable DrmConfiguration getDrmConfiguration(@NonNull DrmConfiguration current)
Provides updatedDrmConfiguration
ornull
if no updates needed- Parameters:
current
- The currentDrmConfiguration
- Returns:
- updated
DrmConfiguration
ornull
-
getPlayerConfig
@Nullable PlayerConfig getPlayerConfig(@NonNull PlayerConfig current)
Provides updatedPlayerConfig
ornull
if no updates needed- Parameters:
current
- The currentPlayerConfig
- Returns:
- updated
PlayerConfig
ornull
-
-