Google Interactive Media Ads

Google IMA Flash AS3 SDK APIs (Deprecated)

  1. com.google.ads.instream.api
    1. Ad
    2. AdBreak
    3. AdBreakTypes
    4. AdBreaksInitializedEvent
    5. AdError
    6. AdErrorCodes
    7. AdErrorEvent
    8. AdErrorTypes
    9. AdEvent
    10. AdLoadedEvent
    11. AdSizeChangedEvent
    12. AdTypes
    13. AdsListLoadedEvent
    14. AdsListManager
    15. AdsLoadedEvent
    16. AdsLoader
    17. AdsManager
    18. AdsManagerTypes
    19. AdsRequest
    20. AdsRequestType
    21. CompanionAd
    22. CompanionAdEnvironments
    23. CompanionAdSelectionSettings
    24. CompanionBackfillModes
    25. CompetitiveExclusionModes
    26. CustomContentAd
    27. CustomContentAdsManager
    28. Demographics
    29. FlashAd
    30. FlashAdCustomEvent
    31. FlashAdsManager
    32. FlashAsset
    33. FlashAssetTypes
    34. FlashCompanionAd
    35. HorizontalAlignment
    36. HtmlCompanionAd
    37. ImaSdkSettings
    38. MediaSelectionSettings
    39. VastCustomClick
    40. VastVideoAd
    41. VerticalAlignment
    42. VideoAd
    43. VideoAdBandwidth
    44. VideoAdsManager
    45. VideoDeliveryTypes
    46. VideoMimeTypes
    47. ViewModes

Fields

Methods

Interface that represents basic information that all ads share.

Properties

Name Type Description
id String

Ad ID is used to synchronize master ad and companion ads.

linear Boolean

Indicates whether the ad’s current mode of operation is linear or non-linear. If the value is true, it indicates that the ad is in linear playback mode; if false, it indicates non-linear mode. The player checks the adLinear property and updates its state according to the details of the ad placement. While the ad is in linear mode, the player pauses the content video. If adLinear is true initially, and the ad is a pre-roll (defined externally), the player may choose to delay loading the content video until near the end of the ad playback.

surveyUrl String

Returns the URL of request to the survey vendor.

traffickingParameters Object

If ad has custom metadata associated at the time of ad trafficking, this method allows retrieval of all metadata values.

type String

This method allows retrieval of the ad type name.

Instance Methods

Array getCompanionAds(environment:String, width:Number, height:Number, settings?:CompanionAdSelectionSettings)

Method returns an array of companionAds. The user must pass in required companion environment.

Parameter Type Description
environment String

the environment where a companion ad is loaded.

width Number

required width of the companion ad.

height Number

required height of the companion ad.

settings? CompanionAdSelectionSettings

CompanionAdSelectionSettings instance with criteria for selecting appropriate ads.

Back to top

interface AdBreak

Fields

Contains a list of ads managers for an ad break.

Properties

Name Type Description
adsManagers Array

The ads manager list stores all of the ads for the ad break. Once displayed, the ads manager is excluded from this list. The list might still contain other ads managers that have not been played.

startTime int

Start time within the ads list, in milliseconds. For post-roll ads that play after the content is completed, the start time is -1.

type String

Defines ad break type.

Back to top

class AdBreakTypes

Fields

Types of ad breaks indicating their timing within the playlist.

Constants

Name Value Description
MIDROLL midroll

Mid-roll ad break plays during the video content.

POSTROLL postroll

Post-roll ad break plays after the video content completes.

PREROLL preroll

Pre-roll ad break plays before the video content starts.

Back to top

class AdBreaksInitializedEvent

Fields

Constructors

This event is raised when the ads list mid-roll ad break is successfully loaded. You can register for this event on AdsListManager.

Constants

Name Value Description
INITIALIZED adBreaksInitialized

The AdBreaksInitializedEvent.INITIALIZED constant defines the value of the type property of the event object for a adBreaksInitialized event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
adBreaks A list of AdBreak instances that need to be played. There will be more than one ad break in the list if the user moved the video forward and skipped some of the mid-rolls.

Properties

Name Type Description
adBreaks Array

After the ads list items are loaded, each of them should play in the order they are found within the list. There will be more than one ad break in the list if the user skipped over several ad break points. It is the responsibility of the user of this API to show all skipped ad breaks or to show the first or last ad break in the list.

Constructors

AdBreaksInitializedEvent(adBreaks:Array, type?:String)

Parameter Type Description
adBreaks Array
type? String

Back to top

interface AdError

Fields

AdError surfaces information to the user about whether a failure occurred during ad loading or playing. The errorType accessor provides information about whether the error occurred during ad loading or ad playing.

Properties

Name Type Description
adIds Array

If ads are associated with the error, the ad IDs are returned in a list. For example, if there are multiple VAST wrappers, and an inline ad has an error during load or play, the list includes the ID of each wrapper. When there are multiple VAST wrappers, the order of ad IDs in the list matches the order of the wrappers. The first wrapper would correspond to the ad ID in position 0 on the list, the second wrapper would correspond to the ad ID in position 1, and so on.

errorCode int

Provides the error code for the error.

errorMessage String

Provides a short message describing the error.

errorType String

Tells the user whether a failure occurred during ad loading or playing. Type definitions can be found in AdErrorTypes.

innerError Error

If Flash error is available it is saved and can be retrieved using the accessor. The user can see more details about what went wrong by inspecting the error instance.

Back to top

class AdErrorCodes

Fields

This class defines possible error codes raised while loading or playing ads.

Constants

Name Value Description
ADSENSE_VAST_ADS_NOT_FOUND 4001

No VAST ads returned from the AdSense.

COMPANION_AD_LOADING_FAILED 3102

A companion ad failed to load or render.

INVALID_ARGUMENTS 3101

Invalid Arguments were provided to sdk methods.

LEGACY_FORMAT_ADS_NOT_FOUND 4001

No ads returned from the ad server for legacy ad formats.

