Skip to the content.

Table of Contents

google.ima.CompanionAdSelectionSettings.SizeCriteria

google.ima.CompanionAdSelectionSettings.SizeCriteria

CompanionsConfigObject

Type: Object

Parameters

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

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

skipAd

Skip on an ad.

Returns void

playAdNow

Play an ad on demand.

Parameters

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

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

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

getEngineDecorator

Gets the engine decorator.

Parameters

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

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:

  1. Ima script has been loaded in the page.
  2. 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