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)

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