setPlaybackParameters no longer accepts null for DEFAULT
Null was an alias for DEFAULT. Remove this for nullness safety in the API. The ExoPlayer implementation still checks for null and replaces it by DEFAULT, so this is ABI compatible. PiperOrigin-RevId: 364370017
This commit is contained in:
parent
6c688891e3
commit
bb1261da3c
@ -30,10 +30,12 @@
|
||||
* Reset playback speed when live playback speed control becomes unused
|
||||
([#8664](https://github.com/google/ExoPlayer/issues/8664)).
|
||||
* Fix playback position issue when re-preparing playback after a
|
||||
BehindLiveWindowException
|
||||
`BehindLiveWindowException`
|
||||
([#8675](https://github.com/google/ExoPlayer/issues/8675)).
|
||||
* Add a `Listener` interface to receive all player events in a single
|
||||
object.
|
||||
* `Player.setPlaybackParameters` no longer accepts null, use
|
||||
`PlaybackParameters.DEFAULT` instead.
|
||||
* HLS:
|
||||
* Fix issue that could cause playback to become stuck if corresponding
|
||||
`EXT-X-DISCONTINUITY` tags in different media playlists occur at
|
||||
|
@ -469,7 +469,7 @@ public final class CastPlayer extends BasePlayer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaybackParameters(@Nullable PlaybackParameters playbackParameters) {
|
||||
public void setPlaybackParameters(PlaybackParameters playbackParameters) {
|
||||
// Unsupported by the RemoteMediaClient API. Do nothing.
|
||||
}
|
||||
|
||||
|
@ -1491,16 +1491,16 @@ public interface Player {
|
||||
void next();
|
||||
|
||||
/**
|
||||
* Attempts to set the playback parameters. Passing {@code null} sets the parameters to the
|
||||
* default, {@link PlaybackParameters#DEFAULT}, which means there is no speed or pitch adjustment.
|
||||
* Attempts to set the playback parameters. Passing {@link PlaybackParameters#DEFAULT} resets the
|
||||
* player to the default, which means there is no speed or pitch adjustment.
|
||||
*
|
||||
* <p>Playback parameters changes may cause the player to buffer. {@link
|
||||
* EventListener#onPlaybackParametersChanged(PlaybackParameters)} will be called whenever the
|
||||
* currently active playback parameters change.
|
||||
*
|
||||
* @param playbackParameters The playback parameters, or {@code null} to use the defaults.
|
||||
* @param playbackParameters The playback parameters.
|
||||
*/
|
||||
void setPlaybackParameters(@Nullable PlaybackParameters playbackParameters);
|
||||
void setPlaybackParameters(PlaybackParameters playbackParameters);
|
||||
|
||||
/**
|
||||
* Changes the rate at which playback occurs. The pitch is not changed.
|
||||
|
@ -669,7 +669,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaybackParameters(@Nullable PlaybackParameters playbackParameters) {
|
||||
public void setPlaybackParameters(PlaybackParameters playbackParameters) {
|
||||
if (playbackParameters == null) {
|
||||
playbackParameters = PlaybackParameters.DEFAULT;
|
||||
}
|
||||
|
@ -1467,7 +1467,7 @@ public class SimpleExoPlayer extends BasePlayer
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaybackParameters(@Nullable PlaybackParameters playbackParameters) {
|
||||
public void setPlaybackParameters(PlaybackParameters playbackParameters) {
|
||||
verifyApplicationThread();
|
||||
player.setPlaybackParameters(playbackParameters);
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ public abstract class StubExoPlayer extends BasePlayer implements ExoPlayer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaybackParameters(@Nullable PlaybackParameters playbackParameters) {
|
||||
public void setPlaybackParameters(PlaybackParameters playbackParameters) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user