VideoOptions.Builder

public final class VideoOptions.Builder


Builder for VideoOptions.

Summary

Public constructors

Public methods

final @NonNull VideoOptions

Constructs a VideoOptions.

final @NonNull VideoOptions.Builder
@CanIgnoreReturnValue
setClickToExpandRequested(boolean clickToExpandRequested)

Sets whether the AdLoader should request ads with the click to expand behavior enabled.

final @NonNull VideoOptions.Builder
@CanIgnoreReturnValue
setCustomControlsRequested(boolean customControlsRequested)

Requests custom video controls for video ads.

final @NonNull VideoOptions.Builder
@CanIgnoreReturnValue
setStartMuted(boolean startMuted)

Sets the initial mute state of the video.

Public constructors

Builder

public Builder()

Public methods

build

public final @NonNull VideoOptions build()

Constructs a VideoOptions.

setClickToExpandRequested

@CanIgnoreReturnValue
public final @NonNull VideoOptions.Builder setClickToExpandRequested(boolean clickToExpandRequested)

Sets whether the AdLoader should request ads with the click to expand behavior enabled.

setCustomControlsRequested

@CanIgnoreReturnValue
public final @NonNull VideoOptions.Builder setCustomControlsRequested(boolean customControlsRequested)

Requests custom video controls for video ads.

This feature is currently only available for Ad Manager reservation ads.

Use VideoController.isCustomControlsEnabled to check if a loaded video ad has custom video controls enabled.

If enabled, you can then use methods such as VideoController.play, VideoController.pause, and VideoController.mute to control the video ad.

setStartMuted

@CanIgnoreReturnValue
public final @NonNull VideoOptions.Builder setStartMuted(boolean startMuted)

Sets the initial mute state of the video.