docs/doc/reference/com/google/android/exoplayer2/PlaybackParameters.html
Package com.google.android.exoplayer2
All Implemented Interfaces:Bundleable
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classPlaybackParametersextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Bundleable](Bundleable.html "interface in com.google.android.exoplayer2")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Parameters that apply to playback, including speed setting.
-
Bundleable.Creator<T extends Bundleable>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Bundleable.Creator<PlaybackParameters> | CREATOR |
Deprecated.
Object that can restore PlaybackParameters from a Bundle.
|
| static PlaybackParameters | DEFAULT |
Deprecated.
The default playback parameters: real-time playback with no silence skipping.
|
| float | pitch |
Deprecated.
The factor by which pitch will be shifted.
|
| float | speed |
Deprecated.
The factor by which playback will be sped up. |
Constructors | Constructor | Description |
| --- | --- |
| PlaybackParameters(float speed) |
Deprecated.
Creates new playback parameters that set the playback speed.
|
| PlaybackParameters(float speed, float pitch) |
Deprecated.
Creates new playback parameters that set the playback speed/pitch. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| boolean | equals(Object obj) |
Deprecated.
|
| long | getMediaTimeUsForPlayoutTimeMs(long timeMs) |
Deprecated.
Returns the media time in microseconds that will elapse in timeMs milliseconds of wallclock time.
|
| int | hashCode() |
Deprecated.
|
| Bundle | toBundle() |
Deprecated.
Returns a Bundle representing the information stored in this object.
|
| String | toString() |
Deprecated.
|
| PlaybackParameters | withSpeed(float speed) |
Deprecated.
Returns a copy with the given speed. |
-
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
public static final[PlaybackParameters](PlaybackParameters.html "class in com.google.android.exoplayer2")DEFAULT
Deprecated.
The default playback parameters: real-time playback with no silence skipping.
-
public final float speed
Deprecated.
The factor by which playback will be sped up.
-
public final float pitch
Deprecated.
The factor by which pitch will be shifted.
-
public static final[Bundleable.Creator](Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[PlaybackParameters](PlaybackParameters.html "class in com.google.android.exoplayer2")> CREATOR
Deprecated.
Object that can restore PlaybackParameters from a Bundle.
-
public PlaybackParameters(@FloatRange(from=0.0,fromInclusive=false)
float speed)
Deprecated.
Creates new playback parameters that set the playback speed. The pitch of audio will not be adjusted, so the effect is to time-stretch the audio.
Parameters:speed - The factor by which playback will be sped up. Must be greater than zero.
-
public PlaybackParameters(@FloatRange(from=0.0,fromInclusive=false)
float speed,
@FloatRange(from=0.0,fromInclusive=false)
float pitch)
Deprecated.
Creates new playback parameters that set the playback speed/pitch.
Parameters:speed - The factor by which playback will be sped up. Must be greater than zero.pitch - The factor by which the pitch of audio will be adjusted. Must be greater than zero. Useful values are 1 (to time-stretch audio) and the same value as passed in as the speed (to resample audio, which is useful for slow-motion videos).
-
public long getMediaTimeUsForPlayoutTimeMs(long timeMs)
Deprecated.
Returns the media time in microseconds that will elapse in timeMs milliseconds of wallclock time.
Parameters:timeMs - The time to scale, in milliseconds.Returns:The scaled time, in microseconds.
-
@CheckResult
public[PlaybackParameters](PlaybackParameters.html "class in com.google.android.exoplayer2")withSpeed(@FloatRange(from=0.0,fromInclusive=false)
float speed)
Deprecated.
Returns a copy with the given speed.
Parameters:speed - The new speed. Must be greater than zero.Returns:The copied playback parameters.
-
public boolean equals(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)
Deprecated.
Overrides:equals in class Object
-
public int hashCode()
Deprecated.
Overrides:hashCode in class Object
-
public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")toString()
Deprecated.
Overrides:toString in class Object
-
public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()
Deprecated.
Description copied from interface: Bundleable
Returns a Bundle representing the information stored in this object.
Specified by:toBundle in interface Bundleable