VAST_ASSET_MISMATCH 3006

No assets were found in the VAST ad response that matched the capabilities of the video player.

VAST_INVALID_URL 3002

At least one VAST wrapper loaded and a subsequent wrapper or inline ad load has resulted in a 404 response code.

VAST_MALFORMED_RESPONSE 3003

The ad response was not recognized as a valid VAST ad.

VAST_MEDIA_ERROR 3004

A media file of a VAST ad failed to load or was interrupted mid stream.

VAST_TOO_MANY_REDIRECTS 3005

The maximum number of VAST wrapper redirects has been reached.

Back to top

class AdErrorEvent

Fields

This event is raised when an error occurs when loading an ad from the Google or DoubleClick servers. The types on which you can register for the event are AdsLoader and AdsManager.

Constants

Name Value Description
AD_ERROR adError

The AdErrorEvent.AD_ERROR constant defines the value of the type property of the event object for an error event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
adError An instance of AdError that carries details about an error that occurred.

Properties

Name Type Description
error AdError

userRequestContext Object

During ads load request it is possible to provide an object that is available once the ads load is complete or fails. One possible use case: ability to relate ads response to a specific request and use user request content object as the key for identifying the response. If an error occurred during ad load, you can find out which request caused this failure.

Back to top

class AdErrorTypes

Fields

This class defines possible error types for ad loading and playing.

Constants

Name Value Description
AD_LOAD_ERROR adLoadError

Indicates that the error was encountered when the ad was being loaded. Possible causes: there was no response from the ad server, malformed ad response was returned or ad request parameters failed to pass validation.

AD_PLAY_ERROR adPlayError

Indicates that the error was encountered after the ad loaded, during ad play. Possible causes: ad assets could not be loaded etc.

Back to top

class AdEvent

Fields

This event type is raised by the ad as a notification when the ad state changes and when users interact with the ad. For example, when the ad starts playing, is clicked on, etc. You can register for the various state changed events on AdsManager.

Constants

Name Value Description
ALL_ADS_COMPLETE allAdsComplete

The AdEvent.ALL_ADS_COMPLETE constant defines the value of the type property of the event object for a allAdsComplete event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

CLICK click

The AdEvent.CLICK constant defines the value of the type property of the event object for a click event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

COMPLETE complete

The AdEvent.COMPLETE constant defines the value of the type property of the event object for a complete event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

CONTENT_PAUSE_REQUESTED contentPauseRequested

The AdEvent.CONTENT_PAUSE_REQUESTED constant defines the value of the type property of the event object for a contentPauseRequested event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

CONTENT_RESUME_REQUESTED contentResumeRequested

The AdEvent.CONTENT_RESUME_REQUESTED constant defines the value of the type property of the event object for a contentResumeRequested event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

FIRST_QUARTILE firstQuartile

The AdEvent.FIRST_QUARTILE constant defines the value of the type property of the event object for a firstQuartile event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

MIDPOINT midpoint

The AdEvent.MIDPOINT constant defines the value of the type property of the event object for a midpoint event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

PAUSED paused

The AdEvent.PAUSED constant defines the value of the type property of the event object for a paused event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

RESTARTED restarted

The AdEvent.RESTARTED constant defines the value of the type property of the event object for a restarted event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

STARTED started

The AdEvent.STARTED constant defines the value of the type property of the event object for an started event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

STOPPED stopped

The AdEvent.STOPPED constant defines the value of the type property of the event object for a stopped event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

THIRD_QUARTILE thirdQuartile

The AdEvent.THIRD_QUARTILE constant defines the value of the type property of the event object for a thirdQuartile event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

USER_CLOSE userClose

The AdEvent.USER_CLOSE constant defines the value of the type property of the event object for a userClose event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

VOLUME_MUTED volumeMuted

The AdEvent.VOLUME_MUTED constant defines the value of the type property of the event object for a volumeMuted event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad id and other ad data.

Properties

Name Type Description
ad Ad

This method returns the Ad object to allow publishers to identify which ad is being displayed. Ad is an optional parameter and it might not be available all the time.

Back to top

class AdLoadedEvent

Fields

This event is raised when an ad has successfully pre-loaded all its assets and is ready to display. This method is called once per Ad (not AdsManager). You can register for this event on AdsManager.

Constants

Name Value Description
LOADED loaded

The AdLoadedEvent.LOADED constant defines the value of the type property of the event object for a loaded event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad data, if available.
adType Type of the ad. Present even if ad is not available.
netStream Instance of NetStream which will be used to play the ad, if available.

Properties

Name Type Description
ad Ad

This method returns the Ad object to allow publishers to identify which ad has just been loaded.

adType String

This method returns the ad type for the ad that raised this event. Ad type is always included in this event, even when ad instance might not be available.

netStream NetStream

This method returns the NetStream for a video ad to allow publishers to integrate it with controls like stop, pause, etc on their video players.

Back to top

class AdSizeChangedEvent

Fields

This event is raised when the size of an ad changes. This event is raised once per Ad (not AdsManager). One can register for this event on AdsManager.

Constants

Name Value Description
CLOSED_STATE closed

Ad is in the closed state. The ad size is the smallest which in most cases means that ad is in pill form.

EXPANDED_SIZE_STATE expanded

Ad size has been expanded.

MINIMIZED_SIZE_STATE minimized

Ad has been minimized, i.e., the ad has less content than the regular size of the ad but is not in the closed state. An example of the minimized state is when a text ad is showing only the headline rather than the whole content.

REGULAR_SIZE_STATE regular

Ad size is regular, not expanded or other state.

SIZE_CHANGED sizeChanged

The AdSizeChangedEvent.SIZE_CHANGED constant defines the value of the type property of the event object for a sizeChanged event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad which exposes ad data, if available.
adType Type of the ad. Present even if ad is not available.
state State that the ad is in i.e., whether it has been expanded, minimized, closed or is in regular state.
width Width of the ad after the size change.
height Height of the ad after the size change.

Properties

