# TDAd Class Reference

Inherits from | NSObject
Declared in | TDAd.h

## Overview

TDAd represents a Triton ad in the SDK. It contains information about all supported ads (in-stream/on-demand, audio/banner/video).

Usually TDAd is used as an output of TDAdLoader and as input of TDBannerView and TDInterstitialAd and its details don’t need to be known. However, when the application is rendering the ads by itself, it must inspect its attributes and methods.

## General properties

### `mediaImpressionURLs`

The urls that need to be called for generating an ad impression

`@property (nonatomic, strong) NSArray *mediaImpressionURLs`

#### Declared In

`TDAd.h`

### `mediaMIMEType`

The type of the linear media as a MIME-type (usually audio or video)

`@property (nonatomic, strong) NSString *mediaMIMEType`

#### Declared In

`TDAd.h`

### `format`

The format of the ad. VAST or DAAST

`@property (nonatomic, strong) NSString *format`

#### Declared In

`TDAd.h`

### `mediaURL`

The url of the linear media

`@property (nonatomic, strong) NSURL *mediaURL`

#### Declared In

`TDAd.h`

## Banner ads

### `companionBanners`

An array of TDCompanionBanner objects for each banner available in the ad

`@property (nonatomic, strong) NSArray *companionBanners`

#### Declared In

`TDAd.h`

## Video interstitials

### `videoWidth`

The width of the video

`@property (nonatomic, assign) NSInteger videoWidth`

#### Declared In

`TDAd.h`

### `videoHeight`

The height of the video

`@property (nonatomic, assign) NSInteger videoHeight`

#### Declared In

`TDAd.h`

### `videoClickThroughURL`

The url that the app must be redirected when the user clicks in a video ad

`@property (nonatomic, strong) NSURL *videoClickThroughURL`

#### Declared In

`TDAd.h`

### `clickTrackingURLs`

The list of urls that must be called to track the user clicking in a video ad

`@property (nonatomic, strong) NSArray *clickTrackingURLs`

#### Declared In

`TDAd.h`

## Helper methods

### `– bestCompanionBannerForWidth:andHeight:`

Returns the companion banner in the receiver’s companion banners list that approximates most the desired width and height.

`- (TDCompanionBanner *)bestCompanionBannerForWidth:(NSInteger)width andHeight:(NSInteger)height`

#### Parameters

`width` | the desired width of the banner
`height` | the desired height of the banner

#### Return Value

A TDCompanionBanner that is the best match for the desired width and height.

#### Declared In

`TDAd.h`

### `– trackMediaImpressions`

Tracks asynchronously all the media impressions URL for the ad. Useful when you are rendering your ads with custom UI.

`- (void)trackMediaImpressions`

#### Declared In

`TDAd.h`

### `– trackVideoClick`

Tracks asynchronously all the video click URLs for the ad. Useful when you are rendering your ads with custom UI.

`- (void)trackVideoClick`

#### Declared In

`TDAd.h`