Specifies whether the SDK should record the state of the provided video element
before it is used for ads, and restore the state after the ads have completed.
Render non-linear ads with a close and recall button.
Properties
autoAlign
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
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.
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
mimeTypes: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
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.
Specifies whether the SDK should record the state of the provided video element before
it is used for ads, and restore the state after the ads have completed. This is only
relevant for custom playback, when the same video element is used for both ads and
content. The default value is false.
uiElements
uiElements:string[]
Specifies whether to display specific IMA UI elements. For more details, see
UiElements. AdSense and AdX ads render their own ad UI regardless of this setting.
useStyledLinearAds
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
useStyledNonLinearAds:boolean
Render non-linear ads with a close and recall button.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-26 UTC."],[[["The `autoAlign` property controls the positioning of non-linear ads, with `true` setting the ad to the bottom center and `false` to the top left."],["The `bitrate` property specifies the maximum recommended bitrate for ad media, with a default of -1 for the SDK to select the maximum."],["`enablePreloading` allows the preloading of video assets, which can be further explored in the guide to preloading media."],["The `loadVideoTimeout` property determines the maximum time (in milliseconds) the system will wait to load a video ad media file before canceling playback, with -1 defaulting to 8 seconds."],["`playAdsAfterTime` allows for control of the start time of playing ad breaks in VMAP and ad rule playlists, only playing ad breaks scheduled after the specified time in seconds."]]],[]]