StreamRequest

public interface StreamRequest

An object containing the data used to request a stream with server-side ad insertion.

Nested Class Summary

enum StreamRequest.StreamFormat Enum of possible stream formats. 

Public Method Summary

abstract Map<String, String>
getAdTagParameters()
Returns any parameters that the SDK will attempt to add to ad tags based on a call to setAdTagParameters().
abstract String
getApiKey()
Returns the API key for the ad server.
abstract String
getAssetKey()
Returns the asset key for server-side ad insertion streams.
abstract String
getAuthToken()
Returns the stream request authorization token.
abstract String
getContentSourceId()
Returns the content source ID for video on demand server-side ad insertion streams.
abstract StreamRequest.StreamFormat
getFormat()
Returns the format of the stream request.
abstract String
getManifestSuffix()
Returns the suffix that the SDK will append to the query of the stream manifest URL.
abstract Object
getUserRequestContext()
Returns the user-provided object that is associated with the stream request.
abstract String
getVideoId()
Returns the video ID for video on demand server-side ad insertion streams.
abstract void
setAdTagParameters(Map<String, String> adTagParameters)
Sets the overridable ad tag parameters on the stream request.
abstract void
setAuthToken(String authToken)
Sets the stream request authorization token.
abstract void
setFormat(StreamRequest.StreamFormat format)
Sets the format of the stream request.
abstract void
setManifestSuffix(String manifestSuffix)
Sets the stream manifest's suffix, which will be appended to the stream manifest's URL.
abstract void
setStreamActivityMonitorId(String streamActivityMonitorId)
Sets the ID to be used to debug the stream with the stream activity monitor.
abstract void
setUserRequestContext(Object userRequestContext)
Sets the user-provided object that is associated with the stream request.

Public Methods

public abstract Map<String, String> getAdTagParameters ()

Returns any parameters that the SDK will attempt to add to ad tags based on a call to setAdTagParameters(). This method will return null unless setAdTagParameters was called with some value(s).

public abstract String getApiKey ()

Returns the API key for the ad server.

public abstract String getAssetKey ()

Returns the asset key for server-side ad insertion streams. Returns null for video on demand streams.

public abstract String getAuthToken ()

Returns the stream request authorization token.

public abstract String getContentSourceId ()

Returns the content source ID for video on demand server-side ad insertion streams. Returns null for live streams.

public abstract StreamRequest.StreamFormat getFormat ()

Returns the format of the stream request.

public abstract String getManifestSuffix ()

Returns the suffix that the SDK will append to the query of the stream manifest URL.

public abstract Object getUserRequestContext ()

Returns the user-provided object that is associated with the stream request.

public abstract String getVideoId ()

Returns the video ID for video on demand server-side ad insertion streams. Returns null for live streams.

public abstract void setAdTagParameters (Map<String, String> adTagParameters)

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

public abstract void setAuthToken (String authToken)

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

public abstract void setFormat (StreamRequest.StreamFormat format)

Sets the format of the stream request.

Parameters
format

public abstract void setManifestSuffix (String manifestSuffix)

Sets the stream manifest's suffix, which will be appended to the stream manifest's URL. This setting is optional. The provided string must be URL-encoded and must not include a leading question mark.

Parameters
manifestSuffix

public abstract void setStreamActivityMonitorId (String streamActivityMonitorId)

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

public abstract void setUserRequestContext (Object userRequestContext)

Sets the user-provided object that is associated with the stream request. If supplied here, it will be available once the stream loading is complete or fails. This object can be used to identify the request that caused an error or which request loaded a particular ads manager.

Parameters
userRequestContext