ImaSdkSettings

interface ImaSdkSettings


Defines general SDK settings that are used when creating an AdsLoader. ImaSdkSettings object should not be modified after AdsLoader is constructed; however it can be reused to construct new AdsLoader instances. createAdsLoadercreateAdsLoader

Summary

Constants

const Int

Public functions

Boolean

Specifies whether VMAP and ad rules ad breaks are automatically played.

(Mutable)Map<String!, String!>!

Returns the feature flags and their states as set by the setFeatureFlags function.

String!

Gets the current ISO 639-1 language code.

Int

Returns the maximum number of VAST redirects.

String!

Returns the partner provided player type.

String!

Returns the partner provided player version.

String!
String!

Returns the session ID if set.

Boolean

Gets the debug mode.

Unit
setAutoPlayAdBreaks(autoPlayAdBreaks: Boolean)

Sets whether to automatically play VMAP and ad rules ad breaks.

Unit
setDebugMode(debugMode: Boolean)

Enables and disables the debug mode, which is disabled by default.

Unit
setFeatureFlags(featureFlags: (Mutable)Map<String!, String!>!)

Sets the feature flags and their states to control experimental features.

Unit
setLanguage(language: String!)

Sets the preferred language for the ad UI.

Unit
setMaxRedirects(maxRedirects: Int)

Specifies the maximum number of redirects before the subsequent redirects will be denied and the ad load aborted.

Unit
setPlayerType(playerType: String!)

Sets the partner provided player type.

Unit
setPlayerVersion(playerVersion: String!)

Sets the partner provided player version.

Unit
setPpid(ppid: String!)

Sets the publisher provided ID used for tracking.

Unit
setSessionId(sessionId: String!)

Session ID is a temporary random ID.

String!

Returns a string representation of this ImaSdkSettings.

Constants

DEFAULT_MAX_REDIRECTS

const val DEFAULT_MAX_REDIRECTS = 4: Int

Public functions

getAutoPlayAdBreaks

fun getAutoPlayAdBreaks(): Boolean

Specifies whether VMAP and ad rules ad breaks are automatically played.

Default is TRUE

getFeatureFlags

fun getFeatureFlags(): (Mutable)Map<String!, String!>!

Returns the feature flags and their states as set by the setFeatureFlags function.

getLanguage

fun getLanguage(): String!

Gets the current ISO 639-1 language code. Defaults to "en" for English.

See also
"http://www.loc.gov/standards/iso639-2/php/English_list.php"

getMaxRedirects

fun getMaxRedirects(): Int

Returns the maximum number of VAST redirects. Also see setMaxRedirects.

getPlayerType

fun getPlayerType(): String!

Returns the partner provided player type.

Returns
String!

{String} Partner player type.

getPlayerVersion

fun getPlayerVersion(): String!

Returns the partner provided player version.

Returns
String!

{String} Partner player version.

getPpid

fun getPpid(): String!
Returns
String!

the ppid.

getSessionId

fun getSessionId(): String!

Returns the session ID if set.

Returns
String!

{String} The session ID.

isDebugMode

fun isDebugMode(): Boolean

Gets the debug mode.

Default is FALSE

setAutoPlayAdBreaks

fun setAutoPlayAdBreaks(autoPlayAdBreaks: Boolean): Unit

Sets whether to automatically play VMAP and ad rules ad breaks.

Parameters
autoPlayAdBreaks: Boolean

{boolean} Whether to autoPlay the ad breaks.

setDebugMode

fun setDebugMode(debugMode: Boolean): Unit

Enables and disables the debug mode, which is disabled by default.

Parameters
debugMode: Boolean

Whether to enable debug mode or not.

setFeatureFlags

fun setFeatureFlags(featureFlags: (Mutable)Map<String!, String!>!): Unit

Sets the feature flags and their states to control experimental features. This should be set as early as possible, before requesting ads. Settings will remain constant until the next ad request. Calling this method again will reset any feature flags for the next ad request.

setLanguage

fun setLanguage(language: String!): Unit

Sets the preferred language for the ad UI. The supported codes can be found in the Localization guide and are closely related to the two-letter ISO 639-1 language codes. If invalid or unsupported, the language will default to "en" for English. Once the AdsLoader object has been created, using this setter will have no effect.

setMaxRedirects

fun setMaxRedirects(maxRedirects: Int): Unit

Specifies the maximum number of redirects before the subsequent redirects will be denied and the ad load aborted. In this case, the ad will raise an error with error code 302. The number of redirects directly affects latency and thus user experience. This applies to all VAST wrapper ads. The default is DEFAULT_MAX_REDIRECTS.

Parameters
maxRedirects: Int

the maximum number of redirects to allow.

setPlayerType

fun setPlayerType(playerType: String!): Unit

Sets the partner provided player type. This setting should be used to specify the name of the player being integrated with the SDK. Player type greater than 20 characters will be truncated. The player type specified should be short and unique. This is an optional setting used to improve SDK usability by tracking player types.

Example:

settings.setPlayerType("google/gmf-player");
Parameters
playerType: String!

{String} The type of the partner player.

setPlayerVersion

fun setPlayerVersion(playerVersion: String!): Unit

Sets the partner provided player version. This setting should be used to specify the version of the partner player being integrated with the SDK. Player versions greater than 20 characters will be truncated. This is an optional setting used to improve SDK usability by tracking player version.

Example:

settings.setPlayerVersion("1.0.0");
Parameters
playerVersion: String!

{String} The version of the partner player.

setPpid

fun setPpid(ppid: String!): Unit

Sets the publisher provided ID used for tracking.

Parameters
ppid: String!

the ppid to set.

setSessionId

fun setSessionId(sessionId: String!): Unit

Session ID is a temporary random ID. It is used exclusively for frequency capping. A session ID must be a UUID, or an empty string if the SDK should not send a session ID.

Parameters
sessionId: String!

{String} A temporary UUID used for frequency capping.

toString

fun toString(): String!

Returns a string representation of this ImaSdkSettings.