An object containing the data used to request ads from the server.
Public Method Summary
abstract String |
getAdTagUrl()
Returns the URL from which ads will be requested.
|
abstract ContentProgressProvider |
getContentProgressProvider()
Returns the progress provider that will be used to schedule ad breaks.
|
abstract String |
getExtraParameter(String key)
This method is deprecated.
Extra parameters are not used by the SDK.
|
abstract Map<String, String> |
getExtraParameters()
This method is deprecated.
Extra parameters are not used by the SDK.
|
abstract void |
setAdTagUrl(String adTagUrl)
Sets the URL from which ads will be requested.
|
abstract void |
setAdWillAutoPlay(boolean willAutoPlay)
Notifies the SDK whether the player intends to start the content and ad in response to a user
action or whether it will be automatically played.
|
abstract void |
setAdWillPlayMuted(boolean willPlayMuted)
Notifies the SDK whether the player intends to start the content and ad while muted.
|
abstract void |
setAdsResponse(String cannedAdResponse)
Specifies a VAST, VMAP, or ad rules response to be used instead of making a request through an
ad tag URL.
|
abstract void |
setContentDuration(float duration)
Specifies the duration of the content in seconds to be shown.
|
abstract void |
setContentKeywords(List<String> keywords)
Specifies the keywords used to describe the content to be shown.
|
abstract void |
setContentProgressProvider(ContentProgressProvider contentProgressProvider)
Attaches a ContentProgressProvider instance to allow scheduling ad breaks based on content
progress (cue points).
|
abstract void |
setContentTitle(String title)
Specifies the title of the content to be shown.
|
abstract void |
setContinuousPlayback(boolean continuousPlayback)
Notifies the SDK whether the player intends to continuously play the content videos one after
another similar to TV broadcast.
|
abstract void |
setExtraParameter(String key, String value)
This method is deprecated.
Extra parameters are not used by the SDK.
|
abstract void |
setLiveStreamPrefetchSeconds(float prefetchTime)
Specifies the maximum amount of time to wait in seconds, after calling requestAds, before
requesting the ad tag URL.
|
abstract void |
setVastLoadTimeout(float timeout)
Specifies the VAST load timeout in milliseconds for a single wrapper.
|
Inherited Method Summary
Public Methods
public abstract String getAdTagUrl ()
Returns the URL from which ads will be requested.
public abstract ContentProgressProvider getContentProgressProvider ()
Returns the progress provider that will be used to schedule ad breaks.
public abstract String getExtraParameter (String key)
This method is deprecated.
Extra parameters are not used by the SDK.
Returns null, this is a no-op.
Parameters
key |
---|
public abstract Map<String, String> getExtraParameters ()
This method is deprecated.
Extra parameters are not used by the SDK.
Returns null, this is a no-op.
public abstract void setAdTagUrl (String adTagUrl)
Sets the URL from which ads will be requested. For details on constructing the ad tag url, see
Create a main ad video tag
manually. Either this or an ads response
is required.
Parameters
adTagUrl |
---|
public abstract void setAdWillAutoPlay (boolean willAutoPlay)
Notifies the SDK whether the player intends to start the content and ad in response to a user action or whether it will be automatically played. Not calling this function leaves the setting as unknown. Note: Changing this setting will have no impact on ad playback.
Parameters
willAutoPlay | Set to true if the ad will be autoplayed by the player, or false if playback is triggered by a user response. |
---|
public abstract void setAdWillPlayMuted (boolean willPlayMuted)
Notifies the SDK whether the player intends to start the content and ad while muted. Not calling this function leaves the setting as unknown. Note: Changing this setting will have no impact on ad playback.
Parameters
willPlayMuted | Set to true if the ad will be played while muted, or false if the ad will have volume greater than 0. |
---|
public abstract void setAdsResponse (String cannedAdResponse)
Specifies a VAST, VMAP, or ad rules response to be used instead of making a request through an
ad tag URL. This can be useful for debugging and other situations in which an ad response is
already available. Either this or an ad tag URL
is required.
Parameters
cannedAdResponse |
---|
public abstract void setContentDuration (float duration)
Specifies the duration of the content in seconds to be shown. This optional parameter is used by AdX requests. It is recommended for AdX users.
Parameters
duration |
---|
public abstract void setContentKeywords (List<String> keywords)
Specifies the keywords used to describe the content to be shown. This optional parameter is used by AdX requests and is recommended for AdX users.
Parameters
keywords |
---|
public abstract void setContentProgressProvider (ContentProgressProvider contentProgressProvider)
Attaches a ContentProgressProvider instance to allow scheduling ad breaks based on content progress (cue points).
Parameters
contentProgressProvider |
---|
public abstract void setContentTitle (String title)
Specifies the title of the content to be shown. Used in AdX requests. This optional parameter is used by AdX requests and is recommended for AdX users.
Parameters
title |
---|
public abstract void setContinuousPlayback (boolean continuousPlayback)
Notifies the SDK whether the player intends to continuously play the content videos one after another similar to TV broadcast. Not calling this function leaves the setting as unknown. Note: Changing this setting will have no impact on ad playback.
Parameters
continuousPlayback | Set to true if the content video is played one after another continuously. |
---|
public abstract void setExtraParameter (String key, String value)
This method is deprecated.
Extra parameters are not used by the SDK.
No-op.
Parameters
key | |
---|---|
value |
public abstract void setLiveStreamPrefetchSeconds (float prefetchTime)
Specifies the maximum amount of time to wait in seconds, after calling requestAds, before requesting the ad tag URL. This can be used to stagger requests during a live-stream event, in order to mitigate spikes in the number of requests.
Parameters
prefetchTime |
---|
public abstract void setVastLoadTimeout (float timeout)
Specifies the VAST load timeout in milliseconds for a single wrapper. This parameter is optional and will override the default timeout, currently set to 5000ms.
Parameters
timeout |
---|