Name Type Description
ad Ad

This method returns the Ad object to allow publishers to identify which ad's size changed.

adType String

This method returns the ad type for ad which raised this event. Ad type is always included in this event, even when ad instance might not be available.

height Number

state String

width Number

Back to top

class AdTypes

Fields

This class defines possible ad type names.

Constants

Name Value Description
CUSTOM_CONTENT customContent

Custom content ads contain data that is not parsed/rendered by ads library.

FLASH flash

Flash ads are usually SWFs, loaded and rendered within Flash enviroment.

VAST VAST

VAST ads are standard format ads that contain URLs to video files.

VIDEO video

Video ads are proprietary format ads, that contain URLs to video files.

Back to top

class AdsListLoadedEvent

Fields

Methods

This event is raised when an ads list is successfully loaded. You can register for this event on AdsLoader.

Constants

Name Value Description
LOADED adsListLoaded

The AdsListLoadedEvent.LOADED constant defines the value of the type property of the event object for a adsListLoaded event. It is dispatched by AdsLoader instance when the requested ads list has been loaded from the server.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.

Properties

Name Type Description
userRequestContext Object

During the ads list request it is possible to provide an object that is available once the load is complete. One possible use case: ability to relate ads response to a specific request and use user request context object as a key for identifying the response.

Instance Methods

AdsListManager getAdsListManager(contentPlayback:Object)

Allows access to the ads list manager.

Parameter Type Description
contentPlayback Object

is a video playback object that will play video content. This object is required for the SDK to correctly identify when to request ads found in the ads list.

This content object can be one of the following:

Value Behavior
NetStream Uses NetStream to play the content.
FLVPlayback Uses the FLVPlayback component to play the content.

Note: FLVPlayback is available with Adobe Flash Creative Suite.

Object Object must have a property time which is the position of the playhead, in seconds. Any third party or custom video playback can be wrapped as follows: obj:Object = { time: customVideoPlayer.customWayToGetPlayheadTime } where customVideoPlayer and customWayToGetPlayheadTime should be substituted with your own variable references and names.

Back to top

interface AdsListManager

Fields

Methods

Provides access to the ad breaks within the ads list. Mid-rolls are loaded based on the time specified in the ads list, while pre-roll and post-roll initialization must be triggered by the call to initAdBreak. Subscribe to the AdBreaksInitializedEvent.INITIALIZED to receive ad breaks.

Properties

Name Type Description
adBreakInitializationTimeout uint

Specifies how many seconds to wait while initializing ads for ad breaks. Default is 5 seconds.

adBreaksStartTimes Array

List of times in milliseconds when mid-rolls are expected to play.

Instance Methods

uint countAdBreaks(adBreakType:String)

Provides a count of specific ad breaks.

Parameter Type Description
adBreakType String

is a type defined in AdBreakTypes.

Boolean hasAdBreak(adBreakType:String)

Indicates if ad break exists.

Parameter Type Description
adBreakType String

is a type defined in AdBreakTypes.

void initAdBreak(adBreakType:String)

Loads ads for a specific ad break. Pre-roll and post-roll initialization must be initiated by a publisher. Mid-roll ad break initialization is triggered automatically when the content playhead reaches the time specified in the ads list.

Parameter Type Description
adBreakType String

is a type defined in AdBreakTypes.

void unload()

Ads might have assets loaded at runtime that need to be properly removed at the time of ad completion. It is recommended to call unload when the last ad from the ads list has been displayed and ads list manager will not be used anymore.

Back to top

class AdsLoadedEvent

Fields

This event is raised when ads are successfully loaded from the Google or DoubleClick ad servers via an AdsLoader. You can register for this event on AdsLoader.

Constants

Name Value Description
ADS_LOADED adsLoaded

The AdsLoadedEvent.ADS_LOADED constant defines the value of the type property of the event object for a adsLoaded event.

The properties of the event object have the following values:

Property Value
bubbles false
cancelable false; there is no default behavior to cancel.
adsManager An instance of AdsManager which exposes ads and supports displaying ads.

Properties

Name Type Description
adsManager AdsManager

After ads are loaded from the Google or DoubleClick ad servers, the publisher needs to play these ads either in their own video player or in the Google-provided video player. This method returns an AdsManager object. The AdsManager supports playing ads and allows the publisher to subscribe to various events during ad playback In addition, it surfaces up individual ad data if a publisher needs to access it.

userRequestContext Object

During ads load request it is possible to provide an object that is available once the ads load is complete. One possible use case: ability to relate ads response to a specific request and use user request content object as a key for identifying the response.

Back to top

class AdsLoader

Fields

Methods

AdsLoader allows clients to request ads from the Google or DoubleClick ad server. To do so, users must register for the AdsLoadedEvent event and then request ads.

Properties

Name Type Description
competetiveExclusion Boolean

Indicate whether competetive exclusion is to be maintained over the lifetime of the AdsLoader. If the value is true, ads requests will include information about previous ads requests to maintain competetive exclusion. If the value is false, session information will be reset before each request and competetive exclusion will not be maintained. The default value is true.

settings ImaSdkSettings

Instance Methods

void contentComplete(contentId?:String)

Allows publishers to tell the SDK when any content completes, even content without ads. The SDK uses this method for better ad selection from the playlist.

Parameter Type Description
contentId? String

Optional ID for content. This is not the same as contentId property on the request object. It could be as simple as an incremental numeric value.

void requestAds(adsRequest:AdsRequest, userRequestContext?:Object)

This method takes an ad request object with properties populated with parameters to make an ad request to Google or DoubleClick ad server. For DoubleClick, adsRequestParameters supports either adTagUrl or separate targeting criteria values. If adTagUrl is provided it takes precedence over single targeting criteria values, which are ignored.

Parameter Type Description
adsRequest AdsRequest

instance with properties set for ad request.

userRequestContext? Object

object that is associated with the ads request. It can be retrieved when the ads are loaded.

Back to top

interface AdsManager

Fields

Methods

