GoogleMobileAds Framework Reference
Stay organized with collections Save and categorize content based on your preferences.
GADVideoControllerDelegate
@protocol GADVideoControllerDelegate <NSObject>
The GADVideoControllerDelegate protocol defines methods that are called by the video controller object in response to the video events that occurred throughout the lifetime of the video rendered by an ad.
Tells the delegate that the video controller has began or resumed playing a video.
Declaration
Swift
optional func videoControllerDidPlayVideo(_ videoController: VideoController)
Objective-C
- (void)videoControllerDidPlayVideo:
(nonnull GADVideoController *)videoController;
Tells the delegate that the video controller has paused video.
Declaration
Swift
optional func videoControllerDidPauseVideo(_ videoController: VideoController)
Objective-C
- (void)videoControllerDidPauseVideo:
(nonnull GADVideoController *)videoController;
Tells the delegate that the video controller’s video playback has ended.
Declaration
Swift
optional func videoControllerDidEndVideoPlayback(_ videoController: VideoController)
Objective-C
- (void)videoControllerDidEndVideoPlayback:
(nonnull GADVideoController *)videoController;
Tells the delegate that the video controller has muted video.
Declaration
Swift
optional func videoControllerDidMuteVideo(_ videoController: VideoController)
Objective-C
- (void)videoControllerDidMuteVideo:
(nonnull GADVideoController *)videoController;
Tells the delegate that the video controller has unmuted video.
Declaration
Swift
optional func videoControllerDidUnmuteVideo(_ videoController: VideoController)
Objective-C
- (void)videoControllerDidUnmuteVideo:
(nonnull GADVideoController *)videoController;
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-02-04 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-02-04 UTC."],[[["The `GADVideoControllerDelegate` protocol defines methods to track video events within an ad."],["It provides delegates for key video events like play, pause, end, mute, and unmute."],["These methods inform your app about the current state of video playback in an ad."],["Delegates are optional and implemented using Swift or Objective-C."],["The `GADVideoController` object triggers these delegate methods in response to video interactions."]]],["The `GADVideoControllerDelegate` protocol informs the delegate about video events. It includes methods triggered when the video controller: starts or resumes playing (`videoControllerDidPlayVideo`), pauses (`videoControllerDidPauseVideo`), ends playback (`videoControllerDidEndVideoPlayback`), mutes (`videoControllerDidMuteVideo`), or unmutes (`videoControllerDidUnmuteVideo`). These methods provide the video controller instance that triggers the callback to the delegate. All methods are optional and called in response to events during the ad video's lifetime.\n"]]