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)

設定影片的初始靜音狀態。