*** ** * ** ***

Extends `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface` A class for specifying properties of the ad request.

| Constructors ||
|---|---|
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.constructor` | Constructor. |

| Properties ||
|---|---|
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.adsResponse` | Specifies a VAST 2.0 document to be used as the ads response instead of making a request through an ad tag url. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.adsResponse` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.adTagUrl` | Specifies the ad tag url that is requested from the ad server. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.adTagUrl` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.contentDuration` | Specifies the duration of the content in seconds to be shown. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.contentDuration` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.contentKeywords` | Specifies the keywords used to describe the content to be shown. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.contentKeywords` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.contentTitle` | Specifies the title of the content to be shown. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.contentTitle` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.forceNonLinearFullSlot` | Forces non-linear AdSense ads to render as linear fullslot. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.forceNonLinearFullSlot` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.linearAdSlotHeight` | Specifies the height of the rectangular area within which a linear ad is displayed. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.linearAdSlotHeight` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.linearAdSlotWidth` | Specifies the width of the rectangular area within which a linear ad is displayed. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.linearAdSlotWidth` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.liveStreamPrefetchSeconds` | Specifies the maximum amount of time to wait in seconds, after calling requestAds, before requesting the ad tag URL. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.liveStreamPrefetchSeconds` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.nonLinearAdSlotHeight` | Specifies the height of the rectangular area within which a non linear ad is displayed. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.nonLinearAdSlotHeight` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.nonLinearAdSlotWidth` | Specifies the width of the rectangular area within which a non linear ad is displayed. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.nonLinearAdSlotWidth` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.omidAccessModeRules` | Settings object for mapping verification vendors to OMID Access Modes. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.omidAccessModeRules` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.pageUrl` | Specifies the full url of the page that will be included in the Google ad request for targeting purposes. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.pageUrl` property |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.vastLoadTimeout` | Override for default VAST load timeout in milliseconds for a single wrapper. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.vastLoadTimeout` property |

| Methods ||
|---|---|
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.setAdWillAutoPlay` | Notifies the SDK whether the player intends to start the content and ad in response to a user action or whether it will be automatically played. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.setAdWillAutoPlay` method |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.setAdWillPlayMuted` | Notifies the SDK whether the player intends to start ad while muted. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.setAdWillPlayMuted` method |
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest#google.ima.AdsRequest.setContinuousPlayback` | Notifies the SDK whether the player intends to continuously play the content videos one after another similar to TV broadcast. ###### Inherited from the `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsRequestInterface#google.ima.AdsRequestInterface.setContinuousPlayback` method |

## Constructors

*** ** * ** ***

### constructor

`new AdsRequest(): https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest` Constructor.

| Returns ||
|---|---|
| `https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRequest` |   |

## Properties

*** ** * ** ***

### adsResponse

`adsResponse: string | Document` Specifies a VAST 2.0 document to be used as the ads response instead of making a request through an ad tag url. This can be useful for debugging and other situations where a VAST response is already available.

This parameter is optional.  

*** ** * ** ***

### adTagUrl

`adTagUrl: string` Specifies the ad tag url that is requested from the ad server. For details on constructing the ad tag url, see [Create a main ad video tag manually](https://support.google.com/dfp_premium/answer/1068325).  

This parameter is required.

*** ** * ** ***

### contentDuration

`contentDuration: number` Specifies the duration of the content in seconds to be shown. It is used in 2 cases: 1) AdX ad targeting and 2) deciding when to preload VMAP postroll.  

This parameter is optional.

*** ** * ** ***

### contentKeywords

`contentKeywords: string[]` Specifies the keywords used to describe the content to be shown. Used in AdX requests.

This parameter is optional.  

*** ** * ** ***

### contentTitle

`contentTitle: string` Specifies the title of the content to be shown. Used in AdX requests.  

This parameter is optional.

*** ** * ** ***

### forceNonLinearFullSlot

`forceNonLinearFullSlot: boolean` Forces non-linear AdSense ads to render as linear fullslot. If set, the content video will be paused and the non-linear text or image ad will be rendered as fullslot. The content video will resume once the ad has been skipped or closed.

*** ** * ** ***

### linearAdSlotHeight

`linearAdSlotHeight: number` Specifies the height of the rectangular area within which a linear 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.

This parameter is required for linear ads.  

*** ** * ** ***

### linearAdSlotWidth

`linearAdSlotWidth: number` Specifies the width of the rectangular area within which a linear 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.

This parameter is required for linear ads.  

*** ** * ** ***

### liveStreamPrefetchSeconds

`liveStreamPrefetchSeconds: number` Specifies the maximum amount of time to wait in seconds, after calling requestAds, before requesting the ad tag URL. This can be used to stagger requests during a live-stream event, in order to mitigate spikes in the number of requests.

*** ** * ** ***

### nonLinearAdSlotHeight

`nonLinearAdSlotHeight: number` Specifies the height of the rectangular area within which a non linear 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.

This parameter is required for non-linear ads.  

*** ** * ** ***

### nonLinearAdSlotWidth

`nonLinearAdSlotWidth: number` Specifies the width of the rectangular area within which a non linear 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.

This parameter is required for non-linear ads.  

*** ** * ** ***

### omidAccessModeRules

`omidAccessModeRules: {
[key: string]: string;
}` Settings object for mapping verification vendors to OMID Access Modes. The keys must be values in google.ima.OmidVerificationVendor, and the values must be values in google.ima.OmidAccessMode.  

Verification script URLs are internally matched against vendor provided regular expressions to resolve to an OmidVerificationVendor key. IMA then looks up the access mode for the given vendor using this object.  

For script URLs that don't resolve to a known vendor, or if the resolved OmidVerificationVendor is not provided in this object, IMA will use the access mode provided for OmidVerificationVendor.OTHER. If OmidVerificationVendor.OTHER is not provided, then the LIMITED access mode will be used.

*** ** * ** ***

### pageUrl

`pageUrl: string` Specifies the full url of the page that will be included in the Google ad request for targeting purposes. The url needs to be a valid url. If specified, this value will be used for the \[PAGEURL\] VAST macro.  

This parameter is optional.

*** ** * ** ***

### vastLoadTimeout

`vastLoadTimeout: number` Override for default VAST load timeout in milliseconds for a single wrapper. The default timeout is 5000ms.

This parameter is optional.  

## Methods

*** ** * ** ***

### setAdWillAutoPlay

`setAdWillAutoPlay(autoPlay: boolean): void` Notifies the SDK whether the player intends to start the content and ad in response to a user action or whether it will be automatically played. Changing this setting will have no impact on ad playback.

| Parameters ||
|---|---|
| `autoPlay: boolean` | Whether the content and the ad will be autoplayed or whether it will be started by a user action. |

*** ** * ** ***

### setAdWillPlayMuted

`setAdWillPlayMuted(muted: boolean): void` Notifies the SDK whether the player intends to start ad while muted. Changing this setting will have no impact on ad playback, but will send the appropriate signal in the ad request to allow buyers to bid on muted inventory.

| Parameters ||
|---|---|
| `muted: boolean` | Whether the ad will be played while muted. |

*** ** * ** ***

### setContinuousPlayback

`setContinuousPlayback(continuousPlayback: boolean): void` Notifies the SDK whether the player intends to continuously play the content videos one after another similar to TV broadcast. Changing this setting will have no impact on the ad playback, but will send the appropriate signal in this ad request to allow buyers to bid on the type of ad inventory.

| Parameters ||
|---|---|
| `continuousPlayback: boolean` | Whether the content video is played one after another continuously. |