Show Menu
TOPICS×

Customize ad insertion metadata

You can customize ad insertion metadata.
  1. Set a timeout on advertising metadata for unresolved opportunities.
    The default value for this timeout is 20 seconds.
  2. To change the value to 10 seconds, enter the following:
    auditudeSettings.timeout = 10000; //this value is specified in milliseconds
    
    
    The timeout property is defined in the AdvertisingMetadata class, and this timeout can be set for any custom ad settings that derives from the AdvertisingMetadata class. For example, if users define custom settings for a FreeWheel resolver, they can set a default timeout by using this setting.
  3. Create MediaPlayerItemConfig with the ad settings in step 2.
    var config = new AdobePSDK.MediaPlayerItemConfig(); 
    config.advertisingMetadata = auditudeSettings;
    
    
  4. Use this configuration when calling replaceCurrentResource on MediaPlayer .
    player.replaceCurrentResource(mediaResource, config);