rename getPlaybackError
PiperOrigin-RevId: 294074348
This commit is contained in:
parent
ecc04b2b6f
commit
c02933ac0a
@ -9,6 +9,7 @@
|
||||
* Add `Player.onPlayWhenReadyChanged` with reasons.
|
||||
* Add `Player.onPlaybackStateChanged` and deprecate
|
||||
`Player.onPlayerStateChanged`.
|
||||
* Deprecate and rename getPlaybackError to getPlayerError for consistency.
|
||||
* Make `MediaSourceEventListener.LoadEventInfo` and
|
||||
`MediaSourceEventListener.MediaLoadData` top-level classes.
|
||||
* Rename `MediaCodecRenderer.onOutputFormatChanged` to
|
||||
|
@ -337,9 +337,16 @@ public final class CastPlayer extends BasePlayer {
|
||||
return Player.PLAYBACK_SUPPRESSION_REASON_NONE;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
@Nullable
|
||||
public ExoPlaybackException getPlaybackError() {
|
||||
return getPlayerError();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public ExoPlaybackException getPlayerError() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -752,7 +752,7 @@ public final class MediaSessionConnector {
|
||||
customActionMap = Collections.unmodifiableMap(currentActions);
|
||||
|
||||
Bundle extras = new Bundle();
|
||||
@Nullable ExoPlaybackException playbackError = player.getPlaybackError();
|
||||
@Nullable ExoPlaybackException playbackError = player.getPlayerError();
|
||||
boolean reportError = playbackError != null || customError != null;
|
||||
int sessionPlaybackState =
|
||||
reportError
|
||||
|
@ -240,9 +240,16 @@ import java.util.concurrent.TimeoutException;
|
||||
return playbackSuppressionReason;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
@Nullable
|
||||
public ExoPlaybackException getPlaybackError() {
|
||||
return getPlayerError();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public ExoPlaybackException getPlayerError() {
|
||||
return playbackInfo.playbackError;
|
||||
}
|
||||
|
||||
|
@ -755,6 +755,11 @@ public interface Player {
|
||||
* @return The error, or {@code null}.
|
||||
*/
|
||||
@Nullable
|
||||
ExoPlaybackException getPlayerError();
|
||||
|
||||
/** @deprecated Use {@link #getPlayerError()} instead. */
|
||||
@Deprecated
|
||||
@Nullable
|
||||
ExoPlaybackException getPlaybackError();
|
||||
|
||||
/**
|
||||
|
@ -1163,11 +1163,18 @@ public class SimpleExoPlayer extends BasePlayer
|
||||
return player.getPlaybackSuppressionReason();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
@Nullable
|
||||
public ExoPlaybackException getPlaybackError() {
|
||||
return getPlayerError();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public ExoPlaybackException getPlayerError() {
|
||||
verifyApplicationThread();
|
||||
return player.getPlaybackError();
|
||||
return player.getPlayerError();
|
||||
}
|
||||
|
||||
/** @deprecated Use {@link #prepare()} instead. */
|
||||
|
@ -1393,7 +1393,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||
errorMessageView.setVisibility(View.VISIBLE);
|
||||
return;
|
||||
}
|
||||
@Nullable ExoPlaybackException error = player != null ? player.getPlaybackError() : null;
|
||||
@Nullable ExoPlaybackException error = player != null ? player.getPlayerError() : null;
|
||||
if (error != null && errorMessageProvider != null) {
|
||||
CharSequence errorMessage = errorMessageProvider.getErrorMessage(error).second;
|
||||
errorMessageView.setText(errorMessage);
|
||||
|
@ -89,11 +89,17 @@ public abstract class StubExoPlayer extends BasePlayer implements ExoPlayer {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public ExoPlaybackException getPlaybackError() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExoPlaybackException getPlayerError() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/** @deprecated Use {@link #prepare()} instead. */
|
||||
@Deprecated
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user