The AdsManager is responsible for playing ads served by Google or DoubleClick. The interface provides an abstraction around a concrete ad playback method that can play either Flash, video, image or text ads.

Properties

Name Type Description
adSlotHeight Number

Sets or gets the height of the rectangular area within which an ad is displayed. This value does not need to match the actual ad's height, but should be at least as large as the ad's height. You should set a new value whenever ad slot changes it's dimensions, for example a video player might have video controls that fade in and out, changing the available area for the ad slot.

adSlotWidth Number

Sets or gets the width of the rectangular area within which an ad is displayed. This value does not need to match the actual ad's width, but should be at least as large as the ad's width. You should set a new value whenever ad slot changes it's dimensions, for example a video player might have video controls that fade in and out, changing the available area for the ad slot.

ads Array

Ad list store data about individual ad that is returned by the ad server. The publisher can access every ad via this method.

type String

Returns the type of ads that can be played.

This function can return the following values:

Value Supported ads
"flash" Flash-in-Flash ads, AdSense for Video text or Flash overlays
"video" InStream video ads, AdSense for Video video ads.

Instance Methods

void load(container?:Object)

This method allows ads to pre-load assets to get ready for display. Video ads are pre-buffered while assets for Flash ads are downloaded. Ads aren't displayed until play() has been called. The container object is necessary for video ads that are being played in the publisher's video player and is not necessary for Flash ads.

This container object can be one of the following:

Value Behavior
null If null is passed for a video ad, this method throws an error because video ads require a video container object.
Video Uses NetStream to pre-buffer and play the video ad. Ignored for non-video ads.
FLVPlayback Uses the FLVPlayback component to pre-buffer and play the video ad. Ignored for non-video ads.

Note: FLVPlayback

is available with Adobe Flash Creative Suite.

If the load() method has already been invoked, then the container object used to pre-load the ads is used to play them as well, and the container object passed to this method is ignored.

Parameter Type Description
container? Object

Represents the display container used for ad pre-loading.

void play(container?:Object)

Ads are displayed when this method is invoked. Flash ads do not require any parameter because Stage is used as display area by default. Video ads require a container object parameter since they are played in the publisher's video player. Flash ads use Stage (if available) as the default container if container object parameter is not provided.

This container object can be one of the following:

Value Behavior
null If null is passed for a video ad, this method throws an error because video ads require a video container object.
Video Uses NetStream to play the video ad. Ignored for non-video ads.
FLVPlayback Uses the FLVPlayback component to play the video ad. Ignored for non-video ads.

Note: FLVPlayback is available with Adobe Flash Creative Suite.

DisplayObjectContainer Uses DisplayObjectContainer to render the Flash ads. Positioning is relative to the display object container provided. If null, or if no display object container has been provided, the stage (if available) is the default display object to render the ad. Once the display object container is provided, it can't be changed. This is required because ads often unload resources when Event.REMOVED_FROM_STAGE

is raised. This event is raised if the ad moves from one display object container to another.

If the load() method has already been invoked, then the container object used to pre-load the ads is used to play them and the container object passed to this method is ignored. If a different container object is passed to play, then an error is raised.

Note: If stage is expected to be used, make sure that your application grants the sdk access to it by using Security.allowDomain. It is best to pass a display object container which exists in the security sandbox that allows display objects (in this case, ads) to be added.

Parameter Type Description
container? Object

representing the display container to play the ad in.

void unload()

Ads might have assets loaded at runtime that need to be properly removed at the time of ad completion. This is especially true for Flash ads where unload results in assets removal from the display list. It is recommended to call unload when the ad has been displayed and will not be used anymore.

Back to top

class AdsManagerTypes

Fields

This class defines possible ads manager types.

Constants

Name Value Description
CUSTOM_CONTENT customContent

Custom content ads manager contains a list of custom content ads. It does not play them and it is publisher's responsibility to handle each ad individually by using custom content stored within the ad.

FLASH flash

Flash ads manager plays flash ads.

VIDEO video

Video ads manager plays video ads. It plays both proprietary format DoubleClick video ads and VAST ads.

Back to top

class AdsRequest

Fields

This object defines a set of inputs that can be used to request ads.

AdsRequest can contain values for:

  1. Making DoubleClick ads request using either adTagUrl or separate targeting criteria values.
  2. Making AdSense ads request using AdSense parameters.
  3. Making dynamic allocation ads request where ads request is made to DoubleClick and AdSense ad servers to select highest paying ads. Both DoubleClick and AdSense parameters must be provided in this scenario.

Properties

Name Type Description
adCommand String

This sets format returned by the ad server (XML, JavaScript, HTML, etc.) and also controls when to log an impression. Default is delayed impression and XML format ad request, "pfadx". Used only if adTagUrl is not set.

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making DoubleClick ads request.

adSafe String

Specifies the setting used to filter ads that display adult or pornographic content. Defaults to "high".

The following ad settings may be requested:

ValueDescription
high Returns family-safe ads. Does not return non-family-safe or adult sexual content ads.
medium Returns family-safe and non-family-safe ads (such as ads for gambling or prescription drugs). Does not return adult sexual content ads.
  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making AdSense ads request.

adServerHost String

This lets you change the ad server host that ads are requested from. For example, if a regional ad server is required to serve up ads, this can be set to "ad.uk.doubleclick.net". Used only if adTagUrl is not set.

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making DoubleClick ads request.

adSlotHeight Number

Required parameter that specifies the height of the rectangular area within which an ad is displayed. This value is used as one of the criteria for ads selection. This value does not need to match actual ad's height.

adSlotHorizontalAlignment String

Specifies the horizontal alignment of the rectangular area (ad slot) within publisher's content. Together with ad slot's width and height, this helps to select ads that best fit the ad slot.

adSlotVerticalAlignment String

Specifies the vertical alignment of the rectangular area (ad slot) within publisher's content. Together with ad slot's width and height, this helps to select ads that best fit the ad slot.

adSlotWidth Number

