public final class

PlaybackParams.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.media2.player.PlaybackParams.Builder

Overview

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

Summary

Constructors
publicBuilder()

Default constructor

publicBuilder(android.media.PlaybackParams playbackParams)

Methods
public PlaybackParamsbuild()

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

public PlaybackParams.BuildersetAudioFallbackMode(int audioFallbackMode)

Sets the audio fallback mode.

public PlaybackParams.BuildersetPitch(float pitch)

Sets the pitch factor.

public PlaybackParams.BuildersetSpeed(float speed)

Sets the speed factor.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Default constructor

public Builder(android.media.PlaybackParams playbackParams)

Methods

public PlaybackParams.Builder setAudioFallbackMode(int audioFallbackMode)

Sets the audio fallback mode.

Returns:

this Builder instance.

public PlaybackParams.Builder setPitch(float pitch)

Sets the pitch factor.

Returns:

this Builder instance.

public PlaybackParams.Builder setSpeed(float speed)

Sets the speed factor.

Returns:

this Builder instance.

public PlaybackParams build()

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

Returns:

PlaybackParams object with values from the Builder.