mirror of
https://github.com/samsonjs/media.git
synced 2026-04-08 11:45:51 +00:00
Remove BasePlayer stop as a final method.
It calls through to a deprecated method, which is unusual for a convenience method, and the deprecated method has various implementations. This allows for a smoother removal of stop(boolean) and removes an obstacle for the ExoPlayer-SimpleExoPlayer merge. Adds missing @Deprecated tags to some Players. PiperOrigin-RevId: 400213422
This commit is contained in:
parent
c810309775
commit
a26caae4ca
5 changed files with 23 additions and 5 deletions
|
|
@ -493,6 +493,12 @@ public final class CastPlayer extends BasePlayer {
|
|||
return playbackParameters.value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
stop(/* reset= */ false);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void stop(boolean reset) {
|
||||
playbackState = STATE_IDLE;
|
||||
|
|
|
|||
|
|
@ -227,11 +227,6 @@ public abstract class BasePlayer implements Player {
|
|||
setPlaybackParameters(getPlaybackParameters().withSpeed(speed));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void stop() {
|
||||
stop(/* reset= */ false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getNextWindowIndex() {
|
||||
Timeline timeline = getCurrentTimeline();
|
||||
|
|
|
|||
|
|
@ -738,6 +738,12 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
stop(/* reset= */ false);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void stop(boolean reset) {
|
||||
stop(reset, /* error= */ null);
|
||||
|
|
|
|||
|
|
@ -1378,6 +1378,11 @@ public class SimpleExoPlayer extends BasePlayer
|
|||
player.setForegroundMode(foregroundMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
stop(/* reset= */ false);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void stop(boolean reset) {
|
||||
|
|
|
|||
|
|
@ -416,6 +416,12 @@ public class StubExoPlayer extends BasePlayer implements ExoPlayer {
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void stop(boolean reset) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
|
|
|||
Loading…
Reference in a new issue