GADVideoController

@interface GADVideoController : NSObject

The video controller class provides a way to get the video metadata and also manages video content of the ad rendered by the Google Mobile Ads SDK. You don’t need to create an instance of this class. When the ad rendered by the Google Mobile Ads SDK loads video content, you may be able to get an instance of this class from the rendered ad object. Currently only native express ad view class exposes video controller.

  • Delegate for receiving video notifications.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) id<GADVideoControllerDelegate>
        delegate;
  • Mute or unmute video. Set to YES to mute the video. Set to NO to allow the video to play sound.

    Declaration

    Swift

    func setMute(_ mute: Bool)

    Objective-C

    - (void)setMute:(BOOL)mute;
  • Play the video. Doesn’t do anything if the video is already playing.

    Declaration

    Swift

    func play()

    Objective-C

    - (void)play;
  • Pause the video. Doesn’t do anything if the video is already paused.

    Declaration

    Swift

    func pause()

    Objective-C

    - (void)pause;
  • Returns a Boolean indicating if the receiver has video content.

    Declaration

    Swift

    func hasVideoContent() -> Bool

    Objective-C

    - (BOOL)hasVideoContent;
  • Returns the video’s aspect ratio (width/height) or 0 if no video is present.

    Declaration

    Swift

    func aspectRatio() -> Double

    Objective-C

    - (double)aspectRatio;
  • Indicates if video custom controls (i.e. play/pause/mute/unmute) are enabled.

    Declaration

    Swift

    func customControlsEnabled() -> Bool

    Objective-C

    - (BOOL)customControlsEnabled;