Remove deprecated PlaybackPreparer

Also update release note to account for upcoming ControlDispatcher removal.

PiperOrigin-RevId: 385520701
This commit is contained in:
kimvde 2021-07-19 11:55:55 +01:00 committed by Ian Baker
parent 30e65acf63
commit fa1bb32deb
2 changed files with 14 additions and 37 deletions

View File

@ -51,15 +51,16 @@
`setPlaybackPreparer` methods will now call `Player.prepare` by default.
If this behavior is sufficient, use of `PlaybackPreparer` can be removed
from application code without replacement. For custom preparation logic,
replace calls to `setPlaybackPreparer` with calls to
`setControlDispatcher` on the same components, passing a
`ControlDispatcher` that implements custom preparation logic in
`dispatchPrepare`. Extend `DefaultControlDispatcher` to avoid having to
implement the other `ControlDispatcher` methods.
use a `ForwardingPlayer` that implements custom preparation logic in
`prepare`.
* Remove `setRewindIncrementMs` and `setFastForwardIncrementMs` from UI
components. Use `setControlDispatcher` on the same components, passing a
`DefaultControlDispatcher` built using `DefaultControlDispatcher(long,
long)`.
components. These increments can be customized by configuring the
`Player` (see `setSeekBackIncrementMs` and `setSeekForwardIncrementMs`
in `SimpleExoPlayer.Builder`), or by using a `ForwardingPlayer` that
overrides `getSeekBackIncrement`, `seekBack`, `getSeekForwardIncrement`
and `seekForward`. The rewind and fast forward buttons can be disabled
by using a `ForwardingPlayer` that removes `COMMAND_SEEK_BACK` and
`COMMAND_SEEK_FORWARD` from the available commands.
* Remove `PlayerNotificationManager` constructors and `createWith`
methods. Use `PlayerNotificationManager.Builder` instead.
* Remove `PlayerNotificationManager.setNotificationListener`. Use
@ -92,11 +93,12 @@
`PlayerNotificationManager`.
* Remove `rewind_increment` and `fastforward_increment` attributes from
`PlayerControlView` and `StyledPlayerControlView`. These increments can
be customized by configuring the `Player` (whenever possible) or by
be customized by configuring the `Player` (see `setSeekBackIncrementMs`
and `setSeekForwardIncrementMs` in `SimpleExoPlayer.Builder`), or by
using a `ForwardingPlayer` that overrides `getSeekBackIncrement`,
`seekBack`, `getSeekForwardIncrement` and `seekForward`. The
corresponding buttons can be disabled by using a `ForwardingPlayer`
that removes `COMMAND_SEEK_BACK` and `COMMAND_SEEK_FORWARD` from the
`seekBack`, `getSeekForwardIncrement` and `seekForward`. The rewind and
fast forward buttons can be disabled by using a `ForwardingPlayer` that
removes `COMMAND_SEEK_BACK` and `COMMAND_SEEK_FORWARD` from the
available commands.
* Update `DefaultControlDispatcher` `getRewindIncrementMs` and
`getFastForwardIncrementMs` to take the player as parameter.

View File

@ -1,25 +0,0 @@
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.exoplayer2;
/** @deprecated Use {@link ControlDispatcher} instead. */
@Deprecated
public interface PlaybackPreparer {
/** @deprecated Use {@link ControlDispatcher#dispatchPrepare(Player)} instead. */
@Deprecated
void preparePlayback();
}