An interface consistent with the VPAID specification.
Implementing Classes
Properties
Name | Type | Description | Default |
---|---|---|---|
adCompanions | String | Returns a VAST-compatible XML snippet for companion ads. |
|
adDuration | Number | Returns the total number of seconds for which the creative is expected to display. A value of -1 indicates that this feature is not supported, as with a non-linear creative. A value of -2 indicates that the duration is unknown, as would be the case if a user were interacting with the creative. |
|
adExpanded | Boolean | Returns true if the ad is currently expanded. |
|
adHeight | Number | Returns the height of the ad in pixels. |
|
adIcons | Boolean | Returns True if the ad unit includes ad icons. Currently not supported. |
|
adLinear | Boolean | Returns true if the ad is currently linear. |
|
adRemainingTime | Number | Returns the number of seconds remaining in the creative. A return value of -1 indicates that this value is not supported (such as in the case of a non-linear creative). A value of -2 indicates that the remaining time is unknown, as would be the case if a user were interacting with the creative. |
|
adSkippableState | Boolean | Returns true if the ad can currently be skipped. |
|
adVolume | Number | Gets and sets the volume of the creative. The values should always be between 0 and 1, unless volume is not supported in which case get returns -1. |
|
adWidth | Number | Returns the width of the ad in pixels. |
|
Instance Methods
Defined in com.google.ads.studio.vpaid:IVpaid
collapseAd()
:
void
Tells the ad to collapse to its smallest state.
expandAd()
:
void
Tells the ad to expand if expansion is supported.
handshakeVersion(playerVPAIDVersion:String)
:
String
Initializes the ad to use the correct VPAID version. Returns the supported version of VPAID.
initAd(width:Number, height:Number, viewMode:String, desiredBitrate:Number, creativeData:String='', environmentVars:String='')
:
void
Initializes the creative with parameters from the VPAID environment.
pauseAd()
:
void
Tells the ad to pause playback. When the ad is paused, it's possible it will no longer be visible.
resizeAd(width:Number, height:Number, viewMode:String)
:
void
Tells the ad to resize to the given dimensions.
resumeAd()
:
void
Tells the ad to resume playback.
skipAd()
:
void
Tells the ad that it should stop playing because the user chose to skip it.
startAd()
:
void
Tells the ad to start playing.
stopAd()
:
void
Tells the ad to stop playing and unload.