Commit 629a75ed by bachinger Committed by tonihei

Map `PLAYER_STATE_LOADING` to `STATE_BUFFERING`

#minor-release
Issue: androidx/media#245
PiperOrigin-RevId: 510456793
(cherry picked from commit ba49b6b8)
parent 3b00561b
...@@ -101,6 +101,9 @@ This release corresponds to the ...@@ -101,6 +101,9 @@ This release corresponds to the
* Cast extension: * Cast extension:
* Bump Cast SDK version to 21.2.0. * Bump Cast SDK version to 21.2.0.
* IMA extension: * IMA extension:
* Map `PLAYER_STATE_LOADING` to `STATE_BUFFERING`
([#245](\(https://github.com/androidx/media/issues/245\)).
* IMA extension
* Remove player listener of the `ImaServerSideAdInsertionMediaSource` on * Remove player listener of the `ImaServerSideAdInsertionMediaSource` on
the application thread to avoid threading issues. the application thread to avoid threading issues.
* Add a property `focusSkipButtonWhenAvailable` to the * Add a property `focusSkipButtonWhenAvailable` to the
......
...@@ -1237,6 +1237,7 @@ public final class CastPlayer extends BasePlayer { ...@@ -1237,6 +1237,7 @@ public final class CastPlayer extends BasePlayer {
int receiverAppStatus = remoteMediaClient.getPlayerState(); int receiverAppStatus = remoteMediaClient.getPlayerState();
switch (receiverAppStatus) { switch (receiverAppStatus) {
case MediaStatus.PLAYER_STATE_BUFFERING: case MediaStatus.PLAYER_STATE_BUFFERING:
case MediaStatus.PLAYER_STATE_LOADING:
return STATE_BUFFERING; return STATE_BUFFERING;
case MediaStatus.PLAYER_STATE_PLAYING: case MediaStatus.PLAYER_STATE_PLAYING:
case MediaStatus.PLAYER_STATE_PAUSED: case MediaStatus.PLAYER_STATE_PAUSED:
...@@ -1299,6 +1300,7 @@ public final class CastPlayer extends BasePlayer { ...@@ -1299,6 +1300,7 @@ public final class CastPlayer extends BasePlayer {
return false; return false;
} }
@SuppressWarnings("VisibleForTests")
private static int getCastRepeatMode(@RepeatMode int repeatMode) { private static int getCastRepeatMode(@RepeatMode int repeatMode) {
switch (repeatMode) { switch (repeatMode) {
case REPEAT_MODE_ONE: case REPEAT_MODE_ONE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment