VideoOptions.Builder

class VideoOptions.Builder


Builder for VideoOptions.

Summary

Public constructors

Public functions

VideoOptions!

Constructs a VideoOptions object with the specified attributes.

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 object with the specified attributes.

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 reservations.

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

After verification, you can then use play, pause, and mute to control the video ad.

setStartMuted

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

Sets the initial mute state of the video.