Instance Method


Requests playback of a preroll video iAd.


- (void)playPrerollAdWithCompletionHandler:(void (^)(NSError *error))completionHandler;



A block that’s called after the preroll ad finishes playback.


If the player view controller’s player instance begins playing during a preroll ad, the video ad stops immediately.

The completion handler’s error argument is non-nil if the player couldn’t play the preroll ad. Errors can occur for many reasons, such as lack of ad inventory, exceeding the maximum preroll ad playback frequency, iAd account configuration issues, and media playback issues. See ADError for a list of possible errors.

See Also

Playing a Preroll Video Ad

+ preparePrerollAds

Informs iAd that the app intends to play a preroll ad.

- cancelPreroll

Cancels the playback of a preroll video ad.