google. ima
The google.ima
namespace provides access to the SDK's classes, interfaces,
enumerations, and properties.
Classes
Ad
An ad class that's extended by classes representing different ad types.
AdCuePoints
The cue point list represents a time-schedule of ad breaks. Note that individual ads in the ad break are not included in the schedule.
AdDisplayContainer
This class represents a container for displaying ads. The SDK will automatically create structures inside the containerElement parameter to house video and overlay ads.
When an instance of this class is created, it creates an IFRAME in the
containerElement and loads the SDK core. This IFRAME must be preserved
in order for the SDK to function properly. Once all ads have been played
and the SDK is no longer needed, use the destroy()
method
to unload the SDK.
The containerElement parameter must be an element that is part of the DOM. It is necessary to correctly position the containerElement in order for the ads to be displayed correctly. It is recommended to position it above the content video player and size it to cover the whole video player. Refer to the SDK documentation for details about recommended implementations.
Note: It is always necessary to call the
initialize()
method in code that was directly invoked by a
user action (such as a click or tap).
AdError
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.
AdErrorEvent
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.
AdEvent
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, and more. You can register for the various state changed events on AdsManager.
AdMetadataEvent
This class is deprecated. Use AdsManager.getCuePoints() API. A specific ad event that carries metadata.
AdPodInfo
An ad may be part of a pod of ads. This object exposes metadata related to that pod, such as the number of ads in the pod and ad position within the pod.
The getTotalAds
API contained within this object is often
correct, but in certain scenarios, it represents the SDK's best guess. See
that method's documentation for more information.
AdProgressData
This object exposes information about the current progress as an ad is playing.
AdsLoader
AdsLoader allows clients to request ads from ad servers. To do so, users must register for the AdsManagerLoadedEvent event and then request ads.
AdsManager
Provides the outer public API to the publisher and communicates with the inner instance of ads manager.
AdsManagerLoadedEvent
This event is raised when ads are successfully loaded from the Google or DoubleClick ad servers through an AdsLoader. You can register for this event on AdsLoader.
AdsRenderingSettings
Defines parameters that control the rendering of ads.
AdsRequest
A class for specifying properties of the ad request.
CompanionAd
Represents a companion ad.
CompanionAdSelectionSettings
CompanionAdSelectionSettings object is used to define the selection criteria when calling the ima.Ad.getCompanionAds function.
ImaSdkSettings
This class contains SDK-wide settings.
UniversalAdIdInfo
This object exposes information about the universal ad ID associated with the creative, including the ad ID value and the ad ID registry.
Namespace
secureSignals
Enumerations
OmidAccessMode
string
Available access modes for OMID for Web, which control how much the verification script can access.
Value |
|
---|---|
LIMITED |
The verification script is sandboxed and cannot access the creative or publisher page, and cannot directly confirm what publisher domain it is on. |
DOMAIN |
The verification script is sandboxed and cannot access the creative or publisher page. However, the script is loaded in such a way that it can directly confirm what publisher domain it is on. |
FULL |
The verification script has direct access to the creative and the publisher page. |
OmidVerificationVendor
number
Identifies an OMID verification vendor. Vendors are listed in alphabetical order.
Value |
|
---|---|
COMSCORE |
|
DOUBLEVERIFY |
|
|
|
INTEGRAL_AD_SCIENCE |
|
MEETRICS |
|
MOAT |
|
NIELSEN |
|
PIXELATE |
|
OTHER |
The default vendor to use when the script URL doesn't match any other vendor. |
UiElements
string
Enum specifying different UI elements that can be configured to be displayed or hidden. These settings may be ignored for AdSense and ADX ads.
Value |
|
---|---|
AD_ATTRIBUTION |
Displays the "Ad" text in the ad UI. Must be present to show the countdown timer. |
COUNTDOWN |
Ad attribution is required for a countdown timer to be displayed. Both
|
ViewMode
string
Enum specifying different VPAID view modes for ads.
Value |
|
---|---|
NORMAL |
Normal ad view mode. |
FULLSCREEN |
Fullscreen ad view mode. Indicates to the ads manager that the publisher considers the current AdDisplayContainer arrangement as fullscreen (for example, simulated fullscreen). This does not cause the ads manager to enter fullscreen. |
- Deprecated
Properties
OmidAccessMode
string
Available access modes for OMID for Web, which control how much the verification script can access.
Value |
|
---|---|
LIMITED |
The verification script is sandboxed and cannot access the creative or publisher page, and cannot directly confirm what publisher domain it is on. |
DOMAIN |
The verification script is sandboxed and cannot access the creative or publisher page. However, the script is loaded in such a way that it can directly confirm what publisher domain it is on. |
FULL |
The verification script has direct access to the creative and the publisher page. |
OmidVerificationVendor
number
Identifies an OMID verification vendor. Vendors are listed in alphabetical order.
Value |
|
---|---|
COMSCORE |
|
DOUBLEVERIFY |
|
|
|
INTEGRAL_AD_SCIENCE |
|
MEETRICS |
|
MOAT |
|
NIELSEN |
|
PIXELATE |
|
OTHER |
The default vendor to use when the script URL doesn't match any other vendor. |
UiElements
string
Enum specifying different UI elements that can be configured to be displayed or hidden. These settings may be ignored for AdSense and ADX ads.
Value |
|
---|---|
AD_ATTRIBUTION |
Displays the "Ad" text in the ad UI. Must be present to show the countdown timer. |
COUNTDOWN |
Ad attribution is required for a countdown timer to be displayed. Both
|
ViewMode
string
Enum specifying different VPAID view modes for ads.
Value |
|
---|---|
NORMAL |
Normal ad view mode. |
FULLSCREEN |
Fullscreen ad view mode. Indicates to the ads manager that the publisher considers the current AdDisplayContainer arrangement as fullscreen (for example, simulated fullscreen). This does not cause the ads manager to enter fullscreen. |
- Deprecated
settings
non-null ImaSdkSettings
The global singleton settings instance.