mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Treat playback after stop as a new playback
This implies we should report it as STATE_JOINING_FOREGROUND instead of STATE_BUFFERING. PiperOrigin-RevId: 627406584
This commit is contained in:
parent
73f614b14d
commit
bf9f8a3719
@ -455,7 +455,8 @@ public final class MediaMetricsListener
|
|||||||
return PlaybackStateEvent.STATE_ENDED;
|
return PlaybackStateEvent.STATE_ENDED;
|
||||||
} else if (playerPlaybackState == Player.STATE_BUFFERING) {
|
} else if (playerPlaybackState == Player.STATE_BUFFERING) {
|
||||||
if (currentPlaybackState == PlaybackStateEvent.STATE_NOT_STARTED
|
if (currentPlaybackState == PlaybackStateEvent.STATE_NOT_STARTED
|
||||||
|| currentPlaybackState == PlaybackStateEvent.STATE_JOINING_FOREGROUND) {
|
|| currentPlaybackState == PlaybackStateEvent.STATE_JOINING_FOREGROUND
|
||||||
|
|| currentPlaybackState == PlaybackStateEvent.STATE_STOPPED) {
|
||||||
return PlaybackStateEvent.STATE_JOINING_FOREGROUND;
|
return PlaybackStateEvent.STATE_JOINING_FOREGROUND;
|
||||||
}
|
}
|
||||||
if (!player.getPlayWhenReady()) {
|
if (!player.getPlayWhenReady()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user