[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-21 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eIMAStreamManagerDelegate\u003c/code\u003e protocol provides callbacks for monitoring and responding to ad events in an IMA stream.\u003c/p\u003e\n"],["\u003cp\u003eIt includes methods to handle ad events, ad errors, and ad progress updates.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003estreamManager:didReceiveAdEvent:\u003c/code\u003e is called when an ad event like starting, pausing or completing occurs.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003estreamManager:didReceiveAdError:\u003c/code\u003e is called when an error related to an ad occurs.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003estreamManager:adDidProgressToTime:adDuration:adPosition:totalAds:adBreakDuration:adPeriodDuration:\u003c/code\u003e provides detailed updates on ad playback progress, including time, duration, and position.\u003c/p\u003e\n"]]],[],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMAStreamManagerDelegate\n========================\n\n @protocol IMAStreamManagerDelegate\n\nA callback protocol for IMAStreamManager.\n- `\n ``\n ``\n `\n\n ### [-streamManager:didReceiveAdEvent:](#/c:objc(pl)IMAStreamManagerDelegate(im)streamManager:didReceiveAdEvent:)\n\n `\n ` \n Called when there is an IMAAdEvent. \n\n #### Declaration\n\n Swift \n\n func streamManager(_ streamManager: ../Classes/IMAStreamManager.html, didReceive event: ../Classes/IMAAdEvent.html)\n\n Objective-C \n\n - (void)streamManager:(nonnull ../Classes/IMAStreamManager.html *)streamManager\n didReceiveAdEvent:(nonnull ../Classes/IMAAdEvent.html *)event;\n\n #### Parameters\n\n |-----------------------|------------------------------------------|\n | ` `*streamManager*` ` | the IMAStreamManager receiving the event |\n | ` `*event*` ` | the IMAAdEvent received |\n\n- `\n ``\n ``\n `\n\n ### [-streamManager:didReceiveAdError:](#/c:objc(pl)IMAStreamManagerDelegate(im)streamManager:didReceiveAdError:)\n\n `\n ` \n Called when there is an IMAAdEvent. \n\n #### Declaration\n\n Swift \n\n func streamManager(_ streamManager: ../Classes/IMAStreamManager.html, didReceive error: ../Classes/IMAAdError.html)\n\n Objective-C \n\n - (void)streamManager:(nonnull ../Classes/IMAStreamManager.html *)streamManager\n didReceiveAdError:(nonnull ../Classes/IMAAdError.html *)error;\n\n #### Parameters\n\n |-----------------------|------------------------------------------|\n | ` `*streamManager*` ` | the IMAStreamManager receiving the error |\n | ` `*error*` ` | the IMAAdError received |\n\n- `\n ``\n ``\n `\n\n ### [-streamManager:adDidProgressToTime:adDuration:adPosition:totalAds:adBreakDuration:adPeriodDuration:](#/c:objc(pl)IMAStreamManagerDelegate(im)streamManager:adDidProgressToTime:adDuration:adPosition:totalAds:adBreakDuration:adPeriodDuration:)\n\n `\n ` \n Called when the ad is playing to give updates about ad progress. \n\n #### Declaration\n\n Swift \n\n optional func streamManager(_ streamManager: ../Classes/IMAStreamManager.html, adDidProgressToTime time: TimeInterval, adDuration: TimeInterval, adPosition: Int, totalAds: Int, adBreakDuration: TimeInterval, adPeriodDuration: TimeInterval)\n\n Objective-C \n\n - (void)streamManager:(nonnull ../Classes/IMAStreamManager.html *)streamManager\n adDidProgressToTime:(NSTimeInterval)time\n adDuration:(NSTimeInterval)adDuration\n adPosition:(NSInteger)adPosition\n totalAds:(NSInteger)totalAds\n adBreakDuration:(NSTimeInterval)adBreakDuration\n adPeriodDuration:(NSTimeInterval)adPeriodDuration;\n\n #### Parameters\n\n |--------------------------|------------------------------------------------------------------------------------------------|\n | ` `*streamManager*` ` | the IMAStreamManager tracking ad playback |\n | ` `*time*` ` | the current ad playback time in seconds |\n | ` `*adDuration*` ` | the total duration of the current ad in seconds |\n | ` `*adPosition*` ` | the ad position of the current ad in the current ad break |\n | ` `*totalAds*` ` | the total number of ads in the current ad break |\n | ` `*adBreakDuration*` ` | the total duration of the current ad break in seconds |\n | ` `*adPeriodDuration*` ` | the total duration of the current ad period in seconds. This includes ads duration plus slate. |"]]