Required parameter that specifies the width of the rectangular area within which an ad is displayed. This value is used as one of the criteria for ads selection. This value does not need to match actual ad's width.

adTagUrl String

Specifies full URL to use for ads loading from DoubleClick ad server. This takes precedence over single targeting criteria values such as site, zone, etc.

  • Required parameter for making dynamic allocation ads request.
  • Required parameter for making DoubleClick ads request.

adTest String

Specifies whether this is a test implementation. Possible values are "on" or "off". If set to "on", impressions and clicks will not be recorded in AFV account. This parameter MUST be used during testing. Defaults to "off" if not set.

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making AdSense ads request.

adTimePosition int

The number of milliseconds into the video the ad will play. Defaults to a midroll value ("1", specifically). This is the most common scenario, where an overlay ad is displayed just as the content starts playing.

The following ad settings may be requested:

ValueDescription
-1 Specifies a postroll ad that will be displayed at the end of content.
0 Specifies a preroll ad that will be displayed before content starts playing.
Any positive integer Specifies a midroll ad that will be displayed during content. The value should be how many milliseconds into the content this ad will be displayed.
  • Optional parameter for making AdSense ads request.

adType String

The type of ad being requested. Defaults to AdsRequestType.VIDEO if not set.

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making AdSense ads request.

adUnit String

Represents the AdSense/Ad Exchange ad slot ID. This value is generated by the publisher frontend and identifies the ad slot(ad unit) and its settings. Only one ad slot may be passed in per ad request.

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making AdSense ads request.

age uint

Specifies the age of the user. Exact user age is supported as well as an age group defined in the Demographics class.

  • Optional parameter for making AdSense ads request.

channels Array

An array of strings representing AdSense targeting/reporting channel IDs. Up to five channels may be passed in per ad request.

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making AdSense ads request.

cmsId String

Content management system ID.

  • Required parameter for making video content-aware Google Dfp ads request.

contentId String

Specifies the publisher's unique identifier for content.

  • Required parameter for making AdSense ads request.
  • Required parameter for making video content-aware Google Dfp ads request.
  • Required parameter for making dynamic allocation ads request.

descriptionUrl String

The full URL of an HTML page that describes the video.

  • Optional parameter for making dynamic allocation ads request in Dart.
  • Optional parameter for making AdSense ads request.

disableCompanionAds Boolean

Indicates whether companion ads should be displayed. By default, HTML companions are displayed.

extraTargetingKeyValues Object

For Google Dfp requests, the parameter is used to pass key value pairs for targeting. The keys, values, and the entire parameter are URL escaped. For example, for the input age=18&sex=male, the output will be age%3D18%26sex%3Dmale.

For DoubleClick requests, each element will be included in the ad tag URL in the following form: http://.../..;key1=value1;key2=value2;... Used only if adTagUrl is not set.

  • Optional parameter for making Google Dfp ads request.
  • Optional parameter for making DoubleClick ads request.
  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making AdSense ads request.

gender uint

Specifies the gender of the user, as defined in the Demographics class.

  • Optional parameter for making AdSense ads request.

host String

Host ID to use for 3-way revenue sharing.

  • Optional parameter for making AdSense ads request.

hostChannels Array

An array of strings representing AdSense targeting/reporting channel IDs for the host.

  • Optional parameter for making AdSense ads request.

hostTierId Number

Tier ID used to specify the level of revenue sharing between the publisher and host.

  • Optional parameter for making AdSense ads request.

language String

A language code used to request ads in that language. This may be any ISO 639-1 (two-letter) or ISO 639-2 (three-letter) code. Please refer here for a list of valid codes: http://www.loc.gov/standards/iso639-2/php/English_list.php

  • Optional parameter for making AdSense ads request.

maxTotalAdDuration int

Specifies the maximum video or audio ad length that should be returned. Must be specified in milliseconds. Defaults to 100 seconds if not set.

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making AdSense ads request.

mediaUrl String

The full URL where the content's media file is located (can be FLV or another format).

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making AdSense ads request.

minTotalAdDuration int

Specifies the minimum video or audio ad length that should be returned. In conjunction with maxTotalAdDuration, specifies a range for ad duration. Must be specified in milliseconds. Defaults to 0 if not set.

  • Optional parameter for making AdSense ads request.

numRedirects uint

Specifies the maximum number of redirects before the request to load ads is discarded. By default, this is set to 4. The higher the number of redirects, the more number of network requests are made to get the actual ad. This can limit the usability of the ad due to load time. This applies to VAST (Video Ad Serving Template) ad loading to limit the number of VAST wrappers that are loaded. In the future, it may be applied to other types of redirected ads.

ordinal String

This lets you set up an ordinal number that is used in the DoubleClick ad tag URL. If this not set, a random number is generated to serve as the value for ord.

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making DoubleClick ads request.

protocol String

By default, protocol used is "http". Other supported protocols are "https" and "rtsp". Used only if adTagUrl is not set.

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making DoubleClick ads request.

publisherId String

The AFV publisher's client ID (provided by AdSense).

  • Required parameter for making AdSense ads request.

site String

Specifies site of target ad. Used only if adTagUrl is not set.

  • Required parameter for making dynamic allocation ads request.
  • Required parameter for making DoubleClick ads request.

size String

Specifies size of target ad. The format is "width x height", for example: "728x90". Width and height values do not need to match ad slot's width and height. Used only if adTagUrl is not set.

  • Required parameter for making dynamic allocation ads request.
  • Required parameter for making DoubleClick ads request.

uniqueAds Boolean

If enabled, ensures that unique ads are returned across several ad requests for the same content ID. Disabled by default for non-audio ads request. Always enabled for AdSense audio ads requests.

  • Optional parameter for making AdSense ads request.

zone String

Zone provides filtering in addition to site if necessary. Used only if adTagUrl is not set.

  • Optional parameter for making dynamic allocation ads request.
  • Optional parameter for making DoubleClick ads request.

Back to top

class AdsRequestType

Fields

