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.
-
Delegate for receiving video notifications.
Declaration
Swift
weak var delegate: (any GADVideoControllerDelegate)? { get set }
Objective-C
@property (nonatomic, weak, nullable) id<GADVideoControllerDelegate> delegate;
-
Indicates whether the video is muted.
Declaration
Swift
var isMuted: Bool { get }
Objective-C
@property (nonatomic, readonly) BOOL isMuted;
-
Mute or unmute video. Set to YES to mute the video. Set to NO to allow the video to play sound. Doesn’t do anything if -customControlsEnabled returns NO.
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 or if -customControlsEnabled returns NO.
Declaration
Swift
func play()
Objective-C
- (void)play;
-
Pause the video. Doesn’t do anything if the video is already paused or if -customControlsEnabled- returns NO.
Declaration
Swift
func pause()
Objective-C
- (void)pause;
-
Stops the video and displays the video’s first frame. Call -play to resume playback at the start of the video. Doesn’t do anything if -customControlsEnabled returns NO.
Declaration
Swift
func stop()
Objective-C
- (void)stop;
-
Indicates whether video custom controls (for example, play/pause/mute/unmute) are enabled.
Declaration
Swift
func customControlsEnabled() -> Bool
Objective-C
- (BOOL)customControlsEnabled;
-
Indicates whether video click to expand behavior is enabled.
Declaration
Swift
func clickToExpandEnabled() -> Bool
Objective-C
- (BOOL)clickToExpandEnabled;