GoogleMobileAds Framework Reference

  • The GADVideoControllerDelegate protocol provides methods to track video events within an ad, such as play, pause, end, mute, and unmute.

  • These methods inform the delegate about changes in the video's playback state, allowing for customized responses to these events.

  • Developers can implement these optional methods to monitor and manage the video playback experience within their ad integrations.

  • Delegates are notified through calls to methods like videoControllerDidPlayVideo, videoControllerDidPauseVideo, etc., providing context about the specific event.

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;