<IMAAdsManagerDelegate> Protocol Reference

<IMAAdsManagerDelegate> Protocol Reference

Overview

A callback protocol for IMAAdsManager.

All callbacks to the delegate are invoked on the main thread.

Instance Methods

(void) - adsManager:didReceiveAdEvent:
 Called when there is an IMAAdEvent. More...
 
(void) - adsManager:didReceiveAdError:
 Called when there was an error playing the ad. More...
 
(void) - adsManagerDidRequestContentPause:
 Called when an ad is ready to play. More...
 
(void) - adsManagerDidRequestContentResume:
 Called when an ad has finished or an error occurred during the playback. More...
 
(void) - adsManager:adDidProgressToTime:totalTime:
 Called every 200ms to provide time updates for the current ad. More...
 
(void) - adsManagerAdPlaybackReady:
 Called when the current ad is sufficiently buffered and playback is likely to keep up. More...
 
(void) - adsManagerAdDidStartBuffering:
 Called when the current ad media buffer is empty and playback did stall. More...
 
(void) - adsManager:adDidBufferToMediaTime:
 Called as the current ad media buffers. More...
 

Method Documentation

- (void) adsManager: (IMAAdsManager *)  adsManager
didReceiveAdEvent: (IMAAdEvent *)  event 

Called when there is an IMAAdEvent.

Parameters
adsManagerthe IMAAdsManager receiving the event
eventthe IMAAdEvent received
- (void) adsManager: (IMAAdsManager *)  adsManager
didReceiveAdError: (IMAAdError *)  error 

Called when there was an error playing the ad.

Log the error and resume playing content.

Parameters
adsManagerthe IMAAdsManager that errored
errorthe IMAAdError received
- (void) adsManagerDidRequestContentPause: (IMAAdsManager *)  adsManager

Called when an ad is ready to play.

The implementing code should pause the content playback and prepare the UI for ad playback.

Parameters
adsManagerthe IMAAdsManager requesting content pause
- (void) adsManagerDidRequestContentResume: (IMAAdsManager *)  adsManager

Called when an ad has finished or an error occurred during the playback.

The implementing code should resume the content playback.

Parameters
adsManagerthe IMAAdsManager requesting content resume
- (void) adsManager: (IMAAdsManager *)  adsManager
adDidProgressToTime: (NSTimeInterval)  mediaTime
totalTime: (NSTimeInterval)  totalTime 
optional

Called every 200ms to provide time updates for the current ad.

Parameters
adsManagerthe IMAAdsManager tracking ad playback
mediaTimethe current media time in seconds
totalTimethe total media length in seconds
- (void) adsManagerAdPlaybackReady: (IMAAdsManager *)  adsManager
optional

Called when the current ad is sufficiently buffered and playback is likely to keep up.

Parameters
adsManagerthe IMAAdsManager with ad playback ready
- (void) adsManagerAdDidStartBuffering: (IMAAdsManager *)  adsManager
optional

Called when the current ad media buffer is empty and playback did stall.

Parameters
adsManagerthe IMAAdsManager tracking the stalled ad
- (void) adsManager: (IMAAdsManager *)  adsManager
adDidBufferToMediaTime: (NSTimeInterval)  mediaTime 
optional

Called as the current ad media buffers.

Parameters
adsManagerthe IMAAdsManager tracking the ad's media buffer
mediaTimethe current buffered media time in seconds

Send feedback about...

IMA Client-Side SDK for tvOS
Need help? Visit our support page.