GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADAudioVideoManagerDelegate
@protocol GADAudioVideoManagerDelegate <NSObject>
A set of methods to inform the delegate of audio video manager events.
-
Tells the delegate that the Google Mobile Ads SDK will start playing a video. This method isn’t
called if another video rendered by Google Mobile Ads SDK is already playing.
Declaration
Objective-C
- (void)audioVideoManagerWillPlayVideo:
(nonnull GADAudioVideoManager *)audioVideoManager;
-
Tells the delegate that the Google Mobile Ads SDK has paused/stopped all video playback.
Declaration
Objective-C
- (void)audioVideoManagerDidPauseAllVideo:
(nonnull GADAudioVideoManager *)audioVideoManager;
-
Tells the delegate that at least one video rendered by the Google Mobile Ads SDK will play
sound. Your app should stop playing sound when this method is called.
Declaration
Objective-C
- (void)audioVideoManagerWillPlayAudio:
(nonnull GADAudioVideoManager *)audioVideoManager;
-
Tells the delegate that all the video rendered by the Google Mobile Ads SDK has stopped playing
sound. Your app can now resume any music playback or produce any kind of sound. Note that this
message doesn’t mean that all the video has stopped playing, just audio, so you shouldn’t
deactivate AVAudioSession’s instance. Doing so can lead to unexpected video playback behavior.
You may deactivate AVAudioSession only when all rendered video ads are paused or have finished
playing, and ‘audioVideoDidPauseAllVideo:’ is called.
Declaration
Objective-C
- (void)audioVideoManagerDidStopPlayingAudio:
(nonnull GADAudioVideoManager *)audioVideoManager;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["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 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADAudioVideoManagerDelegate\u003c/code\u003e informs the delegate of audio and video events related to Google Mobile Ads.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to notify when a video starts or pauses, enabling control over video playback.\u003c/p\u003e\n"],["\u003cp\u003eDelegate methods also inform when audio from ads starts or stops, allowing apps to manage their own audio accordingly.\u003c/p\u003e\n"],["\u003cp\u003eThis ensures smooth audio and video experiences within your app by managing potential conflicts and playback states.\u003c/p\u003e\n"]]],["The `GADAudioVideoManagerDelegate` protocol informs the delegate about audio and video events from the Google Mobile Ads SDK. Key actions include: notifying the delegate when a video will start playing (`audioVideoManagerWillPlayVideo`), all video playback is paused (`audioVideoManagerDidPauseAllVideo`), video sound will play (`audioVideoManagerWillPlayAudio`), and video sound has stopped (`audioVideoManagerDidStopPlayingAudio`). The delegate should pause app sounds when receiving the 'willPlayAudio' message and can resume sound after the 'didStopPlayingAudio' message.\n"],null,["# GoogleMobileAds Framework Reference\n\nGADAudioVideoManagerDelegate\n============================\n\n @protocol GADAudioVideoManagerDelegate \u003cNSObject\u003e\n\nA set of methods to inform the delegate of audio video manager events.\n- `\n ``\n ``\n `\n\n ### [-audioVideoManagerWillPlayVideo:](#/c:objc(pl)GADAudioVideoManagerDelegate(im)audioVideoManagerWillPlayVideo:)\n\n `\n ` \n Tells the delegate that the Google Mobile Ads SDK will start playing a video. This method isn't\n called if another video rendered by Google Mobile Ads SDK is already playing. \n\n #### Declaration\n\n Swift \n\n optional func audioVideoManagerWillPlayVideo(_ audioVideoManager: ../Classes/GADAudioVideoManager.html)\n\n Objective-C \n\n - (void)audioVideoManagerWillPlayVideo:\n (nonnull ../Classes/GADAudioVideoManager.html *)audioVideoManager;\n\n- `\n ``\n ``\n `\n\n ### [-audioVideoManagerDidPauseAllVideo:](#/c:objc(pl)GADAudioVideoManagerDelegate(im)audioVideoManagerDidPauseAllVideo:)\n\n `\n ` \n Tells the delegate that the Google Mobile Ads SDK has paused/stopped all video playback. \n\n #### Declaration\n\n Swift \n\n optional func audioVideoManagerDidPauseAllVideo(_ audioVideoManager: ../Classes/GADAudioVideoManager.html)\n\n Objective-C \n\n - (void)audioVideoManagerDidPauseAllVideo:\n (nonnull ../Classes/GADAudioVideoManager.html *)audioVideoManager;\n\n- `\n ``\n ``\n `\n\n ### [-audioVideoManagerWillPlayAudio:](#/c:objc(pl)GADAudioVideoManagerDelegate(im)audioVideoManagerWillPlayAudio:)\n\n `\n ` \n Tells the delegate that at least one video rendered by the Google Mobile Ads SDK will play\n sound. Your app should stop playing sound when this method is called. \n\n #### Declaration\n\n Swift \n\n optional func audioVideoManagerWillPlayAudio(_ audioVideoManager: ../Classes/GADAudioVideoManager.html)\n\n Objective-C \n\n - (void)audioVideoManagerWillPlayAudio:\n (nonnull ../Classes/GADAudioVideoManager.html *)audioVideoManager;\n\n- `\n ``\n ``\n `\n\n ### [-audioVideoManagerDidStopPlayingAudio:](#/c:objc(pl)GADAudioVideoManagerDelegate(im)audioVideoManagerDidStopPlayingAudio:)\n\n `\n ` \n Tells the delegate that all the video rendered by the Google Mobile Ads SDK has stopped playing\n sound. Your app can now resume any music playback or produce any kind of sound. Note that this\n message doesn't mean that all the video has stopped playing, just audio, so you shouldn't\n deactivate AVAudioSession's instance. Doing so can lead to unexpected video playback behavior.\n You may deactivate AVAudioSession only when all rendered video ads are paused or have finished\n playing, and 'audioVideoDidPauseAllVideo:' is called. \n\n #### Declaration\n\n Swift \n\n optional func audioVideoManagerDidStopPlayingAudio(_ audioVideoManager: ../Classes/GADAudioVideoManager.html)\n\n Objective-C \n\n - (void)audioVideoManagerDidStopPlayingAudio:\n (nonnull ../Classes/GADAudioVideoManager.html *)audioVideoManager;"]]