VideoOptions.Builder

class VideoOptions.Builder


Builder for VideoOptions.

Summary

Public constructors

Public functions

VideoOptions

Constructs a VideoOptions.

VideoOptions.Builder

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

VideoOptions.Builder

Requests custom video controls for video ads.

VideoOptions.Builder

Sets the initial mute state of the video.

Public constructors

Builder

Builder()

Public functions

build

fun build(): VideoOptions

Constructs a VideoOptions.

setClickToExpandRequested

@CanIgnoreReturnValue
fun setClickToExpandRequested(clickToExpandRequested: Boolean): VideoOptions.Builder

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

setCustomControlsRequested

@CanIgnoreReturnValue
fun setCustomControlsRequested(customControlsRequested: Boolean): VideoOptions.Builder

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 VideoController.play, VideoController.pause, and VideoController.mute to control the video ad.

setStartMuted

@CanIgnoreReturnValue
fun setStartMuted(startMuted: Boolean): VideoOptions.Builder

Sets the initial mute state of the video.