diff --git a/api.txt b/api.txt index c2f1a94d1a..21d6bc7762 100644 --- a/api.txt +++ b/api.txt @@ -602,7 +602,7 @@ package androidx.media3.common { } public final class PlaybackParameters { - ctor public PlaybackParameters(float); + ctor public PlaybackParameters(@FloatRange(from=0, fromInclusive=false) float); ctor public PlaybackParameters(@FloatRange(from=0, fromInclusive=false) float, @FloatRange(from=0, fromInclusive=false) float); method @CheckResult public androidx.media3.common.PlaybackParameters withSpeed(@FloatRange(from=0, fromInclusive=false) float); field public static final androidx.media3.common.PlaybackParameters DEFAULT; diff --git a/libraries/common/src/main/java/androidx/media3/common/PlaybackParameters.java b/libraries/common/src/main/java/androidx/media3/common/PlaybackParameters.java index 84881a55ce..bfb0e8bd69 100644 --- a/libraries/common/src/main/java/androidx/media3/common/PlaybackParameters.java +++ b/libraries/common/src/main/java/androidx/media3/common/PlaybackParameters.java @@ -50,7 +50,7 @@ public final class PlaybackParameters implements Bundleable { * * @param speed The factor by which playback will be sped up. Must be greater than zero. */ - public PlaybackParameters(float speed) { + public PlaybackParameters(@FloatRange(from = 0, fromInclusive = false) float speed) { this(speed, /* pitch= */ 1f); }