PlaybackParams.Builder

public static final class PlaybackParams.Builder
extends Object

java.lang.Object
   ↳ androidx.media2.player.PlaybackParams.Builder


The builder class that makes it easy to chain setters to create a PlaybackParams object.

Summary

Public constructors

Builder()

Default constructor

Builder(PlaybackParams playbackParams)

Constructs a new PlaybackParams builder using data from playbackParams.

Public methods

PlaybackParams build()

Takes the values of the Builder object and creates a PlaybackParams object.

PlaybackParams.Builder setAudioFallbackMode(int audioFallbackMode)

Sets the audio fallback mode.

PlaybackParams.Builder setPitch(float pitch)

Sets the pitch factor.

PlaybackParams.Builder setSpeed(float speed)

Sets the speed factor.

Inherited methods

Public constructors

Builder

public Builder ()

Default constructor

Builder

public Builder (PlaybackParams playbackParams)

Constructs a new PlaybackParams builder using data from playbackParams.

Parameters
playbackParams PlaybackParams: the non-null instance to initialize from.