This class defines the ad types that is useful to make dynamic allocation and AdSense ads requests.

Constants

Name Value Description
FULL_SLOT full_slot

Represents both text full slot and graphical full slot ads. The full slot ad refers to the ad that is rendered into the complete area of the video player.

GRAPHICAL graphical

Graphical overlay or graphical full slot ads.

GRAPHICAL_FULL_SLOT graphical_full_slot

Graphical full slot ads only.

GRAPHICAL_OVERLAY graphical_overlay

Graphical overlay ads only.

OVERLAY overlay

Represents both text overlays and graphical overlays. The overlay ad refers to the ad that is rendered partially over the video player area. The most popular overlay is the bottom overlay ad which covers one-third of the video.

TEXT_FULL_SLOT text_full_slot

Text full slot ads only.

TEXT_OR_GRAPHICAL text_or_graphical

Text overlays, text full slot, graphical overlay, or graphical full slot ads.

TEXT_OVERLAY text_overlay

Text overlay ads only.

VIDEO video

Pre-, mid-, post-roll video ads.

Back to top

interface CompanionAd

Fields

Interface that represents basic information shared by all companion ads.

Properties

Name Type Description
environment String

Returns the environment where the companion ad would be loaded.

Back to top

class CompanionAdEnvironments

Fields

This class defines possible environments where a companion ad is loaded and/or served.

Constants

Name Value Description
FLASH flash

Flash companion ads are loaded and rendered within Flash enviroment. These can be static resources like image or simple swfs or Flash-in-flash companion ads.

HTML html

HTML ads are loaded and rendered within HTML enviroment. These can be html resources, iframe resources or static resources like image or simple swfs.

Back to top

class CompanionAdSelectionSettings

Fields

This class defines various criteria for selecting companion ads.

Constants

Name Value Description
COMPANION_SIZE_EXACT_FIT CompanionSize_ExactFit

Setting for returning companion ads that exactly fit the size criteria.

COMPANION_SIZE_IGNORE CompanionSize_Ignore

Setting for ignoring companion size criteria.

COMPANION_SIZE_NEAR_FIT CompanionSize_NearFit

Setting for returning companion ads that nearly fit the size criteria.

VAST_CREATIVE_TYPE_ALL VASTCreativeType_All

Setting for choosing all creative types.

VAST_CREATIVE_TYPE_FLASH VASTCreativeType_Flash

Setting for choosing Flash creative type.

VAST_CREATIVE_TYPE_IMAGE VASTCreativeType_Image

Setting for choosing Image creative type.

VAST_RESOURCE_TYPE_ALL VASTResourceType_All

Setting for choosing all resource types.

VAST_RESOURCE_TYPE_HTML VASTResourceType_HTML

Setting for choosing html resource type.

VAST_RESOURCE_TYPE_IFRAME VASTResourceType_IFrame

Setting for choosing iframe resource type.

VAST_RESOURCE_TYPE_STATIC VASTResourceType_Static

Setting for choosing static resource type.

Properties

Name Type Description
creativeType String

Creative or MIME type of the companion ad that should be returned. This is applicable for VAST ads.

nearFitPercent Number

Minimum percent of requested size that a companion ad must be to be considered near fit. The range is 0-100. Companion ads within the nearFitPercent size range are considered near fit. Default is 90%.

resourceType String

Resource type of the companion ad that should be returned. This is applicable for VAST ads.

sizeCriteria String

Size criteria for selecting companion ads.

Back to top

class CompanionBackfillModes

Fields

Defines a set of constants for the companion backfill setting. This setting indicates whether companions should be backfilled in various scenarios. The default value is CompanionBackfillModes.ALWAYS. Note that client-side companion backfill requries tagging your companions properly with Google Publisher Tag (GPT). To enable backfill, the following changes to standard GPT setup are necessary:


                  ...
                  var slot1 = googletag.defineSlot('/1234/adunit', [300, 250], 'slot-div');
                  slot1.addService(googletag.companionAds()).addService(googletag.pubads());
                  ...
                  googletag.companionAds().setRefreshUnfilledSlots(true);
                  ...
                  googletag.enableServices();
                  
For autoplay videos, another change is recommended to prevent companion slots from being preloaded and then immediately replaced with companions.

                  googletag.pubads().disableInitialLoad();
                  ...
                  googletag.enableServices();
                  

Constants

Name Value Description
ALWAYS always

Companion backfill will be attempted in all situations, even when there is no master ad returned.

ONLY_FOR_MASTER_AD onlyForMasterAd

Companion backfill will be attempted if there is a master ad with fewer companions than there are companion slots. The missing companions will be backfilled.

Back to top

class CompetitiveExclusionModes

Fields

Defines a set of constants for competitive exclusion settings. Indicate whether competitive exclusion is to be maintained over the lifetime of the AdsLoader. The default value is CompetitiveExclusionModes.ON.

Constants

Name Value Description
LEGACY_DFP legacyDfp

Legacy DFP companion ad tags will be generated by maintaining same ord and incrementing tile numbers.

OFF off

Session information will be reset before each request and competitive exclusion will not be maintained.

ON on

Ads requests will include information about previous ads requests to maintain competitive exclusion.

Back to top

interface CustomContentAd

Fields

Custom ad for which there is no built-in support. The ad contents are surfaced as a string that usually contains XML or JSON. It is up to the publisher to render the ad.

Properties

Name Type Description
content String

Custom ad provides its content which can be in any format: XML, JSON, etc

Back to top

interface CustomContentAdsManager

Methods

This interface extends AdsManager with methods that are applicable to custom ads.

Instance Methods

void displayCompanions()

Display companions using an underlying Google Publisher Tagging (GPT) rendering service. All the slots defined by GPT will be populated for the master ad. Note that this method is only supported for custom ads trafficked from DoubleClick ad servers.

Back to top

class Demographics

Fields

This class defines user demographics constants that can be used for requesting ads.

Constants

Name Value Description
AGE_17_AND_UNDER 1000

Represents persons 17 years old and younger.

