Class MediaItem.AdsConfiguration

  • All Implemented Interfaces:
    Enclosing class:

    public static final class MediaItem.AdsConfiguration
    extends Object
    implements Bundleable
    Configuration for playing back linear ads with a media item.
    • Field Detail

      • adTagUri

        public final Uri adTagUri
        The ad tag URI to load.
      • adsId

        public final Object adsId
        An opaque identifier for ad playback state associated with this item, or null if the combination of the media ID and ad tag URI should be used as the ads identifier.

        Media items in the playlist that have the same ads identifier and ads loader share the same ad playback state. To resume ad playback when recreating the playlist on returning from the background, pass the same ads identifiers to the player.