MediaItem.AdsConfiguration


class MediaItem.AdsConfiguration : Bundleable


Configuration for playing back linear ads with a media item.

Summary

Nested types

Builder for AdsConfiguration instances.

Constants

const Bundleable.Creator<MediaItem.AdsConfiguration!>!

This property is deprecated.

Use fromBundle instead.

Public functions

MediaItem.AdsConfiguration.Builder!

Returns a Builder initialized with the values of this instance.

Boolean
equals(obj: Any?)
java-static MediaItem.AdsConfiguration!

Restores a AdsConfiguration from a Bundle.

Int
Bundle!

Returns a representing the information stored in this object.

Public properties

Uri!

The ad tag URI to load.

Any?

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.

Constants

CREATOR

@UnstableApi
const val CREATORBundleable.Creator<MediaItem.AdsConfiguration!>!

An object that can restore AdsConfiguration from a Bundle.

The adsId of a restored instance will always be null.

Public functions

buildUpon

fun buildUpon(): MediaItem.AdsConfiguration.Builder!

Returns a Builder initialized with the values of this instance.

equals

fun equals(obj: Any?): Boolean

fromBundle

@UnstableApi
java-static fun fromBundle(bundle: Bundle!): MediaItem.AdsConfiguration!

Restores a AdsConfiguration from a Bundle.

hashCode

fun hashCode(): Int

toBundle

@UnstableApi
fun toBundle(): Bundle!

Returns a representing the information stored in this object.

It omits the adsId field. The adsId of an instance restored from such a bundle by CREATOR will be null.

Public properties

adTagUri

val adTagUriUri!

The ad tag URI to load.

adsId

val adsIdAny?

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.