Back to Exoplayer

ImaServerSideAdInsertionUriBuilder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionUriBuilder.html

latest12.9 KB
Original Source

Package com.google.android.exoplayer2.ext.ima

Class ImaServerSideAdInsertionUriBuilder

  • java.lang.Object

    • com.google.android.exoplayer2.ext.ima.ImaServerSideAdInsertionUriBuilder

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classImaServerSideAdInsertionUriBuilderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Builder for URI for IMA DAI streams. The resulting URI can be used to build a media item that can be played by the ImaServerSideAdInsertionMediaSource.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static int | DEFAULT_LOAD_VIDEO_TIMEOUT_MS | Deprecated.

The default timeout for loading the video URI, in milliseconds. | | @com.google.android.exoplayer2.C.ContentType int | format | Deprecated. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | ImaServerSideAdInsertionUriBuilder() | Deprecated.

Creates a new instance. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | Uri | build() | Deprecated.

Builds a URI with the builder's current values. | | ImaServerSideAdInsertionUriBuilder | setAdsId​(String adsId) | Deprecated.

An opaque identifier for associated ad playback state, or null if the asset key (for live) or video id (for VOD) should be used as the ads identifier. | | ImaServerSideAdInsertionUriBuilder | setAdTagParameters​(Map<String,​String> adTagParameters) | Deprecated.

Sets the overridable ad tag parameters on the stream request. | | ImaServerSideAdInsertionUriBuilder | setApiKey​(String apiKey) | Deprecated.

The stream request API key. | | ImaServerSideAdInsertionUriBuilder | setAssetKey​(String assetKey) | Deprecated.

The stream request asset key used for live streams. | | ImaServerSideAdInsertionUriBuilder | setAuthToken​(String authToken) | Deprecated.

Sets the stream request authorization token. | | ImaServerSideAdInsertionUriBuilder | setContentSourceId​(String contentSourceId) | Deprecated.

The stream request content source ID used for on-demand streams. | | ImaServerSideAdInsertionUriBuilder | setContentUrl​(String contentUrl) | Deprecated.

Specifies the deep link to the content's screen. | | ImaServerSideAdInsertionUriBuilder | setFormat​(@com.google.android.exoplayer2.C.ContentType int format) | Deprecated.

Sets the format of the stream request. | | ImaServerSideAdInsertionUriBuilder | setLoadVideoTimeoutMs​(int loadVideoTimeoutMs) | Deprecated.

Sets the duration after which resolving the video URI should time out, in milliseconds. | | ImaServerSideAdInsertionUriBuilder | setManifestSuffix​(String manifestSuffix) | Deprecated.

Sets the optional stream manifest's suffix, which will be appended to the stream manifest's URL. | | ImaServerSideAdInsertionUriBuilder | setStreamActivityMonitorId​(String streamActivityMonitorId) | Deprecated.

Sets the ID to be used to debug the stream with the stream activity monitor. | | ImaServerSideAdInsertionUriBuilder | setVideoId​(String videoId) | Deprecated.

The stream request video ID used for on-demand streams. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

DEFAULT_LOAD_VIDEO_TIMEOUT_MS

public static final int DEFAULT_LOAD_VIDEO_TIMEOUT_MS

Deprecated.

The default timeout for loading the video URI, in milliseconds. See Also:Constant Field Values

- 

format

[@ContentType](../../C.ContentType.html "annotation in com.google.android.exoplayer2")public @com.google.android.exoplayer2.C.ContentType int format

Deprecated.

Constructor Detail

- 

ImaServerSideAdInsertionUriBuilder

public ImaServerSideAdInsertionUriBuilder()

Deprecated.

Creates a new instance.

Method Detail

- 

setAdsId

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setAdsId​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")adsId)

Deprecated.

An opaque identifier for associated ad playback state, or null if the asset key (for live) or video id (for VOD) should be used as the ads identifier. Parameters:adsId - The ads identifier.Returns:This instance, for convenience.

- 

setAssetKey

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setAssetKey​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")assetKey)

Deprecated.

The stream request asset key used for live streams. Parameters:assetKey - Live stream asset key.Returns:This instance, for convenience.

- 

setAuthToken

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setAuthToken​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")authToken)

Deprecated.

Sets the stream request authorization token. Used in place of the API key for stricter content authorization. The publisher can control individual content streams authorizations based on this token. Parameters:authToken - Live stream authorization token.Returns:This instance, for convenience.

- 

setContentSourceId

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setContentSourceId​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")contentSourceId)

Deprecated.

The stream request content source ID used for on-demand streams. Parameters:contentSourceId - VOD stream content source id.Returns:This instance, for convenience.

- 

setVideoId

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setVideoId​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")videoId)

Deprecated.

The stream request video ID used for on-demand streams. Parameters:videoId - VOD stream video id.Returns:This instance, for convenience.

- 

setFormat

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setFormat​([@ContentType](../../C.ContentType.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.C.ContentType int format)

Deprecated.

Sets the format of the stream request. Parameters:format - C.TYPE_DASH or C.TYPE_HLS.Returns:This instance, for convenience.

- 

setApiKey

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setApiKey​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")apiKey)

Deprecated.

The stream request API key. This is used for content authentication. The API key is provided to the publisher to unlock their content. It's a security measure used to verify the applications that are attempting to access the content. Parameters:apiKey - Stream api key.Returns:This instance, for convenience.

- 

setStreamActivityMonitorId

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setStreamActivityMonitorId​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")streamActivityMonitorId)

Deprecated.

Sets the ID to be used to debug the stream with the stream activity monitor. This is used to provide a convenient way to allow publishers to find a stream log in the stream activity monitor tool. Parameters:streamActivityMonitorId - ID for debugging the stream with the stream activity monitor.Returns:This instance, for convenience.

- 

setAdTagParameters

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setAdTagParameters​([Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),​[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> adTagParameters)

Deprecated.

Sets the overridable ad tag parameters on the stream request. Supply targeting parameters to your stream provides more information.

You can use the dai-ot and dai-ov parameters for stream variant preference. See Override Stream Variant Parameters for more information.

Parameters:adTagParameters - A map of extra parameters to pass to the ad server.Returns:This instance, for convenience.

- 

setManifestSuffix

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setManifestSuffix​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")manifestSuffix)

Deprecated.

Sets the optional stream manifest's suffix, which will be appended to the stream manifest's URL. The provided string must be URL-encoded and must not include a leading question mark. Parameters:manifestSuffix - Stream manifest's suffix.Returns:This instance, for convenience.

- 

setContentUrl

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setContentUrl​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")contentUrl)

Deprecated.

Specifies the deep link to the content's screen. If provided, this parameter is passed to the OM SDK. See Android documentation for more information. Parameters:contentUrl - Deep link to the content's screen.Returns:This instance, for convenience.

- 

setLoadVideoTimeoutMs

@CanIgnoreReturnValue
public[ImaServerSideAdInsertionUriBuilder](ImaServerSideAdInsertionUriBuilder.html "class in com.google.android.exoplayer2.ext.ima")setLoadVideoTimeoutMs​(int loadVideoTimeoutMs)

Deprecated.

Sets the duration after which resolving the video URI should time out, in milliseconds.

The default is DEFAULT_LOAD_VIDEO_TIMEOUT_MS milliseconds.

Parameters:loadVideoTimeoutMs - The timeout after which to give up resolving the video URI.Returns:This instance, for convenience.

- 

build

public[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")build()

Deprecated.

Builds a URI with the builder's current values. Returns:The build Uri.Throws:IllegalStateException - If the builder has missing or invalid inputs.