Remove deprecated PlaybackPreparer
Also update release note to account for upcoming ControlDispatcher removal. PiperOrigin-RevId: 385520701
This commit is contained in:
parent
30e65acf63
commit
fa1bb32deb
@ -51,15 +51,16 @@
|
|||||||
`setPlaybackPreparer` methods will now call `Player.prepare` by default.
|
`setPlaybackPreparer` methods will now call `Player.prepare` by default.
|
||||||
If this behavior is sufficient, use of `PlaybackPreparer` can be removed
|
If this behavior is sufficient, use of `PlaybackPreparer` can be removed
|
||||||
from application code without replacement. For custom preparation logic,
|
from application code without replacement. For custom preparation logic,
|
||||||
replace calls to `setPlaybackPreparer` with calls to
|
use a `ForwardingPlayer` that implements custom preparation logic in
|
||||||
`setControlDispatcher` on the same components, passing a
|
`prepare`.
|
||||||
`ControlDispatcher` that implements custom preparation logic in
|
|
||||||
`dispatchPrepare`. Extend `DefaultControlDispatcher` to avoid having to
|
|
||||||
implement the other `ControlDispatcher` methods.
|
|
||||||
* Remove `setRewindIncrementMs` and `setFastForwardIncrementMs` from UI
|
* Remove `setRewindIncrementMs` and `setFastForwardIncrementMs` from UI
|
||||||
components. Use `setControlDispatcher` on the same components, passing a
|
components. These increments can be customized by configuring the
|
||||||
`DefaultControlDispatcher` built using `DefaultControlDispatcher(long,
|
`Player` (see `setSeekBackIncrementMs` and `setSeekForwardIncrementMs`
|
||||||
long)`.
|
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`
|
* Remove `PlayerNotificationManager` constructors and `createWith`
|
||||||
methods. Use `PlayerNotificationManager.Builder` instead.
|
methods. Use `PlayerNotificationManager.Builder` instead.
|
||||||
* Remove `PlayerNotificationManager.setNotificationListener`. Use
|
* Remove `PlayerNotificationManager.setNotificationListener`. Use
|
||||||
@ -92,11 +93,12 @@
|
|||||||
`PlayerNotificationManager`.
|
`PlayerNotificationManager`.
|
||||||
* Remove `rewind_increment` and `fastforward_increment` attributes from
|
* Remove `rewind_increment` and `fastforward_increment` attributes from
|
||||||
`PlayerControlView` and `StyledPlayerControlView`. These increments can
|
`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`,
|
using a `ForwardingPlayer` that overrides `getSeekBackIncrement`,
|
||||||
`seekBack`, `getSeekForwardIncrement` and `seekForward`. The
|
`seekBack`, `getSeekForwardIncrement` and `seekForward`. The rewind and
|
||||||
corresponding buttons can be disabled by using a `ForwardingPlayer`
|
fast forward buttons can be disabled by using a `ForwardingPlayer` that
|
||||||
that removes `COMMAND_SEEK_BACK` and `COMMAND_SEEK_FORWARD` from the
|
removes `COMMAND_SEEK_BACK` and `COMMAND_SEEK_FORWARD` from the
|
||||||
available commands.
|
available commands.
|
||||||
* Update `DefaultControlDispatcher` `getRewindIncrementMs` and
|
* Update `DefaultControlDispatcher` `getRewindIncrementMs` and
|
||||||
`getFastForwardIncrementMs` to take the player as parameter.
|
`getFastForwardIncrementMs` to take the player as parameter.
|
||||||
|
@ -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();
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user