VideoOptions.Builder

public final class VideoOptions.Builder


VideoOptions 的构建器。

摘要

公共构造函数

公共方法

VideoOptions

使用指定的属性构造 VideoOptions 对象。

VideoOptions.Builder
@CanIgnoreReturnValue
setClickToExpandRequested(boolean clickToExpandRequested)

设置 AdLoader 是否应请求启用了“点击展开”行为的广告。

VideoOptions.Builder
@CanIgnoreReturnValue
setCustomControlsRequested(boolean customControlsRequested)

请求为视频广告使用自定义视频控件。

VideoOptions.Builder
@CanIgnoreReturnValue
setStartMuted(boolean startMuted)

设置视频的初始静音状态。

公共构造函数

Builder

public Builder()

公共方法

build

public VideoOptions build()

使用指定的属性构造 VideoOptions 对象。

setClickToExpandRequested

@CanIgnoreReturnValue
public VideoOptions.Builder setClickToExpandRequested(boolean clickToExpandRequested)

设置 AdLoader 是否应请求启用了“点击展开”行为的广告。

setCustomControlsRequested

@CanIgnoreReturnValue
public VideoOptions.Builder setCustomControlsRequested(boolean customControlsRequested)

请求为视频广告使用自定义视频控件。

此功能目前仅适用于 Ad Manager 预订。

使用 isCustomControlsEnabled 验证已加载的视频广告是否启用了自定义视频控件。

验证完成后,您可以使用 playpausemute 来控制视频广告。

setStartMuted

@CanIgnoreReturnValue
public VideoOptions.Builder setStartMuted(boolean startMuted)

设置视频的初始静音状态。