Class: AdsRenderingSettings

Constructor

AdsRenderingSettings

new AdsRenderingSettings()

Implements
google.ima.AdsRenderingSettingsInterface

Properties

autoAlign

boolean

Set to false if you want to have fine grained control over the positioning of all non-linear ads. If this value is true, the ad is positioned in the bottom center. If this value is false, the ad is positioned in the top left corner. The default value is true.

bitrate

number

Maximum recommended bitrate. The value is in kbit/s. The SDK will pick media with bitrate below the specified max, or the closest bitrate if there is no media with lower bitrate found. Default value, -1, means the SDK selects the maximum bitrate.

enablePreloading

boolean

Enables preloading of video assets. For more info see our guide to preloading media.

loadVideoTimeout

number

Timeout (in milliseconds) when loading a video ad media file. If loading takes longer than this timeout, the ad playback is canceled and the next ad in the pod plays, if available. Use -1 for the default of 8 seconds.

mimeTypes

(null or non-null Array of string)

Only supported for linear video mime types. If specified, the SDK will include media that matches the MIME type(s) specified in the list and exclude media that does not match the specified MIME type(s). The format is a list of strings, for example, [ 'video/mp4', 'video/webm', ... ] If not specified, the SDK will pick the media based on player capabilities.

playAdsAfterTime

number

For VMAP and ad rules playlists, only play ad breaks scheduled after this time (in seconds). This setting is strictly after - for example, setting playAdsAfterTime to 15 will cause IMA to ignore an ad break scheduled to play at 15s.

restoreCustomPlaybackStateOnAdBreakComplete

boolean

Specifies whether or not the SDK should restore the custom playback state after an ad break completes. This is setting is used primarily when the publisher passes in its content player to use for custom ad playback.

uiElements

(null or non-null Array of string)

Specifies whether the UI elements that should be displayed. The elements in this array are ignored for AdSense/AdX ads.

useStyledLinearAds

boolean

Render linear ads with full UI styling. This setting does not apply to AdSense/AdX ads or ads played in a mobile context that already use full UI styling by default.

useStyledNonLinearAds

boolean

Render non-linear ads with a close and recall button.