Table of Contents
- google.ima.CompanionAdSelectionSettings.SizeCriteria
- CompanionsConfigObject
- CompanionAdObject
- google.ima.AdsRenderingSettings
- google.ima.ImaSdkSettings.VpaidMode
- ImaConfigObject
- AccessMode
- OmidAccessModesConfig
- ImaAdsController
- ImaEngineDecorator
- Ima
- State
google.ima.CompanionAdSelectionSettings.SizeCriteria
google.ima.CompanionAdSelectionSettings.SizeCriteria
CompanionsConfigObject
Type: Object
Parameters
adsObject Companion ads. Represented as a key-value object where the key is the ad id (string) and the value is the companion ad object (CompanionAdObject).sizeCriteriagoogle.ima.CompanionAdSelectionSettings.SizeCriteria Available choices for size selection criteria. The user can specify any of these choices for selecting companion ads. (optional, default'SELECT_EXACT_MATCH')
Examples
{
sizeCriteria: 'SELECT_EXACT_MATCH',
ads: {
testCompanionSquare: {
width: 300,
height: 250
},
testCompanionLong: {
width: 728,
height: 90
}
}
}
CompanionAdObject
Type: Object
Parameters
google.ima.AdsRenderingSettings
google.ima.AdsRenderingSettings
google.ima.ImaSdkSettings.VpaidMode
google.ima.ImaSdkSettings.VpaidMode
ImaConfigObject
Type: Object
Parameters
adTagUrlstring Specifies the ad tag url that is requested from the ad server.adsResponsestring? Specifies a VAST 2.0 document to be used as the ads response instead of making a request via an ad tag url (ifadTagUrlis not set).debugboolean If set to true, loads IMA SDK in debug mode. (optional, defaultfalse)disableMediaPreloadboolean Whether to disable media pre loading while ad is playing. If set totrue, the player will start loading the content media just after the ad break will end (incase of preroll ad). This will also overridesconfig.adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakCompleteno matters its value and sets it tofalse. (optional, defaultfalse)forceReloadMediaAfterAdsboolean force reload our media after ads finish. (optional, defaultfalse)delayInitUntilSourceSelectedboolean wait until the video tag loaded and then load Ima. (optional, defaultfalse)vpaidModegoogle.ima.ImaSdkSettings.VpaidMode Sets VPAID playback mode See usage also in Handling VPAID Modes. (optional, default'ENABLED')numRedirectsgoogle.ima.ImaSdkSettings.numRedirects Specifies the maximum number of redirects before the subsequent redirects will be denied, and the ad load aborted. This applies to all VAST wrapper ads. (optional, default4)-
adsRenderingSettingsgoogle.ima.AdsRenderingSettings Defines parameters that control the rendering of ads. (optional, default{ restoreCustomPlaybackStateOnAdBreakComplete:true, enablePreloading:false, useStyledLinearAds:false, useStyledNonLinearAds:true bitrate:-1, autoAlign:true })adsRenderingSettings.useStyledLinearAdsboolean See usage also in Handling VPAID Ads (optional, defaultfalse)
companionsCompanionsConfigObject? Defines the companion ads.localestring? Sets the publisher provided locale. The locale specifies the language in which to display UI elements and can be any two-letter ISO 639-1 code.showAdBreakCuePointboolean? Whether to show the ad breaks cue points.adBreakCuePointStyleObject? Style options for the ad breaks cue points - See the options Here.sessionIdstring? a temporary random ID. It is used exclusively for frequency capping. A session ID must be a UUID.omidAccessModesOmidAccessModesConfig? A dictionary that maps each OmidVerificationVendor to one of the access modes
AccessMode
different access modes for verification scripts
Type: ("FULL" |
"CREATIVE" |
"DOMAIN" |
"LIMITED") |
OmidAccessModesConfig
A dictionary that maps each OmidVerificationVendor to one of the available access modes
Examples
{
MOAT: 'FULL'
PIXELATE: 'CREATIVE'
OTHER: 'DOMAIN'
}
ImaAdsController
Controller for ima plugin.
Parameters
contextIma The ima plugin context.
skipAd
Skip on an ad.
Returns void
playAdNow
Play an ad on demand.
Parameters
adPodKPAdPod The ad pod to play.
Returns void
onPlaybackEnded
On playback ended handler.
Returns Promise<void> complete promise
active
Whether this ads controller is active
Type: boolean
Returns boolean is active
done
Whether this ads controller is done
Type: boolean
Returns boolean is done
name
The controller name
Type: string
Returns string The name
ImaEngineDecorator
Engine decorator for ima plugin.
Parameters
engineIEngine The HTML5 engine.pluginIma The ima plugin.
paused
Get paused state.
Type: boolean
Returns boolean The paused value of the engine.
currentTime
Get the current time in seconds.
Type: number
Returns number The current playback time.
currentTime
Set the current time in seconds.
Type: number
Parameters
tonumber The number to set in seconds.
Returns void
duration
Get the duration in seconds.
Type: number
Returns number The playback duration.
ended
Get ended state
Type: boolean
Returns boolean media ended
Ima
Extends BasePlugin
The ima plugin.
Parameters
namestring The plugin name.playerPlayer The player instance.configImaConfigObject The plugin config.
getEngineDecorator
Gets the engine decorator.
Parameters
engineIEngine The engine to decorate.
Returns IEngineDecorator The ads api.
getMiddlewareImpl
Gets the middleware.
Returns ImaMiddleware The middleware api.
getAdsController
Gets the ads controller.
Returns IAdsPluginController The ads api.
playAdNow
Plays ad on demand
Parameters
adPodKPAdPod The ad pod to play.
Returns void
skipAd
Skips on an ad.
Returns void
resumeAd
Resuming the ad.
Returns DeferredPromise The promise which when resolved starts the next handler in the middleware chain.
pauseAd
Pausing the ad.
Returns DeferredPromise The promise which when resolved starts the next handler in the middleware chain.
getStateMachine
Gets the state machine.
Returns any The state machine.
playOnMainVideoTag
Gets the indicator if ads playing on the main video tag
Returns boolean if ads playing on the main video tag.
isAdPlaying
Gets the indicator if ads still playing.
Returns boolean if ads still playing.
loadMedia
Prepare the plugin before media is loaded.
Returns void
reset
Resets the plugin.
Returns void
destroy
Destroys the plugin.
Returns void
initialUserAction
Initialize the ads for the first time.
Returns DeferredPromise? The promise which when resolved starts the next handler in the middleware chain.
onPlaybackEnded
Ended event handler.
Returns Promise<void> complete promise
defaultConfig
The default configuration of the plugin.
Type: Object
loadPromise
Promise for loading the plugin. Will be resolved after:
- Ima script has been loaded in the page.
- The ads manager has been loaded and ready to start.
Type: Promise<any>
isValid
Whether the ima plugin is valid.
State
The ima plugin possible states.
Type: Object