Skip to content

Commit

Permalink
Map PLAYER_STATE_LOADING to STATE_BUFFERING
Browse files Browse the repository at this point in the history
#minor-release
Issue: #245
PiperOrigin-RevId: 510456793
  • Loading branch information
marcbaechinger authored and tonihei committed Feb 27, 2023
1 parent 71e92f7 commit ba49b6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ This release corresponds to the
* Cast extension:
* Bump Cast SDK version to 21.2.0.
* 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
the application thread to avoid threading issues.
* Add a property `focusSkipButtonWhenAvailable` to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,7 @@ private static int fetchPlaybackState(RemoteMediaClient remoteMediaClient) {
int receiverAppStatus = remoteMediaClient.getPlayerState();
switch (receiverAppStatus) {
case MediaStatus.PLAYER_STATE_BUFFERING:
case MediaStatus.PLAYER_STATE_LOADING:
return STATE_BUFFERING;
case MediaStatus.PLAYER_STATE_PLAYING:
case MediaStatus.PLAYER_STATE_PAUSED:
Expand Down Expand Up @@ -1299,6 +1300,7 @@ private static boolean isTrackActive(long id, long[] activeTrackIds) {
return false;
}

@SuppressWarnings("VisibleForTests")
private static int getCastRepeatMode(@RepeatMode int repeatMode) {
switch (repeatMode) {
case REPEAT_MODE_ONE:
Expand Down

0 comments on commit ba49b6b

Please sign in to comment.