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.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADAudioVideoManagerDelegate\u003c/code\u003e informs the app about audio and video events related to Google Mobile Ads.\u003c/p\u003e\n"],["\u003cp\u003eIt notifies the app when a video starts or pauses, enabling the app to manage audio playback accordingly.\u003c/p\u003e\n"],["\u003cp\u003eThe delegate helps synchronize the app's audio with Google Mobile Ads videos, preventing conflicts and ensuring a seamless user experience.\u003c/p\u003e\n"],["\u003cp\u003eIt provides signals for managing audio sessions based on the Google Mobile Ads video playback state, allowing apps to control sound seamlessly.\u003c/p\u003e\n"],["\u003cp\u003eApps can utilize this delegate to pause their own audio when an ad starts playing and resume when the ad finishes or pauses.\u003c/p\u003e\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;"]]