Show Menu
TOPICS×

Configure billing metrics

If you use the default configuration, there is nothing else you need to do to enable or configure billing. If you obtained different configuration parameters from your Adobe Enablement representative, use the BillingMetricsConfiguration class to set these parameters up before initializing the media player.
Most customers should use the default configuration.
The configuration you set remains in effect for the life of the media player. Once you initialize the media player, you cannot change the configuration.
To configure billing metrics:
  1. Enter the following code sample.
    MediaPlayerItemConfig config = new MediaPlayerItemConfig(); 
    BillingMetricsConfiguration billingConfig = new BillingMetricsConfiguration(); 
    billingConfig.setEnabled(true); 
    billingConfig.setProVODBillableDurationMinutes(60); 
    billingConfig.setStdVODBillableDurationMinutes(30); 
    billingConfig.setLiveBillableDurationMinutes(15); 
    config.setBillingMetricsConfiguration(billingConfig); 
    mediaPlayer.replaceCurrentResource(mediaResource, config);