目录

VideoConfiguration.Builder

Class Info

public static final class VideoConfiguration.Builder extends Object

Video configuration builder.

Public Constructor Summary

Constructor Name

Builder()

Constructs a video configuration builder.

Public Method Summary

Qualifier and Type

Method Name and Description

VideoConfiguration

build()

Constructs a VideoConfiguration object with specified attributes.

VideoConfiguration.Builder

setAudioFocusType(int audioFocusType)

Sets the audio focus type.

VideoConfiguration.Builder

setClickToFullScreenRequested(boolean clickToFullScreenRequested)

Sets whether a video ad can be displayed in full screen mode upon a click.

VideoConfiguration.Builder

setCustomizeOperateRequested(boolean customizeOperateRequested)

Sets whether a custom player component is used for a video ad.

VideoConfiguration.Builder

setStartMuted(boolean startMuted)

Sets whether to mute a video initially.

VideoConfiguration.Builder

setAutoPlayNetWork(int autoPlayNetwork)

Sets the type of the network allowed for automatic video playback.

Public Constructors

[h2]Builder

Constructor

public Builder()

Constructs a video configuration builder.

Public Methods

[h2]build

Method

public final VideoConfiguration build()

Constructs a VideoConfiguration object with specified attributes.

Returns

Type

Description

VideoConfiguration

Video configuration.

[h2]setAudioFocusType

Method

public VideoConfiguration.Builder setAudioFocusType(int audioFocusType)

Sets the audio focus type.

Parameters

Returns

Type

Description

VideoConfiguration.Builder

Video configuration builder object.

[h2]setClickToFullScreenRequested

Method

public VideoConfiguration.Builder setClickToFullScreenRequested(boolean clickToFullScreenRequested)

Sets whether a video ad can be displayed in full screen mode upon a click.

Parameters

Name

Description

clickToFullScreenRequested

Indicates whether a video ad can be displayed in full screen mode upon a click.

  • true: yes
  • false: no

Returns

Type

Description

VideoConfiguration.Builder

Video configuration builder object.

[h2]setCustomizeOperateRequested

Method

public VideoConfiguration.Builder setCustomizeOperateRequested(boolean customizeOperateRequested)

Sets whether a custom player component is used for a video ad.

After the setting, you can call the VideoConfiguration.isCustomizeOperateRequested() method for verification. Then you can call VideoOperator.play(), VideoOperator.pause(), and VideoOperator.mute(boolean) to control video ad playback.

Parameters

Name

Description

customizeOperateRequested

Indicates whether to request a custom player component.

  • true: yes
  • false: no

Returns

Type

Description

VideoConfiguration.Builder

Video configuration builder object.

[h2]setStartMuted

Method

public VideoConfiguration.Builder setStartMuted(boolean startMuted)

Sets whether to mute a video initially.

Parameters

Name

Description

startMuted

Indicates whether to mute a video initially.

  • true: yes
  • false: no

Returns

Type

Description

VideoConfiguration.Builder

Video configuration builder object.

[h2]setAutoPlayNetWork

Method

public VideoConfiguration.Builder setAutoPlayNetwork(int autoPlayNetwork)

Sets the type of the network allowed for automatic video playback.

Parameters

Name

Description

autoPlayNetwork

Type of the network allowed for automatic video playback.

  • 0: allowed only on Wi-Fi. The corresponding constant is AutoPlayNetType#WIFI_ONLY.
  • 1: allowed on both Wi-Fi and mobile data. The corresponding constant is AutoPlayNetType#BOTH_WIFI_AND_DATA.
  • 2: forbidden regardless of the network type. The corresponding constant is AutoPlayNetType#FORBID_AUTO_PLAY.

For details, please refer to AutoPlayNetType.

Returns

Type

Description

VideoConfiguration.Builder

Video configuration builder object.