AGE_18_TO_24 1001

Represents persons 18 to 24 years old.

AGE_25_TO_34 1002

Represents persons 25 to 34 years old.

AGE_35_TO_44 1003

Represents persons 35 to 44 years old.

AGE_45_TO_54 1004

Represents persons 45 to 54 years old.

AGE_55_TO_64 1005

Represents persons 55 to 64 years old.

AGE_65_AND_OVER 1006

Represents persons 65 years old and older.

GENDER_FEMALE 2

Represents female persons.

GENDER_MALE 1

Represents male persons.

Back to top

interface FlashAd

Fields

Methods

This type represents a Flash ad.

Properties

Name Type Description
asset FlashAsset

FlashAd consists of a physical swf file that is represented as an instance of a FlashAsset.

Instance Methods

void reportEvents()

Ad might accumulate reporting events before sending all of them to the ad server. It is permitted to force these events to be sent to the ad server before the scheduled time, but only once per ad play. Subsequent invocations of this method will do nothing.

Back to top

class FlashAdCustomEvent

Fields

This event is raised when a Flash ad dispatches an event defined by the ad designer. It is an event notification about activities within the ad that are not covered by the standard events. You can register for this event on FlashAdsManager.

Constants

Name Value Description
CUSTOM_EVENT customEvent

The AdEvent.CUSTOM_EVENT constant defines the value of the type property of the event object for a customEvent event.

The properties of the event object have the following values:

PropertyValue
bubbles false
cancelable false; there is no default behavior to cancel.
ad An instance of Ad that exposes ad ID and other ad data.
eventContext An object that contains data about custom activity within the ad.
eventName Custom event name as defined by the ad designer.

Properties

Name Type Description
eventContext Object

All the data associated with the custom event can be accessed through the event context object.

eventName String

Ad designer can dispatch custom event from within the ad. This event has name made available through eventName property.

Back to top

interface FlashAdsManager

Fields

Methods

This interface extends AdsManager with methods that are applicable to Flash ads.

Properties

Name Type Description
decoratedAd Boolean

If true, the ad will be displayed with Google-provided chrome as applicable to the type of ad, such as a close button, reopen pill, show/hide animations, and background.

Value Description
true The ad will be shown with Google's decorations. This is the default.
false Only the creative and attribution text will be shown.

Note: This API is only available for version 2.1.0+ of the SDK.

volumeAd Number

Sets or gets volume for an ad that supports audio.

x Number

Sets or gets Flash ad(s) display area's coordinate. If ad is smaller than the area for displaying the Flash ad, then the alignment value is also used to best position the ad.

y Number

Sets or gets Flash ad(s) display area's y coordinate. If ad is smaller than the area for displaying the Flash ad, then the alignment value is also used to best position the ad.

Instance Methods

void resize(width:Number, height:Number, viewMode:String)

Following a resize of the ad UI container, the resize allows ads to scale or reposition themselves within the display area. The width and height always match the maximum display area allotted for the ad, and resize is only called when the player changes its video content container sizing. For ads that expand or go into linear mode, the entire video content display area is given in the width and height parameters, as these ads may take up that entire area when in linear or expanded mode. The player should mask the ad to the provided width and height. The player may set the x and y properties of the ads manager to position ads.

Parameter Type Description
width Number

Allocated for the ad display.

height Number

Allocated for the ad display.

viewMode String

Current view mode of the player. May not be applicable to all ads.

Back to top

interface FlashAsset

Fields

Instances of FlashAd may contain one or more asset SWFs. Each of these physical files is represented by an instance of a FlashAsset. This class lets you manipulate positioning and display at the lowest level, directly on a FlashAsset instance.

Properties

Name Type Description
expandedHeight Number

expandedWidth Number

frameRate Number

height Number

type String

width Number

x Number

Sets or gets Flash assets's x coordinate.

y Number

Sets or gets Flash assets's y coordinate.

Back to top

class FlashAssetTypes

Fields

This class defines possible ad asset type names. This defines the behavior of a Flash asset.

Constants

Name Value Description
AUDIO Audio

Audio: audio played within the Flash enviroment.

EXPANDING Expanding

Expanding: Expands in size and direction upon user interaction.

FLOATING Floating

Floating: Appears in any size or shape and moves above web page content.

IN_PAGE In-Page

In-Page: Standard polite loading Flash banners, rectangles, skyscrapers and leaderboards.

STATIC_IMAGE Static-Image

Static image: consist of one static image.

STATIC_SWF Static-Swf

Static swf: a SWF rendered within the Flash enviroment.

TEXT Text

Text: consist of several lines of text with optional image.

Back to top

interface FlashCompanionAd

Fields

x, y

Methods

Interface that represents information of a flash companion ad. The companion ad can be loaded and played on the publisher's display object container.

Properties

Name Type Description
x Number

Gets and sets the flash companion ad display area's x coordinate.

y Number

Gets and sets the flash companion ad display area's y coordinate.

Instance Methods

void load()

Loads the flash companion ad.

void play(container:DisplayObjectContainer)

Plays the flash companion ad in the display object container. If the ad resource is not already loaded, it will be loaded before playing.

Parameter Type Description
container DisplayObjectContainer

A display object container where the flash companion ad would be rendered.

void unload()

Unloads and removes the flash companion ad from the display object container. It is recommended to call unload when the companion ad has been displayed and will not be used anymore.

Back to top

class HorizontalAlignment

Fields

Defines possible horizontal alignment values used to indicate the alignment of ads.

Constants

Name Value Description
CENTER center

Ads should be aligned to the center.

LEFT left

Ads should be aligned to the left.

RIGHT right

Ads should be aligned to the right.

Back to top

interface HtmlCompanionAd

Fields

An HTML companion ad is a static resource like image or swf or an html code that can be rendered in an html environment.

Properties

Name Type Description
content String

Returns companion ad's html content. The content is returned to the publisher and can be rendered in an iframe. Escapes the characters in the content using EcmaScript string rules. Alert: Do not modify the HTML snippet in any way. The terms of your agreement prohibit this and we can't make exceptions because, when altered, the code for companion ad rendering could break.

Back to top

interface ImaSdkSettings

Fields

Defines global SDK settings that affect ads requests, companion rendering, etc.

Properties

Name Type Description
companionBackfill String

The default value is CompanionBackfillModes.ALWAYS.

competitiveExclusion String

The default value is CompetitiveExclusionModes.ON.

Back to top

class MediaSelectionSettings

Fields

This object defines a set of inputs that can be used to select the closest matching media URL from a VAST video ad response.

We match the following settings in order:

  1. mimeTypes
  2. delivery
  3. bandwidth
Information about the VAST standard can be found at http://www.iab.net.

Properties

Name Type Description
bandwidth String

Specifies the bandwidth levels that the publisher wants to display. Valid values for this parameter are "low", "medium" and "high".

delivery String

Specifies the delivery types that the publisher wants to display. Valid values for this parameter are "progressive" and "streaming". Default is "progressive".

mimeTypes Array

Specifies the mime types of media files that the publisher can display.

Back to top

interface VastCustomClick

Fields

This object defines the information included in a VAST response to represent custom click tracking URLs. Information about the VAST standard can be found at http://www.iab.net.

Properties

Name Type Description
id String

Identifier included on tracking URL that publishers can use as desired.

url String

Tracking URL to request on custom events such as hotspotted video.

Back to top

interface VastVideoAd

Fields

This type represents a video ad that conforms to the Video Ad Serving Template (VAST) standard. Digital VAST guidelines can be found here.

Properties

Name Type Description
adSystem String

Returns the source ad server information included in the VAST ad response.

customClicks Array

Returns an array of VastCustomClick objects that expose custom click tracking information found in the VAST ad response. This is exposed to users since the library does not process this information.

description String

Description of the ad included in the VAST ad response.

Back to top

class VerticalAlignment

Fields

Defines possible vertical alignment values used to indicate the alignment of ads.

Constants

Name Value Description
BOTTOM bottom

Ads should be aligned to the bottom.

CENTER center

Ads should be aligned to the center.

TOP top

Ads should be aligned to the top.

Back to top

interface VideoAd

Fields

This type represents a video ad. It can be a streaming or progressive ad. The properties and methods on this interface are intended to provide information to the user about the video. They also allow the user to configure certain settings per video ad such as custom click tracking for a particular video ad.

Properties

Name Type Description
ISCI String

Returns the ISCI (Industry Standard Commercial Identifier) code for an ad.

author String

currentTime Number

deliveryType String

Returns the delivery type of the video.

duration Number

mediaUrl String

skippable Boolean

Indicates whether the video ad should display a skip button, in which case the skipUiContainer must be set on the VideoAdsManager.

title String

Back to top

class VideoAdBandwidth

Fields

This class defines constants for a video ad bandwidth selection.

Note: DoubleClick only.

Constants

Name Value Description
HIGH high

High bandwidth is a good choice for cable, FIOS, or T1 users.

LOW low

Low bandwidth is a good choice for dialup users.

MEDIUM medium

Medium bandwidth is a good choice for DSL users.

Properties

Name Type Description
DEFAULT String

Default bandwidth used for selecting which media file to play in a video ad.

Back to top

interface VideoAdsManager

Fields

This interface extends AdsManager with methods that are applicable to video ads. This class supports VAST (Video Ad Serving Template) video ads, DoubleClick InStream video ads and AdSense video ads.

Properties

Name Type Description
clickTrackingElement InteractiveObject

Click tracking must be enabled on the video player area before the ad can be played. Publishers often want to customize which UI element should track clicks. For example, a designer may want to track clicks on a specific portion of the stage or a button. This property allows getting and setting the element on which clicks are tracked.

mediaSelectionSettings MediaSelectionSettings

This property gets and sets the media selection settings set by users. Media selection settings are used to choose which media files are used in the video ads since the ads may contain URLs for multiple media files. Publishers can specify which bandwidths, mime types and delivery modes they support/prefer. The ads manager finds the closest matching media file to the publisher-specified settings. If no match is found, the ads manager falls back to any valid media URL. This property is ignored for ads that do not contain multiple media files. If the publisher has not specified media selection settings, the default settings are used.

skipUiContainer DisplayObjectContainer

If a video ad is skippable, a skipUiContainer must be set on the video ads manager. The UI for skippable vidoe ads will be placed in this container. If a video ad is skippable and the skipUiContainer is not set, attempting to call play on the ad will yield an error.

Back to top

class VideoDeliveryTypes

Fields

This class defines constants for video delivery to the video player.

Constants

Name Value Description
PROGRESSIVE progressive

Videos are downloaded using HTTP.

STREAMING streaming

Videos are streamed from a streaming server.

Properties

Name Type Description
DEFAULT String

Default mode that will be used for selecting which media file to play in a video ad.

Back to top

class VideoMimeTypes

Fields

This class defines constants for video MIME types selection. This is used mainly for VAST media selection.

Constants

Name Value Description
FLV video/x-flv

If URL to a FLV (Flash Video) video is included in VAST response, this constant allows selection of FLV video file as the ad video.

MP4 video/x-mp4

Since Flash Player 9 Update 3 Flash Video also supports the MPEG-4 international standard, if URL to a MPEG-4 video is included in VAST response, this constant allows selection of MPEG-4 video file as the ad video.

Properties

Name Type Description
DEFAULT_MIMETYPES Array

Default MIME types used for selecting which media file to play in a video ad.

Back to top

class ViewModes

Fields

viewMode indicates the current viewing mode for ads as defined by the publisher. viewMode is applicable for AdSense and VPAID ads only.

Constants

Name Value Description
FULLSCREEN fullscreen

Fullscreen VPAID ad view mode.

NORMAL normal

Normal VPAID ad view mode.

THUMBNAIL thumbnail

Thumbnail VPAID ad view mode.

Back to top

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.